fieldInitializerList method

FieldInitializerListContext fieldInitializerList()

Implementation

FieldInitializerListContext fieldInitializerList() {
  dynamic _localctx = FieldInitializerListContext(context, state);
  enterRule(_localctx, 22, RULE_fieldInitializerList);
  try {
    int _alt;
    enterOuterAlt(_localctx, 1);
    state = 198;
    _localctx._optField = optField();
    _localctx.fields.add(_localctx._optField);
    state = 199;
    _localctx.s21 = match(TOKEN_COLON);
    _localctx.cols.add(_localctx.s21);
    state = 200;
    _localctx._expr = expr();
    _localctx.values.add(_localctx._expr);
    state = 208;
    errorHandler.sync(this);
    _alt = interpreter!.adaptivePredict(tokenStream, 28, context);
    while (_alt != 2 && _alt != ATN.INVALID_ALT_NUMBER) {
      if (_alt == 1) {
        state = 201;
        match(TOKEN_COMMA);
        state = 202;
        _localctx._optField = optField();
        _localctx.fields.add(_localctx._optField);
        state = 203;
        _localctx.s21 = match(TOKEN_COLON);
        _localctx.cols.add(_localctx.s21);
        state = 204;
        _localctx._expr = expr();
        _localctx.values.add(_localctx._expr);
      }
      state = 210;
      errorHandler.sync(this);
      _alt = interpreter!.adaptivePredict(tokenStream, 28, context);
    }
  } on RecognitionException catch (re) {
    _localctx.exception = re;
    errorHandler.reportError(this, re);
    errorHandler.recover(this, re);
  } finally {
    exitRule();
  }
  return _localctx;
}