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

Method StartCommand

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

Source from the content-addressed store, hash-verified

488}
489
490func (p *CommandsParser) StartCommand() (localctx IStartCommandContext) {
491 localctx = NewStartCommandContext(p, p.GetParserRuleContext(), p.GetState())
492 p.EnterRule(localctx, 0, CommandsParserRULE_startCommand)
493 p.EnterOuterAlt(localctx, 1)
494 {
495 p.SetState(74)
496 p.Command()
497 }
498 {
499 p.SetState(75)
500 p.Match(CommandsParserEOF)
501 if p.HasError() {
502 // Recognition error - abort rule
503 goto errorExit
504 }
505 }
506
507errorExit:
508 if p.HasError() {
509 v := p.GetError()
510 localctx.SetException(v)
511 p.GetErrorHandler().ReportError(p, v)
512 p.GetErrorHandler().Recover(p, v)
513 p.SetError(nil)
514 }
515 p.ExitRule()
516 return localctx
517 goto errorExit // Trick to prevent compiler error if the label is not used
518}
519
520// ICommandContext is an interface to support dynamic dispatch.
521type ICommandContext interface {

Callers 2

ParseFunction · 0.95
tryParseFunction · 0.95

Calls 8

CommandMethod · 0.95
NewStartCommandContextFunction · 0.85
ReportErrorMethod · 0.80
RecoverMethod · 0.80
GetStateMethod · 0.65
MatchMethod · 0.65
EnterRuleMethod · 0.45
ExitRuleMethod · 0.45

Tested by 1

tryParseFunction · 0.76