summaryrefslogtreecommitdiffstats
path: root/dimension/lexer.l
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-02-02 21:53:23 -0500
committerTavian Barnes <tavianator@gmail.com>2010-02-02 21:53:23 -0500
commitc07038c627a5601bf331b5c755b9fcce02249fe3 (patch)
tree920fba38081591ffe2f62a78886a24f4d101abc8 /dimension/lexer.l
parent48cf99abba57ac20d32421f57bf04cb96d92bc7c (diff)
downloaddimension-c07038c627a5601bf331b5c755b9fcce02249fe3.tar.xz
Skip over invalid tokens in non-taken conditionals.
Diffstat (limited to 'dimension/lexer.l')
-rw-r--r--dimension/lexer.l16
1 files changed, 5 insertions, 11 deletions
diff --git a/dimension/lexer.l b/dimension/lexer.l
index cd02da1..eb5184c 100644
--- a/dimension/lexer.l
+++ b/dimension/lexer.l
@@ -285,17 +285,11 @@ dmnsn_tokenize(FILE *file, const char *filename)
while ((token.type = dmnsn_yylex_impl(&item, &location, filename, scanner))
!= 0) {
- if (token.type == DMNSN_T_LEX_ERROR) {
- dmnsn_delete_tokens(tokens);
- tokens = NULL;
- break;
- } else {
- token.value = item.value;
- token.filename = location.first_filename;
- token.line = location.first_line;
- token.col = location.first_column;
- dmnsn_array_push(tokens, &token);
- }
+ token.value = item.value;
+ token.filename = location.first_filename;
+ token.line = location.first_line;
+ token.col = location.first_column;
+ dmnsn_array_push(tokens, &token);
}
yylex_destroy(scanner);