gleam-lang / tree-sitter-gleam

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

Add reserved keywords #80

Closed lpil closed 7 months ago

lpil commented 7 months ago

Hello!

Gleam has some reserved keywords. Would it make sense to add these to the grammar? So they get highlighted appropriately if used.

https://github.com/gleam-lang/gleam/blob/0008b79d2eedfa2dd4d13efd67fa063e7ada285d/compiler-core/src/parse.rs#L2792-L2793

Thanks, Louis

the-mikedavis commented 7 months ago

I changed the reference highlights a little so that these highlight as warnings: https://github.com/gleam-lang/tree-sitter-gleam/commit/78123c13e3328b52f989610d8c49f762ce8559db

I think we want to hold off on adding them to the parser for now - I think we want to wait until we know how they might be used in the future so we can parse them correctly

lpil commented 7 months ago

Nice, thank you