slackhq / tree-sitter-hack

Hack grammar for tree-sitter
MIT License
33 stars 16 forks source link

[BUG] nameof operator missing from the gammar #68

Open mmanela opened 5 months ago

mmanela commented 5 months ago

Describe the bug

The grammar is missing the nameof operator

Requirements

To Reproduce

Grammar does not contain a definition for the nameof operator which prevent a highlighting query from targeting that.

$d[nameof C] = 4;

Which makes a query like this fail

[ 
  "nameof" 
] @keyword.operator

Expected behavior

I expect the nameof operator to be listed in the grammar