()
| 5962 | } |
| 5963 | |
| 5964 | func (p *CommandsParser) Unary() (localctx IUnaryContext) { |
| 5965 | localctx = NewUnaryContext(p, p.GetParserRuleContext(), p.GetState()) |
| 5966 | p.EnterRule(localctx, 52, CommandsParserRULE_unary) |
| 5967 | var _la int |
| 5968 | |
| 5969 | var _alt int |
| 5970 | |
| 5971 | p.SetState(279) |
| 5972 | p.GetErrorHandler().Sync(p) |
| 5973 | if p.HasError() { |
| 5974 | goto errorExit |
| 5975 | } |
| 5976 | |
| 5977 | switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 28, p.GetParserRuleContext()) { |
| 5978 | case 1: |
| 5979 | localctx = NewMemberExprContext(p, localctx) |
| 5980 | p.EnterOuterAlt(localctx, 1) |
| 5981 | { |
| 5982 | p.SetState(266) |
| 5983 | p.member(0) |
| 5984 | } |
| 5985 | |
| 5986 | case 2: |
| 5987 | localctx = NewLogicalNotContext(p, localctx) |
| 5988 | p.EnterOuterAlt(localctx, 2) |
| 5989 | p.SetState(268) |
| 5990 | p.GetErrorHandler().Sync(p) |
| 5991 | if p.HasError() { |
| 5992 | goto errorExit |
| 5993 | } |
| 5994 | _la = p.GetTokenStream().LA(1) |
| 5995 | |
| 5996 | for ok := true; ok; ok = _la == CommandsParserEXCLAM { |
| 5997 | { |
| 5998 | p.SetState(267) |
| 5999 | |
| 6000 | var _m = p.Match(CommandsParserEXCLAM) |
| 6001 | |
| 6002 | localctx.(*LogicalNotContext).s33 = _m |
| 6003 | if p.HasError() { |
| 6004 | // Recognition error - abort rule |
| 6005 | goto errorExit |
| 6006 | } |
| 6007 | } |
| 6008 | localctx.(*LogicalNotContext).ops = append(localctx.(*LogicalNotContext).ops, localctx.(*LogicalNotContext).s33) |
| 6009 | |
| 6010 | p.SetState(270) |
| 6011 | p.GetErrorHandler().Sync(p) |
| 6012 | if p.HasError() { |
| 6013 | goto errorExit |
| 6014 | } |
| 6015 | _la = p.GetTokenStream().LA(1) |
| 6016 | } |
| 6017 | { |
| 6018 | p.SetState(272) |
| 6019 | p.member(0) |
| 6020 | } |
| 6021 |
no test coverage detected