Closed J3RN closed 2 years ago
Nodes defined in extras can be expected before an node. Thus, comment could be expected before escape_sequence or quoted_content; aka inside of a string. Naturally, this makes no sense.
extras
comment
escape_sequence
quoted_content
I tried wrapping escape_sequence and quoted_content in token.immediate to resolve the issue, but it had no effect (maybe is specific to whitespace?). Instead, I found success in largely copying tree-sitter-rust's solution of using an external scanner for string content.
token.immediate
tree-sitter-rust
cc @the-mikedavis
Great observation @the-mikedavis! Rectified in 935f80f.
Nodes defined in
extras
can be expected before an node. Thus,comment
could be expected beforeescape_sequence
orquoted_content
; aka inside of a string. Naturally, this makes no sense.I tried wrapping
escape_sequence
andquoted_content
intoken.immediate
to resolve the issue, but it had no effect (maybe is specific to whitespace?). Instead, I found success in largely copyingtree-sitter-rust
's solution of using an external scanner for string content.cc @the-mikedavis