summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2008-11-30 02:14:22 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2008-11-30 02:14:22 +0000
commit7dad1d392d1c380648f6de13f81ade48ce958be1 (patch)
tree212024cf7bb9a0ac8276a24412eb528a55a86f7e /src
parent2cd8f03eb67438c8396b1d13b2a464308cc12195 (diff)
downloadlibcss-7dad1d392d1c380648f6de13f81ade48ce958be1.tar.gz
libcss-7dad1d392d1c380648f6de13f81ade48ce958be1.tar.bz2
Commentary on which tokens actually need string data interning.
svn path=/trunk/libcss/; revision=5848
Diffstat (limited to 'src')
-rw-r--r--src/parse/parse.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/parse/parse.c b/src/parse/parse.c
index f461302..bfa6c27 100644
--- a/src/parse/parse.c
+++ b/src/parse/parse.c
@@ -569,6 +569,18 @@ css_error getToken(css_parser *parser, const css_token **token)
if (error != CSS_OK)
return error;
+ /** \todo We need only intern for the following token types:
+ *
+ * CSS_TOKEN_IDENT, CSS_TOKEN_ATKEYWORD, CSS_TOKEN_STRING,
+ * CSS_TOKEN_INVALID_STRING, CSS_TOKEN_HASH, CSS_TOKEN_URI,
+ * CSS_TOKEN_UNICODE_RANGE?, CSS_TOKEN_FUNCTION
+ *
+ * It would be better if we didn't intern the text for these
+ * token types:
+ *
+ * CSS_TOKEN_NUMBER, CSS_TOKEN_PERCENTAGE, CSS_TOKEN_DIMENSION
+ */
+
if (t->type != CSS_TOKEN_S &&
t->data.data != NULL && t->data.len > 0) {
/* Insert token text into the dictionary */