elixir-lang / tree-sitter-elixir

Elixir grammar for tree-sitter
https://elixir-lang.org/tree-sitter-elixir
Apache License 2.0
248 stars 25 forks source link

Grammar seems to fail when parsing complex patterns #69

Closed entilldaniel closed 5 months ago

entilldaniel commented 5 months ago

I came across this fairly complex pattern in a sigil when reading the earmark source code: [@link_text ~S{(?:\[[^]]*\]|[^][]|\])*}](https://github.com/pragdave/earmark/blob/df44cab142dfc8325a5fdd1dbc387607920f69b1/lib/earmark_parser/context.ex#L95)

This causes treesitter to parse some of the following brackets and parentheses as unmatched:

image

entilldaniel commented 5 months ago

Oh, sorry. If github is using this grammar then I guess this has to be an issue with my editor.

jonatanklosko commented 5 months ago

@entilldaniel yeah, I think has to do with the extension responsible for highlighting brackets, no matter the language :)