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

Method Parse

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

Source from the content-addressed store, hash-verified

2798}
2799
2800func (p *CommandsParser) Parse() (localctx IParseContext) {
2801 localctx = NewParseContext(p, p.GetParserRuleContext(), p.GetState())
2802 p.EnterRule(localctx, 24, CommandsParserRULE_parse)
2803 p.EnterOuterAlt(localctx, 1)
2804 {
2805 p.SetState(149)
2806 p.Match(CommandsParserT__6)
2807 if p.HasError() {
2808 // Recognition error - abort rule
2809 goto errorExit
2810 }
2811 }
2812 {
2813 p.SetState(150)
2814
2815 var _x = p.Expr()
2816
2817 localctx.(*ParseContext).e = _x
2818 }
2819
2820errorExit:
2821 if p.HasError() {
2822 v := p.GetError()
2823 localctx.SetException(v)
2824 p.GetErrorHandler().ReportError(p, v)
2825 p.GetErrorHandler().Recover(p, v)
2826 p.SetError(nil)
2827 }
2828 p.ExitRule()
2829 return localctx
2830 goto errorExit // Trick to prevent compiler error if the label is not used
2831}
2832
2833// IExprCmdContext is an interface to support dynamic dispatch.
2834type IExprCmdContext interface {

Callers 1

CommandMethod · 0.95

Calls 8

ExprMethod · 0.95
NewParseContextFunction · 0.85
ReportErrorMethod · 0.80
RecoverMethod · 0.80
GetStateMethod · 0.65
MatchMethod · 0.65
EnterRuleMethod · 0.45
ExitRuleMethod · 0.45

Tested by

no test coverage detected