Skip to content

Commit

Permalink
Update codegen template for imaginary rules to correctly use current …
Browse files Browse the repository at this point in the history
…node
  • Loading branch information
akosthekiss committed Oct 28, 2024
1 parent bcd9526 commit 019e117
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,9 @@ class {{ graph.name }}({{ graph.superclass }}):

{% for rule in graph.imag_rules %}
def {{ rule.id | join('_') }}(self, parent=None):
with UnlexerRuleContext(self, '{{ rule.id | join('_') }}', parent) as current:
return current
with UnlexerRuleContext(self, '{{ rule.id | join('_') }}', parent) as rule:
current = rule.current
return current
{% endfor %}

{%- if graph.members %}
Expand Down

0 comments on commit 019e117

Please sign in to comment.