rpc method
Implementation
RpcContext rpc() {
dynamic _localctx = RpcContext(context, state);
enterRule(_localctx, 64, RULE_rpc);
int _la;
try {
enterOuterAlt(_localctx, 1);
state = 423;
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 = 420;
comment();
state = 425;
errorHandler.sync(this);
_la = tokenStream.LA(1)!;
}
state = 426;
match(TOKEN_RPC);
state = 427;
rpcName();
state = 428;
match(TOKEN_LP);
state = 430;
errorHandler.sync(this);
switch (interpreter!.adaptivePredict(tokenStream, 39, context)) {
case 1:
state = 429;
_localctx.requestStream = match(TOKEN_STREAM);
break;
}
state = 432;
_localctx.request = messageType();
state = 433;
match(TOKEN_RP);
state = 434;
match(TOKEN_RETURNS);
state = 435;
match(TOKEN_LP);
state = 437;
errorHandler.sync(this);
switch (interpreter!.adaptivePredict(tokenStream, 40, context)) {
case 1:
state = 436;
_localctx.responseStream = match(TOKEN_STREAM);
break;
}
state = 439;
_localctx.response = messageType();
state = 440;
match(TOKEN_RP);
state = 451;
errorHandler.sync(this);
switch (tokenStream.LA(1)!) {
case TOKEN_LC:
state = 441;
match(TOKEN_LC);
state = 446;
errorHandler.sync(this);
_la = tokenStream.LA(1)!;
while (_la == TOKEN_OPTION || _la == TOKEN_SEMI) {
state = 444;
errorHandler.sync(this);
switch (tokenStream.LA(1)!) {
case TOKEN_OPTION:
state = 442;
optionStatement();
break;
case TOKEN_SEMI:
state = 443;
emptyStatement_();
break;
default:
throw NoViableAltException(this);
}
state = 448;
errorHandler.sync(this);
_la = tokenStream.LA(1)!;
}
state = 449;
match(TOKEN_RC);
break;
case TOKEN_SEMI:
state = 450;
match(TOKEN_SEMI);
break;
default:
throw NoViableAltException(this);
}
} on RecognitionException catch (re) {
_localctx.exception = re;
errorHandler.reportError(this, re);
errorHandler.recover(this, re);
} finally {
exitRule();
}
return _localctx;
}