MCPcopy Create free account
hub / github.com/cel-expr/cel-go / OptField

Method OptField

repl/parser/commands_parser.go:8659–8702  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8657}
8658
8659func (p *CommandsParser) OptField() (localctx IOptFieldContext) {
8660 localctx = NewOptFieldContext(p, p.GetParserRuleContext(), p.GetState())
8661 p.EnterRule(localctx, 64, CommandsParserRULE_optField)
8662 var _la int
8663
8664 p.EnterOuterAlt(localctx, 1)
8665 p.SetState(396)
8666 p.GetErrorHandler().Sync(p)
8667 if p.HasError() {
8668 goto errorExit
8669 }
8670 _la = p.GetTokenStream().LA(1)
8671
8672 if _la == CommandsParserQUESTIONMARK {
8673 {
8674 p.SetState(395)
8675
8676 var _m = p.Match(CommandsParserQUESTIONMARK)
8677
8678 localctx.(*OptFieldContext).opt = _m
8679 if p.HasError() {
8680 // Recognition error - abort rule
8681 goto errorExit
8682 }
8683 }
8684
8685 }
8686 {
8687 p.SetState(398)
8688 p.EscapeIdent()
8689 }
8690
8691errorExit:
8692 if p.HasError() {
8693 v := p.GetError()
8694 localctx.SetException(v)
8695 p.GetErrorHandler().ReportError(p, v)
8696 p.GetErrorHandler().Recover(p, v)
8697 p.SetError(nil)
8698 }
8699 p.ExitRule()
8700 return localctx
8701 goto errorExit // Trick to prevent compiler error if the label is not used
8702}
8703
8704// IMapInitializerListContext is an interface to support dynamic dispatch.
8705type IMapInitializerListContext interface {

Callers 1

FieldInitializerListMethod · 0.95

Calls 9

EscapeIdentMethod · 0.95
LAMethod · 0.80
ReportErrorMethod · 0.80
RecoverMethod · 0.80
NewOptFieldContextFunction · 0.70
GetStateMethod · 0.65
MatchMethod · 0.65
EnterRuleMethod · 0.45
ExitRuleMethod · 0.45

Tested by

no test coverage detected