From c07038c627a5601bf331b5c755b9fcce02249fe3 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 2 Feb 2010 21:53:23 -0500 Subject: Skip over invalid tokens in non-taken conditionals. --- dimension/lexer.l | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'dimension/lexer.l') 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); -- cgit v1.2.3