importStatement method
Implementation
ImportStatementContext importStatement() {
dynamic _localctx = ImportStatementContext(context, state);
enterRule(_localctx, 6, RULE_importStatement);
int _la;
try {
enterOuterAlt(_localctx, 1);
state = 136;
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 = 133;
comment();
state = 138;
errorHandler.sync(this);
_la = tokenStream.LA(1)!;
}
state = 139;
match(TOKEN_IMPORT);
state = 141;
errorHandler.sync(this);
_la = tokenStream.LA(1)!;
if (_la == TOKEN_WEAK || _la == TOKEN_PUBLIC) {
state = 140;
_la = tokenStream.LA(1)!;
if (!(_la == TOKEN_WEAK || _la == TOKEN_PUBLIC)) {
errorHandler.recoverInline(this);
} else {
if ( tokenStream.LA(1)! == IntStream.EOF ) matchedEOF = true;
errorHandler.reportMatch(this);
consume();
}
}
state = 143;
strLit();
state = 144;
match(TOKEN_SEMI);
} on RecognitionException catch (re) {
_localctx.exception = re;
errorHandler.reportError(this, re);
errorHandler.recover(this, re);
} finally {
exitRule();
}
return _localctx;
}