You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now I've tried to fix this by creating a PR (r-lib/tree-sitter-r#64) renaming all rules with special characters, but this is not as desired since it renames most of the original grammar.
What do you recommend a a good solution here? Should rule names with special characters be disallowed in grammars? Or should the node bindings be able to cope with these special characters as token names?
The text was updated successfully, but these errors were encountered:
I partially disagree - rules shouldn't be named like that, it makes no sense and it would be correct to abstract those rules to a node containing the special character text. I would argue R's grammar is not exactly written in the "standard" tree-sitter way of writing grammars
I've encountered this issue when trying to load the node bindings of the
tree-sitter-r
parser with their 'next' branch. This grammar contains a lot of special symbols and as the node bindingsgenerate a new class for each rule with its name
, this causes anUncaught SyntaxError
when the class definition iseval
ed.Now I've tried to fix this by creating a PR (r-lib/tree-sitter-r#64) renaming all rules with special characters, but this is not as desired since it renames most of the original grammar.
What do you recommend a a good solution here? Should rule names with special characters be disallowed in grammars? Or should the node bindings be able to cope with these special characters as token names?
The text was updated successfully, but these errors were encountered: