gleam-lang / tree-sitter-gleam

🌳 A tree-sitter grammar for the Gleam programming language
Apache License 2.0
66 stars 13 forks source link

Attach attributes to their associated node #70

Closed deriamis closed 8 months ago

deriamis commented 11 months ago

In the previous version of the grammar, attributes essentially "floated" in the tree, meaning they were not actually attached to anything. This was causing odd issues with syntax highlighting, such as external functions marked with an @external attribute causing subsequent syntax highlighting to fail in source files. This commit attaches attribute nodes only to legal parent nodes (functions and statement blocks) to make syntax highlighting more consistent.

Closes #69