()
| 5427 | } |
| 5428 | |
| 5429 | func (p *CELParser) OptExpr() (localctx IOptExprContext) { |
| 5430 | localctx = NewOptExprContext(p, p.GetParserRuleContext(), p.GetState()) |
| 5431 | p.EnterRule(localctx, 30, CELParserRULE_optExpr) |
| 5432 | var _la int |
| 5433 | |
| 5434 | p.EnterOuterAlt(localctx, 1) |
| 5435 | p.SetState(238) |
| 5436 | p.GetErrorHandler().Sync(p) |
| 5437 | if p.HasError() { |
| 5438 | goto errorExit |
| 5439 | } |
| 5440 | _la = p.GetTokenStream().LA(1) |
| 5441 | |
| 5442 | if _la == CELParserQUESTIONMARK { |
| 5443 | { |
| 5444 | p.SetState(237) |
| 5445 | |
| 5446 | var _m = p.Match(CELParserQUESTIONMARK) |
| 5447 | |
| 5448 | localctx.(*OptExprContext).opt = _m |
| 5449 | if p.HasError() { |
| 5450 | // Recognition error - abort rule |
| 5451 | goto errorExit |
| 5452 | } |
| 5453 | } |
| 5454 | |
| 5455 | } |
| 5456 | { |
| 5457 | p.SetState(240) |
| 5458 | |
| 5459 | var _x = p.Expr() |
| 5460 | |
| 5461 | localctx.(*OptExprContext).e = _x |
| 5462 | } |
| 5463 | |
| 5464 | errorExit: |
| 5465 | if p.HasError() { |
| 5466 | v := p.GetError() |
| 5467 | localctx.SetException(v) |
| 5468 | p.GetErrorHandler().ReportError(p, v) |
| 5469 | p.GetErrorHandler().Recover(p, v) |
| 5470 | p.SetError(nil) |
| 5471 | } |
| 5472 | p.ExitRule() |
| 5473 | return localctx |
| 5474 | goto errorExit // Trick to prevent compiler error if the label is not used |
| 5475 | } |
| 5476 | |
| 5477 | // ILiteralContext is an interface to support dynamic dispatch. |
| 5478 | type ILiteralContext interface { |
no test coverage detected