summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <Michael Drake tlsa@netsurf-browser.org>2019-05-06 14:18:23 +0100
committerMichael Drake <Michael Drake tlsa@netsurf-browser.org>2019-05-06 14:18:23 +0100
commit472d1d03e9454209b18a705b2bb1479f844af369 (patch)
treee149e8f70a6d9c1780355a2af9cf509bec1d4b29
parentf87801ced60e92888325b0732d3e737f50abe1c9 (diff)
downloadlibcss-472d1d03e9454209b18a705b2bb1479f844af369.tar.gz
libcss-472d1d03e9454209b18a705b2bb1479f844af369.tar.bz2
lexer: Emit ">=" tokens.
-rw-r--r--src/lex/lex.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/lex/lex.c b/src/lex/lex.c
index d5a1e33..5269db3 100644
--- a/src/lex/lex.c
+++ b/src/lex/lex.c
@@ -1275,6 +1275,24 @@ start:
lexer->state = sESCAPEDIDENT;
lexer->substate = 0;
return EscapedIdentOrFunction(lexer, token);
+ case '>':
+ /* Check for >= */
+ perror = parserutils_inputstream_peek(lexer->input,
+ lexer->bytesReadForToken, &cptr, &clen);
+ if (perror != PARSERUTILS_OK && perror != PARSERUTILS_EOF) {
+ return css_error_from_parserutils_error(perror);
+ }
+
+ if (perror == PARSERUTILS_EOF) {
+ return emitToken(lexer, CSS_TOKEN_CHAR, token);
+ }
+
+ c = *cptr;
+
+ if (c == '=') {
+ APPEND(lexer, cptr, clen);
+ }
+ return emitToken(lexer, CSS_TOKEN_CHAR, token);
default:
return emitToken(lexer, CSS_TOKEN_CHAR, token);
}