serviceDef method

ServiceDefContext serviceDef()

Implementation

ServiceDefContext serviceDef() {
  dynamic _localctx = ServiceDefContext(context, state);
  enterRule(_localctx, 60, RULE_serviceDef);
  int _la;
  try {
    enterOuterAlt(_localctx, 1);
    state = 401;
    errorHandler.sync(this);
    _la = tokenStream.LA(1)!;
    while ((((_la) & ~0x3f) == 0 && ((BigInt.one << _la) & ((BigInt.one << TOKEN_DOC_LINE_COMMENT) | (BigInt.one << TOKEN_LINE_COMMENT) | (BigInt.one << TOKEN_DOC_MULTI_COMMENT) | (BigInt.one << TOKEN_MULTI_COMMENT))) != BigInt.zero)) {
      state = 398;
      comment();
      state = 403;
      errorHandler.sync(this);
      _la = tokenStream.LA(1)!;
    }
    state = 404;
    match(TOKEN_SERVICE);
    state = 405;
    serviceName();
    state = 406;
    match(TOKEN_LC);
    state = 410;
    errorHandler.sync(this);
    _la = tokenStream.LA(1)!;
    while ((((_la) & ~0x3f) == 0 && ((BigInt.one << _la) & ((BigInt.one << TOKEN_OPTION) | (BigInt.one << TOKEN_RPC) | (BigInt.one << TOKEN_SEMI) | (BigInt.one << TOKEN_DOC_LINE_COMMENT) | (BigInt.one << TOKEN_LINE_COMMENT) | (BigInt.one << TOKEN_DOC_MULTI_COMMENT) | (BigInt.one << TOKEN_MULTI_COMMENT))) != BigInt.zero)) {
      state = 407;
      serviceElement();
      state = 412;
      errorHandler.sync(this);
      _la = tokenStream.LA(1)!;
    }
    state = 413;
    match(TOKEN_RC);
  } on RecognitionException catch (re) {
    _localctx.exception = re;
    errorHandler.reportError(this, re);
    errorHandler.recover(this, re);
  } finally {
    exitRule();
  }
  return _localctx;
}