Closed damieng closed 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.
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.