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

Method Param

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

Source from the content-addressed store, hash-verified

2011}
2012
2013func (p *CommandsParser) Param() (localctx IParamContext) {
2014 localctx = NewParamContext(p, p.GetParserRuleContext(), p.GetState())
2015 p.EnterRule(localctx, 14, CommandsParserRULE_param)
2016 p.EnterOuterAlt(localctx, 1)
2017 {
2018 p.SetState(127)
2019
2020 var _m = p.Match(CommandsParserIDENTIFIER)
2021
2022 localctx.(*ParamContext).pid = _m
2023 if p.HasError() {
2024 // Recognition error - abort rule
2025 goto errorExit
2026 }
2027 }
2028 {
2029 p.SetState(128)
2030 p.Match(CommandsParserCOLON)
2031 if p.HasError() {
2032 // Recognition error - abort rule
2033 goto errorExit
2034 }
2035 }
2036 {
2037 p.SetState(129)
2038
2039 var _x = p.Type_()
2040
2041 localctx.(*ParamContext).t = _x
2042 }
2043
2044errorExit:
2045 if p.HasError() {
2046 v := p.GetError()
2047 localctx.SetException(v)
2048 p.GetErrorHandler().ReportError(p, v)
2049 p.GetErrorHandler().Recover(p, v)
2050 p.SetError(nil)
2051 }
2052 p.ExitRule()
2053 return localctx
2054 goto errorExit // Trick to prevent compiler error if the label is not used
2055}
2056
2057// IDeleteContext is an interface to support dynamic dispatch.
2058type IDeleteContext interface {

Callers 1

FnDeclMethod · 0.95

Calls 8

Type_Method · 0.95
NewParamContextFunction · 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