summaryrefslogtreecommitdiff
path: root/src/lex
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2008-08-04 23:04:59 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2008-08-04 23:04:59 +0000
commit6b31f0eaae57409c267977a7d658f8900c510dfd (patch)
tree8f160729d145807461c0b11d2a7623e5a9ddbb34 /src/lex
parent5f24982f201c86331c20848ade943f8687203292 (diff)
downloadlibcss-6b31f0eaae57409c267977a7d658f8900c510dfd.tar.gz
libcss-6b31f0eaae57409c267977a7d658f8900c510dfd.tar.bz2
For tokens where there's a possibility of case differences requiring case insensitive matching, intern lower cased versions of strings alongside the originals.
svn path=/trunk/libcss/; revision=4902
Diffstat (limited to 'src/lex')
-rw-r--r--src/lex/lex.c2
-rw-r--r--src/lex/lex.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/lex/lex.c b/src/lex/lex.c
index 5fdcff4..8f85d25 100644
--- a/src/lex/lex.c
+++ b/src/lex/lex.c
@@ -1141,6 +1141,8 @@ start:
t->type = CSS_TOKEN_EOF;
t->data.ptr = NULL;
t->data.len = 0;
+ t->lower.ptr = NULL;
+ t->lower.len = 0;
t->col = lexer->currentCol;
t->line = lexer->currentLine;
lexer->escapeSeen = false;
diff --git a/src/lex/lex.h b/src/lex/lex.h
index 97a4a17..6bfba6d 100644
--- a/src/lex/lex.h
+++ b/src/lex/lex.h
@@ -51,6 +51,8 @@ typedef struct css_token {
css_string data;
+ css_string lower;
+
uint32_t col;
uint32_t line;
} css_token;