Closed yaglo closed 1 year ago
Hey @yaglo, this is essentially the same case as this:
1 or1
1or1
1or 1
1 or 1
All of the above are parsed without error (but only the last one is valid). I discussed this upstream in the past (https://github.com/tree-sitter/tree-sitter/issues/1404) and the conclusion was that this behaviour was kinda expected given all the context.
Generally false positives in edge cases like these are not critical. It is important to correctly parse all valid syntax, but it's not really the goal to strictly reject all invalid syntax :)
when
doesn't require a space after it but it should.Example:
tree-sitter-elixir parses it without issues (as you can see above):
Elixir's parser doesn't consider this valid: