()
| 5250 | } |
| 5251 | |
| 5252 | func (p *CELParser) EscapeIdent() (localctx IEscapeIdentContext) { |
| 5253 | localctx = NewEscapeIdentContext(p, p.GetParserRuleContext(), p.GetState()) |
| 5254 | p.EnterRule(localctx, 28, CELParserRULE_escapeIdent) |
| 5255 | p.SetState(235) |
| 5256 | p.GetErrorHandler().Sync(p) |
| 5257 | if p.HasError() { |
| 5258 | goto errorExit |
| 5259 | } |
| 5260 | |
| 5261 | switch p.GetTokenStream().LA(1) { |
| 5262 | case CELParserIDENTIFIER: |
| 5263 | localctx = NewSimpleIdentifierContext(p, localctx) |
| 5264 | p.EnterOuterAlt(localctx, 1) |
| 5265 | { |
| 5266 | p.SetState(233) |
| 5267 | |
| 5268 | var _m = p.Match(CELParserIDENTIFIER) |
| 5269 | |
| 5270 | localctx.(*SimpleIdentifierContext).id = _m |
| 5271 | if p.HasError() { |
| 5272 | // Recognition error - abort rule |
| 5273 | goto errorExit |
| 5274 | } |
| 5275 | } |
| 5276 | |
| 5277 | case CELParserESC_IDENTIFIER: |
| 5278 | localctx = NewEscapedIdentifierContext(p, localctx) |
| 5279 | p.EnterOuterAlt(localctx, 2) |
| 5280 | { |
| 5281 | p.SetState(234) |
| 5282 | |
| 5283 | var _m = p.Match(CELParserESC_IDENTIFIER) |
| 5284 | |
| 5285 | localctx.(*EscapedIdentifierContext).id = _m |
| 5286 | if p.HasError() { |
| 5287 | // Recognition error - abort rule |
| 5288 | goto errorExit |
| 5289 | } |
| 5290 | } |
| 5291 | |
| 5292 | default: |
| 5293 | p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil)) |
| 5294 | goto errorExit |
| 5295 | } |
| 5296 | |
| 5297 | errorExit: |
| 5298 | if p.HasError() { |
| 5299 | v := p.GetError() |
| 5300 | localctx.SetException(v) |
| 5301 | p.GetErrorHandler().ReportError(p, v) |
| 5302 | p.GetErrorHandler().Recover(p, v) |
| 5303 | p.SetError(nil) |
| 5304 | } |
| 5305 | p.ExitRule() |
| 5306 | return localctx |
| 5307 | goto errorExit // Trick to prevent compiler error if the label is not used |
| 5308 | } |
| 5309 |
no test coverage detected