in src/platform/packages/shared/kbn-monaco/src/languages/painless/antlr/painless_parser.ts [409:486]
public statement(): StatementContext {
let localctx: StatementContext = new StatementContext(this, this._ctx, this.state);
this.enterRule(localctx, 6, painless_parser.RULE_statement);
let _la: number;
try {
this.state = 117;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case 14:
case 17:
case 19:
case 24:
this.enterOuterAlt(localctx, 1);
{
this.state = 113;
this.rstatement();
}
break;
case 5:
case 7:
case 9:
case 18:
case 20:
case 21:
case 22:
case 23:
case 26:
case 29:
case 30:
case 34:
case 35:
case 59:
case 60:
case 73:
case 74:
case 75:
case 76:
case 77:
case 78:
case 79:
case 80:
case 81:
case 82:
case 83:
case 84:
this.enterOuterAlt(localctx, 2);
{
this.state = 114;
this.dstatement();
this.state = 115;
_la = this._input.LA(1);
if(!(_la===-1 || _la===13)) {
this._errHandler.recoverInline(this);
}
else {
this._errHandler.reportMatch(this);
this.consume();
}
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (re) {
if (re instanceof RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
}
finally {
this.exitRule();
}
return localctx;
}