(_p int)
| 6470 | } |
| 6471 | |
| 6472 | func (p *GScriptParser) expr(_p int) (localctx IExprContext) { |
| 6473 | var _parentctx antlr.ParserRuleContext = p.GetParserRuleContext() |
| 6474 | _parentState := p.GetState() |
| 6475 | localctx = NewExprContext(p, p.GetParserRuleContext(), _parentState) |
| 6476 | var _prevctx IExprContext = localctx |
| 6477 | var _ antlr.ParserRuleContext = _prevctx // TODO: To prevent unused variable warning. |
| 6478 | _startState := 68 |
| 6479 | p.EnterRecursionRule(localctx, 68, GScriptParserRULE_expr, _p) |
| 6480 | var _la int |
| 6481 | |
| 6482 | defer func() { |
| 6483 | p.UnrollRecursionContexts(_parentctx) |
| 6484 | }() |
| 6485 | |
| 6486 | defer func() { |
| 6487 | if err := recover(); err != nil { |
| 6488 | if v, ok := err.(antlr.RecognitionException); ok { |
| 6489 | localctx.SetException(v) |
| 6490 | p.GetErrorHandler().ReportError(p, v) |
| 6491 | p.GetErrorHandler().Recover(p, v) |
| 6492 | } else { |
| 6493 | panic(err) |
| 6494 | } |
| 6495 | } |
| 6496 | }() |
| 6497 | |
| 6498 | var _alt int |
| 6499 | |
| 6500 | p.EnterOuterAlt(localctx, 1) |
| 6501 | p.SetState(396) |
| 6502 | p.GetErrorHandler().Sync(p) |
| 6503 | switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 46, p.GetParserRuleContext()) { |
| 6504 | case 1: |
| 6505 | { |
| 6506 | p.SetState(383) |
| 6507 | p.Primary() |
| 6508 | } |
| 6509 | |
| 6510 | case 2: |
| 6511 | { |
| 6512 | p.SetState(384) |
| 6513 | p.FunctionCall() |
| 6514 | } |
| 6515 | |
| 6516 | case 3: |
| 6517 | { |
| 6518 | p.SetState(385) |
| 6519 | |
| 6520 | var _lt = p.GetTokenStream().LT(1) |
| 6521 | |
| 6522 | localctx.(*ExprContext).prefix = _lt |
| 6523 | |
| 6524 | _la = p.GetTokenStream().LA(1) |
| 6525 | |
| 6526 | if !(_la == GScriptParserPLUS || _la == GScriptParserSUB) { |
| 6527 | var _ri = p.GetErrorHandler().RecoverInline(p) |
| 6528 | |
| 6529 | localctx.(*ExprContext).prefix = _ri |
no test coverage detected