()
| 2004 | } |
| 2005 | |
| 2006 | func (p *CELParser) Unary() (localctx IUnaryContext) { |
| 2007 | localctx = NewUnaryContext(p, p.GetParserRuleContext(), p.GetState()) |
| 2008 | p.EnterRule(localctx, 12, CELParserRULE_unary) |
| 2009 | var _la int |
| 2010 | |
| 2011 | var _alt int |
| 2012 | |
| 2013 | p.SetState(99) |
| 2014 | p.GetErrorHandler().Sync(p) |
| 2015 | if p.HasError() { |
| 2016 | goto errorExit |
| 2017 | } |
| 2018 | |
| 2019 | switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 8, p.GetParserRuleContext()) { |
| 2020 | case 1: |
| 2021 | localctx = NewMemberExprContext(p, localctx) |
| 2022 | p.EnterOuterAlt(localctx, 1) |
| 2023 | { |
| 2024 | p.SetState(86) |
| 2025 | p.member(0) |
| 2026 | } |
| 2027 | |
| 2028 | case 2: |
| 2029 | localctx = NewLogicalNotContext(p, localctx) |
| 2030 | p.EnterOuterAlt(localctx, 2) |
| 2031 | p.SetState(88) |
| 2032 | p.GetErrorHandler().Sync(p) |
| 2033 | if p.HasError() { |
| 2034 | goto errorExit |
| 2035 | } |
| 2036 | _la = p.GetTokenStream().LA(1) |
| 2037 | |
| 2038 | for ok := true; ok; ok = _la == CELParserEXCLAM { |
| 2039 | { |
| 2040 | p.SetState(87) |
| 2041 | |
| 2042 | var _m = p.Match(CELParserEXCLAM) |
| 2043 | |
| 2044 | localctx.(*LogicalNotContext).s19 = _m |
| 2045 | if p.HasError() { |
| 2046 | // Recognition error - abort rule |
| 2047 | goto errorExit |
| 2048 | } |
| 2049 | } |
| 2050 | localctx.(*LogicalNotContext).ops = append(localctx.(*LogicalNotContext).ops, localctx.(*LogicalNotContext).s19) |
| 2051 | |
| 2052 | p.SetState(90) |
| 2053 | p.GetErrorHandler().Sync(p) |
| 2054 | if p.HasError() { |
| 2055 | goto errorExit |
| 2056 | } |
| 2057 | _la = p.GetTokenStream().LA(1) |
| 2058 | } |
| 2059 | { |
| 2060 | p.SetState(92) |
| 2061 | p.member(0) |
| 2062 | } |
| 2063 |
no test coverage detected