Tighten up scanner's check for comment
@@ -155,9 +155,12 @@ struct Scanner {
}
return false;
} else {
- if (lexer->lookahead == '-' || lexer->lookahead == '{') {
+ if (lexer->lookahead == '{') {
+ advance(lexer);
+ if (lexer->lookahead == '-') {
advance(lexer);
- next_token_is_comment = lexer->lookahead == '-';
+ next_token_is_comment = iswspace(lexer->lookahead);
+ }
}
break;
}
