elixir-lang / tree-sitter-elixir

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

Two empty string interpolations close to each other give parsing errors #54

Closed yaglo closed 1 year ago

yaglo commented 1 year ago

I know it's a bit contrived but it can be an indicator of a bigger underlying issue.

When two strings with empty interpolations are together in one expression, they are being parsed with errors, but are perfectly fine from the Elixir's parser standpoint:

["#{}", "#{}"]
"#{}" <> "#{}"
[one: ~s"#{}", two: ~s"#{}"]

iex:

iex(21)> ["#{}", "#{}"]
["", ""]
iex(22)> "#{}" <> "#{}"
""
iex(23)> [one: ~s"#{}", two: ~s"#{}"]
[one: "", two: ""]