tree-sitter-angular icon indicating copy to clipboard operation
tree-sitter-angular copied to clipboard

fix: define identifier as word

Open forivall opened this issue 2 months ago • 2 comments

Any identifier starting with in, like "increaseVolume" would be parsed as a keyword, breaking parsing. The word feature solves this: https://tree-sitter.github.io/tree-sitter/creating-parsers/3-writing-the-grammar.html#keywords

forivall avatar Oct 17 '25 17:10 forivall

Also the regex for identifiers was incorrect. Identifiers should not be able to include hyphens.

forivall avatar Oct 18 '25 02:10 forivall

Thanks for the improvement @forivall . Can you show me an example angular template that would have this issue? I've never had the issue that an identifier was parsed as a keyword.

dlvandenberg avatar Oct 30 '25 10:10 dlvandenberg