File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -352,19 +352,19 @@ def replace_fn(match):
352352 rule_names = filter (
353353 lambda s : not s .startswith ("_" ), set (r .origin .name for r in temp .rules )
354354 )
355- null_function = lambda * args : None
355+ null_function = lambda self , * args : None
356356 # Create dictionary of methods for type() creation
357357 methods = {r : null_function for r in rule_names }
358358
359359 # Even in this case we do want to report duplicate identifiers
360360 # 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 (
363363 (int (tree [0 ][0 ][0 ][1 :]), int (tree [0 ][0 ][0 ].line ))
364364 )
365365
366366 NT = type ("NullTransformer" , (Transformer ,), methods )
367- transformer = {"transformer" : NT }
367+ transformer = {"transformer" : NT () }
368368
369369 parser = Lark (grammar , parser = "lalr" , start = "file" , ** transformer )
370370
You can’t perform that action at this time.
0 commit comments