File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -187,8 +187,11 @@ bool tree_sitter_rescript_external_scanner_scan(
187187 if (lexer -> lookahead == 'n' ) {
188188 advance (lexer );
189189 if (lexer -> lookahead == 'd' ) {
190- // Ignore new lines before `and` keyword (recursive definition)
191- in_multiline_statement = true;
190+ advance (lexer );
191+ if (is_whitespace (lexer -> lookahead )) {
192+ // Ignore new lines before `and` keyword (recursive definition)
193+ in_multiline_statement = true;
194+ }
192195 }
193196 }
194197 } else if (lexer -> lookahead == 'e' ) {
Original file line number Diff line number Diff line change @@ -1608,6 +1608,8 @@ Subscript expressions
16081608
16091609myArray[42]
16101610myObj["foo"]
1611+ andd[0]
1612+ andd[1]
16111613
16121614--------------------------------------------------------------------------------
16131615
@@ -1620,7 +1622,16 @@ myObj["foo"]
16201622 (subscript_expression
16211623 (value_identifier)
16221624 (string
1623- (string_fragment)))))
1625+ (string_fragment))))
1626+
1627+ (expression_statement
1628+ (subscript_expression
1629+ (value_identifier)
1630+ (number)))
1631+ (expression_statement
1632+ (subscript_expression
1633+ (value_identifier)
1634+ (number))))
16241635
16251636================================================================================
16261637Variants
You can’t perform that action at this time.
0 commit comments