Skip to content

Commit 538a158

Browse files
committed
fix scanne and keyword
1 parent 66fc95d commit 538a158

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/scanner.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,11 @@ bool tree_sitter_rescript_external_scanner_scan(
239239
if (lexer->lookahead == 'n') {
240240
advance(lexer);
241241
if (lexer->lookahead == 'd') {
242-
// Ignore new lines before `and` keyword (recursive definition)
243-
in_multiline_statement = true;
242+
advance(lexer);
243+
if (is_whitespace(lexer->lookahead)) {
244+
// Ignore new lines before `and` keyword (recursive definition)
245+
in_multiline_statement = true;
246+
}
244247
}
245248
}
246249
}

0 commit comments

Comments
 (0)