summaryrefslogtreecommitdiff
path: root/src/lex
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2008-12-01 03:35:40 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2008-12-01 03:35:40 +0000
commit9e8f4efc94c896b4df2110272f42d2c93e1512d4 (patch)
tree2f8080ee8b98f8fec41afde4be4c5d4371dae042 /src/lex
parent3a03e4be1a744d37c66ea97651ca082ee4eb39d4 (diff)
downloadlibcss-9e8f4efc94c896b4df2110272f42d2c93e1512d4.tar.gz
libcss-9e8f4efc94c896b4df2110272f42d2c93e1512d4.tar.bz2
Simplify decision as to whether to intern token data by inserting markers into the css_token_type enum.
svn path=/trunk/libcss/; revision=5860
Diffstat (limited to 'src/lex')
-rw-r--r--src/lex/lex.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/lex/lex.h b/src/lex/lex.h
index 5fed823..feb589e 100644
--- a/src/lex/lex.h
+++ b/src/lex/lex.h
@@ -34,13 +34,22 @@ typedef union css_lexer_optparams {
* Token type
*/
typedef enum css_token_type {
- CSS_TOKEN_IDENT, CSS_TOKEN_ATKEYWORD, CSS_TOKEN_STRING,
- CSS_TOKEN_INVALID_STRING, CSS_TOKEN_HASH, CSS_TOKEN_NUMBER,
- CSS_TOKEN_PERCENTAGE, CSS_TOKEN_DIMENSION, CSS_TOKEN_URI,
- CSS_TOKEN_UNICODE_RANGE, CSS_TOKEN_CDO, CSS_TOKEN_CDC, CSS_TOKEN_S,
- CSS_TOKEN_COMMENT, CSS_TOKEN_FUNCTION, CSS_TOKEN_INCLUDES,
- CSS_TOKEN_DASHMATCH, CSS_TOKEN_PREFIXMATCH, CSS_TOKEN_SUFFIXMATCH,
- CSS_TOKEN_SUBSTRINGMATCH, CSS_TOKEN_CHAR, CSS_TOKEN_EOF
+ CSS_TOKEN_IDENT, CSS_TOKEN_ATKEYWORD, CSS_TOKEN_HASH,
+ CSS_TOKEN_FUNCTION,
+
+ /* Those tokens that want lowercase strings interned appear above */
+ CSS_TOKEN_LAST_INTERN_LOWER,
+
+ CSS_TOKEN_STRING, CSS_TOKEN_INVALID_STRING, CSS_TOKEN_URI,
+ CSS_TOKEN_UNICODE_RANGE, CSS_TOKEN_CHAR, CSS_TOKEN_NUMBER,
+ CSS_TOKEN_PERCENTAGE, CSS_TOKEN_DIMENSION,
+
+ /* Those tokens that want strings interned appear above */
+ CSS_TOKEN_LAST_INTERN,
+
+ CSS_TOKEN_CDO, CSS_TOKEN_CDC, CSS_TOKEN_S, CSS_TOKEN_COMMENT,
+ CSS_TOKEN_INCLUDES, CSS_TOKEN_DASHMATCH, CSS_TOKEN_PREFIXMATCH,
+ CSS_TOKEN_SUFFIXMATCH, CSS_TOKEN_SUBSTRINGMATCH, CSS_TOKEN_EOF
} css_token_type;
/**