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

Method member

parser/gen/cel_parser.go:2539–2786  ·  view source on GitHub ↗
(_p int)

Source from the content-addressed store, hash-verified

2537}
2538
2539func (p *CELParser) member(_p int) (localctx IMemberContext) {
2540 var _parentctx antlr.ParserRuleContext = p.GetParserRuleContext()
2541
2542 _parentState := p.GetState()
2543 localctx = NewMemberContext(p, p.GetParserRuleContext(), _parentState)
2544 var _prevctx IMemberContext = localctx
2545 var _ antlr.ParserRuleContext = _prevctx // TODO: To prevent unused variable warning.
2546 _startState := 14
2547 p.EnterRecursionRule(localctx, 14, CELParserRULE_member, _p)
2548 var _la int
2549
2550 var _alt int
2551
2552 p.EnterOuterAlt(localctx, 1)
2553 localctx = NewPrimaryExprContext(p, localctx)
2554 p.SetParserRuleContext(localctx)
2555 _prevctx = localctx
2556
2557 {
2558 p.SetState(102)
2559 p.Primary()
2560 }
2561
2562 p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1))
2563 p.SetState(128)
2564 p.GetErrorHandler().Sync(p)
2565 if p.HasError() {
2566 goto errorExit
2567 }
2568 _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 13, p.GetParserRuleContext())
2569 if p.HasError() {
2570 goto errorExit
2571 }
2572 for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
2573 if _alt == 1 {
2574 if p.GetParseListeners() != nil {
2575 p.TriggerExitRuleEvent()
2576 }
2577 _prevctx = localctx
2578 p.SetState(126)
2579 p.GetErrorHandler().Sync(p)
2580 if p.HasError() {
2581 goto errorExit
2582 }
2583
2584 switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 12, p.GetParserRuleContext()) {
2585 case 1:
2586 localctx = NewSelectContext(p, NewMemberContext(p, _parentctx, _parentState))
2587 p.PushNewRecursionContext(localctx, _startState, CELParserRULE_member)
2588 p.SetState(104)
2589
2590 if !(p.Precpred(p.GetParserRuleContext(), 3)) {
2591 p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 3)", ""))
2592 goto errorExit
2593 }
2594 {
2595 p.SetState(105)
2596

Callers 2

UnaryMethod · 0.95
MemberMethod · 0.95

Calls 15

PrimaryMethod · 0.95
EscapeIdentMethod · 0.95
ExprListMethod · 0.95
ExprMethod · 0.95
LTMethod · 0.80
LAMethod · 0.80
ReportErrorMethod · 0.80
RecoverMethod · 0.80
NewMemberContextFunction · 0.70
NewPrimaryExprContextFunction · 0.70
NewSelectContextFunction · 0.70
NewMemberCallContextFunction · 0.70

Tested by

no test coverage detected