mapInitializerList method

MapInitializerListContext mapInitializerList()

Implementation

MapInitializerListContext mapInitializerList() {
  dynamic _localctx = MapInitializerListContext(context, state);
  enterRule(_localctx, 26, RULE_mapInitializerList);
  try {
    int _alt;
    enterOuterAlt(_localctx, 1);
    state = 216;
    _localctx._optExpr = optExpr();
    _localctx.keys.add(_localctx._optExpr);
    state = 217;
    _localctx.s21 = match(TOKEN_COLON);
    _localctx.cols.add(_localctx.s21);
    state = 218;
    _localctx._expr = expr();
    _localctx.values.add(_localctx._expr);
    state = 226;
    errorHandler.sync(this);
    _alt = interpreter!.adaptivePredict(tokenStream, 30, context);
    while (_alt != 2 && _alt != ATN.INVALID_ALT_NUMBER) {
      if (_alt == 1) {
        state = 219;
        match(TOKEN_COMMA);
        state = 220;
        _localctx._optExpr = optExpr();
        _localctx.keys.add(_localctx._optExpr);
        state = 221;
        _localctx.s21 = match(TOKEN_COLON);
        _localctx.cols.add(_localctx.s21);
        state = 222;
        _localctx._expr = expr();
        _localctx.values.add(_localctx._expr);
      }
      state = 228;
      errorHandler.sync(this);
      _alt = interpreter!.adaptivePredict(tokenStream, 30, context);
    }
  } on RecognitionException catch (re) {
    _localctx.exception = re;
    errorHandler.reportError(this, re);
    errorHandler.recover(this, re);
  } finally {
    exitRule();
  }
  return _localctx;
}