Closed helixbass closed 9 months ago
Similar (presumably) case (that is also giving a parse error):
for (a in b) { do ; while (a) break; }
(program [0, 0] - [1, 0]
(for_in_statement [0, 0] - [0, 38]
left: (identifier [0, 5] - [0, 6])
right: (identifier [0, 10] - [0, 11])
body: (statement_block [0, 13] - [0, 38]
(do_statement [0, 15] - [0, 36]
body: (empty_statement [0, 18] - [0, 19])
condition: (parenthesized_expression [0, 26] - [0, 29]
(identifier [0, 27] - [0, 28]))
(ERROR [0, 30] - [0, 35]
(identifier [0, 30] - [0, 35]))))))
/Users/jrosse/prj/tmp-js/tmp.js 0 ms (ERROR [0, 30] - [0, 35])
(let me know if you'd like me to open a separate issue for it)
Thanks I see these parsing successfully now
The following piece of code is valid but it is parsed incorrectly:
Here's a link to the TypeScript Playground showing that the snippet above is valid JavaScript or TypeScript:
https://www.typescriptlang.org/play?#code/CYewBKYNxg7gFgSwDYFMwAoCGBKOS1Ncg
The output of
tree-sitter parse
is the following: