File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -352,19 +352,19 @@ def replace_fn(match):
352
352
rule_names = filter (
353
353
lambda s : not s .startswith ("_" ), set (r .origin .name for r in temp .rules )
354
354
)
355
- null_function = lambda * args : None
355
+ null_function = lambda self , * args : None
356
356
# Create dictionary of methods for type() creation
357
357
methods = {r : null_function for r in rule_names }
358
358
359
359
# Even in this case we do want to report duplicate identifiers
360
360
# so these need to be captured
361
- methods ["id" ] = lambda * args : args
362
- methods ["simple_entity_instance" ] = lambda tree : instance_identifiers .append (
361
+ methods ["id" ] = lambda self , * args : args
362
+ methods ["simple_entity_instance" ] = lambda self , tree : instance_identifiers .append (
363
363
(int (tree [0 ][0 ][0 ][1 :]), int (tree [0 ][0 ][0 ].line ))
364
364
)
365
365
366
366
NT = type ("NullTransformer" , (Transformer ,), methods )
367
- transformer = {"transformer" : NT }
367
+ transformer = {"transformer" : NT () }
368
368
369
369
parser = Lark (grammar , parser = "lalr" , start = "file" , ** transformer )
370
370
You can’t perform that action at this time.
0 commit comments