()
| 4699 | } |
| 4700 | |
| 4701 | func (p *CELParser) OptField() (localctx IOptFieldContext) { |
| 4702 | localctx = NewOptFieldContext(p, p.GetParserRuleContext(), p.GetState()) |
| 4703 | p.EnterRule(localctx, 24, CELParserRULE_optField) |
| 4704 | var _la int |
| 4705 | |
| 4706 | p.EnterOuterAlt(localctx, 1) |
| 4707 | p.SetState(216) |
| 4708 | p.GetErrorHandler().Sync(p) |
| 4709 | if p.HasError() { |
| 4710 | goto errorExit |
| 4711 | } |
| 4712 | _la = p.GetTokenStream().LA(1) |
| 4713 | |
| 4714 | if _la == CELParserQUESTIONMARK { |
| 4715 | { |
| 4716 | p.SetState(215) |
| 4717 | |
| 4718 | var _m = p.Match(CELParserQUESTIONMARK) |
| 4719 | |
| 4720 | localctx.(*OptFieldContext).opt = _m |
| 4721 | if p.HasError() { |
| 4722 | // Recognition error - abort rule |
| 4723 | goto errorExit |
| 4724 | } |
| 4725 | } |
| 4726 | |
| 4727 | } |
| 4728 | { |
| 4729 | p.SetState(218) |
| 4730 | p.EscapeIdent() |
| 4731 | } |
| 4732 | |
| 4733 | errorExit: |
| 4734 | if p.HasError() { |
| 4735 | v := p.GetError() |
| 4736 | localctx.SetException(v) |
| 4737 | p.GetErrorHandler().ReportError(p, v) |
| 4738 | p.GetErrorHandler().Recover(p, v) |
| 4739 | p.SetError(nil) |
| 4740 | } |
| 4741 | p.ExitRule() |
| 4742 | return localctx |
| 4743 | goto errorExit // Trick to prevent compiler error if the label is not used |
| 4744 | } |
| 4745 | |
| 4746 | // IMapInitializerListContext is an interface to support dynamic dispatch. |
| 4747 | type IMapInitializerListContext interface { |
no test coverage detected