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

Method Expr

parser/gen/cel_parser.go:600–668  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

598}
599
600func (p *CELParser) Expr() (localctx IExprContext) {
601 localctx = NewExprContext(p, p.GetParserRuleContext(), p.GetState())
602 p.EnterRule(localctx, 2, CELParserRULE_expr)
603 var _la int
604
605 p.EnterOuterAlt(localctx, 1)
606 {
607 p.SetState(37)
608
609 var _x = p.ConditionalOr()
610
611 localctx.(*ExprContext).e = _x
612 }
613 p.SetState(43)
614 p.GetErrorHandler().Sync(p)
615 if p.HasError() {
616 goto errorExit
617 }
618 _la = p.GetTokenStream().LA(1)
619
620 if _la == CELParserQUESTIONMARK {
621 {
622 p.SetState(38)
623
624 var _m = p.Match(CELParserQUESTIONMARK)
625
626 localctx.(*ExprContext).op = _m
627 if p.HasError() {
628 // Recognition error - abort rule
629 goto errorExit
630 }
631 }
632 {
633 p.SetState(39)
634
635 var _x = p.ConditionalOr()
636
637 localctx.(*ExprContext).e1 = _x
638 }
639 {
640 p.SetState(40)
641 p.Match(CELParserCOLON)
642 if p.HasError() {
643 // Recognition error - abort rule
644 goto errorExit
645 }
646 }
647 {
648 p.SetState(41)
649
650 var _x = p.Expr()
651
652 localctx.(*ExprContext).e2 = _x
653 }
654
655 }
656
657errorExit:

Callers 7

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