()
| 8128 | } |
| 8129 | |
| 8130 | func (p *CommandsParser) ListInit() (localctx IListInitContext) { |
| 8131 | localctx = NewListInitContext(p, p.GetParserRuleContext(), p.GetState()) |
| 8132 | p.EnterRule(localctx, 60, CommandsParserRULE_listInit) |
| 8133 | var _alt int |
| 8134 | |
| 8135 | p.EnterOuterAlt(localctx, 1) |
| 8136 | { |
| 8137 | p.SetState(374) |
| 8138 | |
| 8139 | var _x = p.OptExpr() |
| 8140 | |
| 8141 | localctx.(*ListInitContext)._optExpr = _x |
| 8142 | } |
| 8143 | localctx.(*ListInitContext).elems = append(localctx.(*ListInitContext).elems, localctx.(*ListInitContext)._optExpr) |
| 8144 | p.SetState(379) |
| 8145 | p.GetErrorHandler().Sync(p) |
| 8146 | if p.HasError() { |
| 8147 | goto errorExit |
| 8148 | } |
| 8149 | _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 47, p.GetParserRuleContext()) |
| 8150 | if p.HasError() { |
| 8151 | goto errorExit |
| 8152 | } |
| 8153 | for _alt != 2 && _alt != antlr.ATNInvalidAltNumber { |
| 8154 | if _alt == 1 { |
| 8155 | { |
| 8156 | p.SetState(375) |
| 8157 | p.Match(CommandsParserCOMMA) |
| 8158 | if p.HasError() { |
| 8159 | // Recognition error - abort rule |
| 8160 | goto errorExit |
| 8161 | } |
| 8162 | } |
| 8163 | { |
| 8164 | p.SetState(376) |
| 8165 | |
| 8166 | var _x = p.OptExpr() |
| 8167 | |
| 8168 | localctx.(*ListInitContext)._optExpr = _x |
| 8169 | } |
| 8170 | localctx.(*ListInitContext).elems = append(localctx.(*ListInitContext).elems, localctx.(*ListInitContext)._optExpr) |
| 8171 | |
| 8172 | } |
| 8173 | p.SetState(381) |
| 8174 | p.GetErrorHandler().Sync(p) |
| 8175 | if p.HasError() { |
| 8176 | goto errorExit |
| 8177 | } |
| 8178 | _alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 47, p.GetParserRuleContext()) |
| 8179 | if p.HasError() { |
| 8180 | goto errorExit |
| 8181 | } |
| 8182 | } |
| 8183 | |
| 8184 | errorExit: |
| 8185 | if p.HasError() { |
| 8186 | v := p.GetError() |
| 8187 | localctx.SetException(v) |
no test coverage detected