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

Method Delete_

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

Source from the content-addressed store, hash-verified

2186}
2187
2188func (p *CommandsParser) Delete_() (localctx IDeleteContext) {
2189 localctx = NewDeleteContext(p, p.GetParserRuleContext(), p.GetState())
2190 p.EnterRule(localctx, 16, CommandsParserRULE_delete)
2191 p.EnterOuterAlt(localctx, 1)
2192 {
2193 p.SetState(131)
2194 p.Match(CommandsParserT__4)
2195 if p.HasError() {
2196 // Recognition error - abort rule
2197 goto errorExit
2198 }
2199 }
2200 p.SetState(134)
2201 p.GetErrorHandler().Sync(p)
2202 if p.HasError() {
2203 goto errorExit
2204 }
2205
2206 switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 6, p.GetParserRuleContext()) {
2207 case 1:
2208 {
2209 p.SetState(132)
2210
2211 var _x = p.VarDecl()
2212
2213 localctx.(*DeleteContext).var_ = _x
2214 }
2215
2216 case 2:
2217 {
2218 p.SetState(133)
2219
2220 var _x = p.FnDecl()
2221
2222 localctx.(*DeleteContext).fn = _x
2223 }
2224
2225 case antlr.ATNInvalidAltNumber:
2226 goto errorExit
2227 }
2228
2229errorExit:
2230 if p.HasError() {
2231 v := p.GetError()
2232 localctx.SetException(v)
2233 p.GetErrorHandler().ReportError(p, v)
2234 p.GetErrorHandler().Recover(p, v)
2235 p.SetError(nil)
2236 }
2237 p.ExitRule()
2238 return localctx
2239 goto errorExit // Trick to prevent compiler error if the label is not used
2240}
2241
2242// ISimpleContext is an interface to support dynamic dispatch.
2243type ISimpleContext interface {

Callers 1

CommandMethod · 0.95

Calls 9

VarDeclMethod · 0.95
FnDeclMethod · 0.95
NewDeleteContextFunction · 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