(_p int)
| 1611 | } |
| 1612 | |
| 1613 | func (p *CELParser) calc(_p int) (localctx ICalcContext) { |
| 1614 | var _parentctx antlr.ParserRuleContext = p.GetParserRuleContext() |
| 1615 | |
| 1616 | _parentState := p.GetState() |
| 1617 | localctx = NewCalcContext(p, p.GetParserRuleContext(), _parentState) |
| 1618 | var _prevctx ICalcContext = localctx |
| 1619 | var _ antlr.ParserRuleContext = _prevctx // TODO: To prevent unused variable warning. |
| 1620 | _startState := 10 |
| 1621 | p.EnterRecursionRule(localctx, 10, CELParserRULE_calc, _p) |
| 1622 | var _la int |
| 1623 | |
| 1624 | var _alt int |
| 1625 | |
| 1626 | p.EnterOuterAlt(localctx, 1) |
| 1627 | { |
| 1628 | p.SetState(73) |
| 1629 | p.Unary() |
| 1630 | } |
| 1631 | |
| 1632 | p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1)) |
| 1633 | p.SetState(83) |
| 1634 | p.GetErrorHandler().Sync(p) |
| 1635 | if p.HasError() { |
| 1636 | goto errorExit |
| 1637 | } |
| 1638 | _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 5, p.GetParserRuleContext()) |
| 1639 | if p.HasError() { |
| 1640 | goto errorExit |
| 1641 | } |
| 1642 | for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { |
| 1643 | if _alt == 1 { |
| 1644 | if p.GetParseListeners() != nil { |
| 1645 | p.TriggerExitRuleEvent() |
| 1646 | } |
| 1647 | _prevctx = localctx |
| 1648 | p.SetState(81) |
| 1649 | p.GetErrorHandler().Sync(p) |
| 1650 | if p.HasError() { |
| 1651 | goto errorExit |
| 1652 | } |
| 1653 | |
| 1654 | switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 4, p.GetParserRuleContext()) { |
| 1655 | case 1: |
| 1656 | localctx = NewCalcContext(p, _parentctx, _parentState) |
| 1657 | p.PushNewRecursionContext(localctx, _startState, CELParserRULE_calc) |
| 1658 | p.SetState(75) |
| 1659 | |
| 1660 | if !(p.Precpred(p.GetParserRuleContext(), 2)) { |
| 1661 | p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 2)", "")) |
| 1662 | goto errorExit |
| 1663 | } |
| 1664 | { |
| 1665 | p.SetState(76) |
| 1666 | |
| 1667 | var _lt = p.GetTokenStream().LT(1) |
| 1668 | |
| 1669 | localctx.(*CalcContext).op = _lt |
| 1670 |
no test coverage detected