summaryrefslogtreecommitdiffhomepage
path: root/lexer.c
diff options
context:
space:
mode:
Diffstat (limited to 'lexer.c')
-rw-r--r--lexer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lexer.c b/lexer.c
index 875e5dd..c9359b4 100644
--- a/lexer.c
+++ b/lexer.c
@@ -1176,8 +1176,10 @@ uc_lexer_next_token(uc_lexer_t *lex)
rv = lex_step(lex);
- lex->no_keyword = false;
- lex->no_regexp = false;
+ if (rv && rv->type != TK_COMMENT) {
+ lex->no_keyword = false;
+ lex->no_regexp = false;
+ }
return rv;
}