serviceElement method

ServiceElementContext serviceElement()

Implementation

ServiceElementContext serviceElement() {
  dynamic _localctx = ServiceElementContext(context, state);
  enterRule(_localctx, 62, RULE_serviceElement);
  try {
    state = 418;
    errorHandler.sync(this);
    switch (tokenStream.LA(1)!) {
    case TOKEN_OPTION:
      enterOuterAlt(_localctx, 1);
      state = 415;
      optionStatement();
      break;
    case TOKEN_RPC:
    case TOKEN_DOC_LINE_COMMENT:
    case TOKEN_LINE_COMMENT:
    case TOKEN_DOC_MULTI_COMMENT:
    case TOKEN_MULTI_COMMENT:
      enterOuterAlt(_localctx, 2);
      state = 416;
      rpc();
      break;
    case TOKEN_SEMI:
      enterOuterAlt(_localctx, 3);
      state = 417;
      emptyStatement_();
      break;
    default:
      throw NoViableAltException(this);
    }
  } on RecognitionException catch (re) {
    _localctx.exception = re;
    errorHandler.reportError(this, re);
    errorHandler.recover(this, re);
  } finally {
    exitRule();
  }
  return _localctx;
}