proto method
Implementation
ProtoContext proto() {
dynamic _localctx = ProtoContext(context, state);
enterRule(_localctx, 0, RULE_proto);
int _la;
try {
enterOuterAlt(_localctx, 1);
state = 105;
errorHandler.sync(this);
switch (interpreter!.adaptivePredict(tokenStream, 0, context)) {
case 1:
state = 104;
syntax();
break;
}
state = 115;
errorHandler.sync(this);
_la = tokenStream.LA(1)!;
while ((((_la) & ~0x3f) == 0 && ((BigInt.one << _la) & ((BigInt.one << TOKEN_IMPORT) | (BigInt.one << TOKEN_PACKAGE) | (BigInt.one << TOKEN_OPTION) | (BigInt.one << TOKEN_ENUM) | (BigInt.one << TOKEN_MESSAGE) | (BigInt.one << TOKEN_SERVICE) | (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 = 113;
errorHandler.sync(this);
switch (interpreter!.adaptivePredict(tokenStream, 1, context)) {
case 1:
state = 107;
importStatement();
break;
case 2:
state = 108;
packageStatement();
break;
case 3:
state = 109;
optionStatement();
break;
case 4:
state = 110;
topLevelDef();
break;
case 5:
state = 111;
emptyStatement_();
break;
case 6:
state = 112;
comment();
break;
}
state = 117;
errorHandler.sync(this);
_la = tokenStream.LA(1)!;
}
state = 118;
match(TOKEN_EOF);
} on RecognitionException catch (re) {
_localctx.exception = re;
errorHandler.reportError(this, re);
errorHandler.recover(this, re);
} finally {
exitRule();
}
return _localctx;
}