Skip to content

Commit

Permalink
Merge pull request #3832 from jimidle/feature/antlr3101
Browse files Browse the repository at this point in the history
fix: #2826  Go template is incorrect for dynamic scopes
  • Loading branch information
parrt authored Aug 23, 2022
2 parents e51cfcc + 4e9377b commit ceca1ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tool/resources/org/antlr/v4/tool/templates/codegen/Go/Go.stg
Original file line number Diff line number Diff line change
Expand Up @@ -906,8 +906,8 @@ ThisRulePropertyRef_text(r) ::= "p.GetTokenStream().GetTextFromTokens(localctx.G
ThisRulePropertyRef_ctx(r) ::= "<ctx(r)>"
ThisRulePropertyRef_parser(r) ::= "p"

NonLocalAttrRef(s) ::= "GetInvokingContext(<s.ruleIndex>).<s.escapedName>"
SetNonLocalAttr(s, rhsChunks) ::= "GetInvokingContext(<s.ruleIndex>).<s.escapedName> = <rhsChunks>"
NonLocalAttrRef(s) ::= "p.GetInvokingContext(<s.ruleIndex>).(*<s.ruleName; format={cap}>Context).<s.escapedName>"
SetNonLocalAttr(s, rhsChunks) ::= "p.GetInvokingContext(<s.ruleIndex>).(*<s.ruleName; format={cap}>Context).<s.escapedName> = <rhsChunks>"

AddToLabelList(a) ::= "<ctx(a.label)>.<a.listName> = append(<ctx(a.label)>.<a.listName>, <labelref(a.label)>)"

Expand Down

0 comments on commit ceca1ad

Please sign in to comment.