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

Method Expr

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

Source from the content-addressed store, hash-verified

4556}
4557
4558func (p *CommandsParser) Expr() (localctx IExprContext) {
4559 localctx = NewExprContext(p, p.GetParserRuleContext(), p.GetState())
4560 p.EnterRule(localctx, 42, CommandsParserRULE_expr)
4561 var _la int
4562
4563 p.EnterOuterAlt(localctx, 1)
4564 {
4565 p.SetState(217)
4566
4567 var _x = p.ConditionalOr()
4568
4569 localctx.(*ExprContext).e = _x
4570 }
4571 p.SetState(223)
4572 p.GetErrorHandler().Sync(p)
4573 if p.HasError() {
4574 goto errorExit
4575 }
4576 _la = p.GetTokenStream().LA(1)
4577
4578 if _la == CommandsParserQUESTIONMARK {
4579 {
4580 p.SetState(218)
4581
4582 var _m = p.Match(CommandsParserQUESTIONMARK)
4583
4584 localctx.(*ExprContext).op = _m
4585 if p.HasError() {
4586 // Recognition error - abort rule
4587 goto errorExit
4588 }
4589 }
4590 {
4591 p.SetState(219)
4592
4593 var _x = p.ConditionalOr()
4594
4595 localctx.(*ExprContext).e1 = _x
4596 }
4597 {
4598 p.SetState(220)
4599 p.Match(CommandsParserCOLON)
4600 if p.HasError() {
4601 // Recognition error - abort rule
4602 goto errorExit
4603 }
4604 }
4605 {
4606 p.SetState(221)
4607
4608 var _x = p.Expr()
4609
4610 localctx.(*ExprContext).e2 = _x
4611 }
4612
4613 }
4614
4615errorExit:

Callers 11

LetMethod · 0.95
CompileMethod · 0.95
ParseMethod · 0.95
ExprCmdMethod · 0.95
Start_Method · 0.95
memberMethod · 0.95
PrimaryMethod · 0.95
ExprListMethod · 0.95
FieldInitializerListMethod · 0.95
MapInitializerListMethod · 0.95
OptExprMethod · 0.95

Calls 9

ConditionalOrMethod · 0.95
LAMethod · 0.80
ReportErrorMethod · 0.80
RecoverMethod · 0.80
NewExprContextFunction · 0.70
GetStateMethod · 0.65
MatchMethod · 0.65
EnterRuleMethod · 0.45
ExitRuleMethod · 0.45

Tested by

no test coverage detected