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

Method ExprList

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

Source from the content-addressed store, hash-verified

3960}
3961
3962func (p *CELParser) ExprList() (localctx IExprListContext) {
3963 localctx = NewExprListContext(p, p.GetParserRuleContext(), p.GetState())
3964 p.EnterRule(localctx, 18, CELParserRULE_exprList)
3965 var _la int
3966
3967 p.EnterOuterAlt(localctx, 1)
3968 {
3969 p.SetState(186)
3970
3971 var _x = p.Expr()
3972
3973 localctx.(*ExprListContext)._expr = _x
3974 }
3975 localctx.(*ExprListContext).e = append(localctx.(*ExprListContext).e, localctx.(*ExprListContext)._expr)
3976 p.SetState(191)
3977 p.GetErrorHandler().Sync(p)
3978 if p.HasError() {
3979 goto errorExit
3980 }
3981 _la = p.GetTokenStream().LA(1)
3982
3983 for _la == CELParserCOMMA {
3984 {
3985 p.SetState(187)
3986 p.Match(CELParserCOMMA)
3987 if p.HasError() {
3988 // Recognition error - abort rule
3989 goto errorExit
3990 }
3991 }
3992 {
3993 p.SetState(188)
3994
3995 var _x = p.Expr()
3996
3997 localctx.(*ExprListContext)._expr = _x
3998 }
3999 localctx.(*ExprListContext).e = append(localctx.(*ExprListContext).e, localctx.(*ExprListContext)._expr)
4000
4001 p.SetState(193)
4002 p.GetErrorHandler().Sync(p)
4003 if p.HasError() {
4004 goto errorExit
4005 }
4006 _la = p.GetTokenStream().LA(1)
4007 }
4008
4009errorExit:
4010 if p.HasError() {
4011 v := p.GetError()
4012 localctx.SetException(v)
4013 p.GetErrorHandler().ReportError(p, v)
4014 p.GetErrorHandler().Recover(p, v)
4015 p.SetError(nil)
4016 }
4017 p.ExitRule()
4018 return localctx
4019 goto errorExit // Trick to prevent compiler error if the label is not used

Callers 2

memberMethod · 0.95
PrimaryMethod · 0.95

Calls 9

ExprMethod · 0.95
LAMethod · 0.80
ReportErrorMethod · 0.80
RecoverMethod · 0.80
NewExprListContextFunction · 0.70
GetStateMethod · 0.65
MatchMethod · 0.65
EnterRuleMethod · 0.45
ExitRuleMethod · 0.45

Tested by

no test coverage detected