Closed tamasvajk closed 1 year ago
The output is slightly changed by this modification, which might or might not be acceptable. @damieng what do you think?
--- a/corpus/contextual-keywords.txt
+++ b/corpus/contextual-keywords.txt
@@ -277,7 +277,7 @@ class scoped { }
(identifier)
(equals_value_clause
(lambda_expression
- (identifier)
+ parameters: (identifier)
body: (null_literal))))))
(local_declaration_statement
(variable_declaration
I think it could be improved slightly by making it more similar to:
(lambda_expression
parameters: (parameter_list
(parameter
type: (identifier)
name: (identifier)))
Something along these lines:
(lambda_expression
parameters: (implicit_parameter_list
(parameter
name: (identifier)))
What do you think?
This looks like an improvement all round - wonder why that one has such an impact on the size.
This looks like an improvement all round - wonder why that one has such an impact on the size.
I have no clue yet. I'll have a look at other field
calls inside a choice
.
I pushed some extra commits to adjust the trees:
--- a/corpus/contextual-keywords.txt
+++ b/corpus/contextual-keywords.txt
@@ -277,7 +277,9 @@ class scoped { }
(identifier)
(equals_value_clause
(lambda_expression
- parameters: (identifier)
+ parameters: (implicit_parameter_list
+ (parameter
+ name: (identifier)))
body: (null_literal))))))
(local_declaration_statement
(variable_declaration
I couldn't find another field
that would have similar impact on the parser size. I don't know why this one is so special.
Nice savings.
Changing the below:
results in a significant parser size reduction: