tree-sitter / tree-sitter-c-sharp

C# Grammar for tree-sitter
MIT License
177 stars 47 forks source link

Remove unnecessary conflict rules #311

Closed damieng closed 1 year ago

damieng commented 1 year ago

Unfortunately does not do much to reduce the parser size.

I did find out however that 20MB of the 49.9MB of parser.c is dealing with contextual keywords. Replacing the line

identifier: $ => choice($._identifier_token, $._contextual_keywords),

with

identifier: $ => $.identifier_token,

Cuts the generated files in half. This needs more investigation as to how better we can handle them without this crazy bloat.