()
| 9385 | } |
| 9386 | |
| 9387 | func (p *CommandsParser) OptExpr() (localctx IOptExprContext) { |
| 9388 | localctx = NewOptExprContext(p, p.GetParserRuleContext(), p.GetState()) |
| 9389 | p.EnterRule(localctx, 70, CommandsParserRULE_optExpr) |
| 9390 | var _la int |
| 9391 | |
| 9392 | p.EnterOuterAlt(localctx, 1) |
| 9393 | p.SetState(418) |
| 9394 | p.GetErrorHandler().Sync(p) |
| 9395 | if p.HasError() { |
| 9396 | goto errorExit |
| 9397 | } |
| 9398 | _la = p.GetTokenStream().LA(1) |
| 9399 | |
| 9400 | if _la == CommandsParserQUESTIONMARK { |
| 9401 | { |
| 9402 | p.SetState(417) |
| 9403 | |
| 9404 | var _m = p.Match(CommandsParserQUESTIONMARK) |
| 9405 | |
| 9406 | localctx.(*OptExprContext).opt = _m |
| 9407 | if p.HasError() { |
| 9408 | // Recognition error - abort rule |
| 9409 | goto errorExit |
| 9410 | } |
| 9411 | } |
| 9412 | |
| 9413 | } |
| 9414 | { |
| 9415 | p.SetState(420) |
| 9416 | |
| 9417 | var _x = p.Expr() |
| 9418 | |
| 9419 | localctx.(*OptExprContext).e = _x |
| 9420 | } |
| 9421 | |
| 9422 | errorExit: |
| 9423 | if p.HasError() { |
| 9424 | v := p.GetError() |
| 9425 | localctx.SetException(v) |
| 9426 | p.GetErrorHandler().ReportError(p, v) |
| 9427 | p.GetErrorHandler().Recover(p, v) |
| 9428 | p.SetError(nil) |
| 9429 | } |
| 9430 | p.ExitRule() |
| 9431 | return localctx |
| 9432 | goto errorExit // Trick to prevent compiler error if the label is not used |
| 9433 | } |
| 9434 | |
| 9435 | // ILiteralContext is an interface to support dynamic dispatch. |
| 9436 | type ILiteralContext interface { |
no test coverage detected