Skip to content

Commit 986b3d3

Browse files
committed
fix: handle '\r\n' in comment
1 parent e5d2133 commit 986b3d3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/parser.c

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/scanner.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static bool scan(UNUSED void *payload, TSLexer *lexer, bool const *valid_symbols
6868
lexer->result_symbol = BRACKET_COMMENT;
6969
return true;
7070
} else {
71-
while (lexer->lookahead != '\n' && lexer->lookahead != '\0') {
71+
while (lexer->lookahead != '\r' && lexer->lookahead != '\n' && lexer->lookahead != '\0') {
7272
advance(lexer);
7373
}
7474
lexer->result_symbol = LINE_COMMENT;

0 commit comments

Comments
 (0)