Skip to content

Commit

Permalink
Fix for repeat declaration of la_
Browse files Browse the repository at this point in the history
  • Loading branch information
pboyer committed Dec 8, 2016
1 parent 50646a6 commit 0cb32c0
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tool/resources/org/antlr/v4/tool/templates/codegen/Go/Go.stg
Original file line number Diff line number Diff line change
Expand Up @@ -644,10 +644,7 @@ p.GetErrorHandler().Sync(p)

<endif>


la_ := p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), <choice.decision>, p.GetParserRuleContext())

switch la_ {
switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), <choice.decision>, p.GetParserRuleContext()) {
<if(alts)>
<alts:{alt | case <i>:
<alt>}; separator="\n\n">
Expand All @@ -658,10 +655,10 @@ switch la_ {
OptionalBlock(choice, alts, error) ::= <<
p.SetState(<choice.stateNumber>)
p.GetErrorHandler().Sync(p)
la_ := p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), <choice.decision>, p.GetParserRuleContext())

<if(alts)>

<alts:{alt | if la_ == <i><if(!choice.ast.greedy)>+1<endif> {
<alts:{alt | if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), <choice.decision>, p.GetParserRuleContext()) == <i><if(!choice.ast.greedy)>+1<endif> {
<alt>
}; separator="} else ">
<endif>
Expand Down

0 comments on commit 0cb32c0

Please sign in to comment.