Merge pull request #2997 from ericvergnaud/fix-js-code-gen
Potential fix to #2980
This commit is contained in:
commit
c87e55b611
|
@ -410,7 +410,7 @@ if(la_===<i><if(!choice.ast.greedy)>+1<endif>) {
|
|||
StarBlock(choice, alts, sync, iteration) ::= <<
|
||||
this.state = <choice.stateNumber>;
|
||||
this._errHandler.sync(this);
|
||||
let _alt = this._interp.adaptivePredict(this._input,<choice.decision>,this._ctx)
|
||||
var _alt = this._interp.adaptivePredict(this._input,<choice.decision>,this._ctx)
|
||||
while(_alt!=<choice.exitAlt> && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
|
||||
if(_alt===1<if(!choice.ast.greedy)>+1<endif>) {
|
||||
<iteration>
|
||||
|
@ -426,7 +426,7 @@ while(_alt!=<choice.exitAlt> && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {
|
|||
PlusBlock(choice, alts, error) ::= <<
|
||||
this.state = <choice.blockStartStateNumber>; <! alt block decision !>
|
||||
this._errHandler.sync(this);
|
||||
let _alt = 1<if(!choice.ast.greedy)>+1<endif>;
|
||||
var _alt = 1<if(!choice.ast.greedy)>+1<endif>;
|
||||
do {
|
||||
switch (_alt) {
|
||||
<alts:{alt|
|
||||
|
|
Loading…
Reference in New Issue