Minor in Parser: drop obsolete code.

This commit is contained in:
Zalim Bashorov
2014-09-09 16:38:52 +04:00
parent 3c60d0de93
commit fb97b1df93
2 changed files with 4 additions and 23 deletions
@@ -194,20 +194,8 @@ public class JetParsing extends AbstractJetParsing {
if (at(PACKAGE_KEYWORD)) { if (at(PACKAGE_KEYWORD)) {
advance(); // PACKAGE_KEYWORD advance(); // PACKAGE_KEYWORD
parsePackageName(); parsePackageName();
if (at(LBRACE)) {
// Because it's blocked package and it will be parsed as one of top level objects
packageDirective.drop();
firstEntry.rollbackTo();
parseFileAnnotationList(/*reportErrorForNonFileAnnotations =*/ false);
packageDirective = mark();
packageDirective.done(PACKAGE_DIRECTIVE);
return;
}
firstEntry.drop(); firstEntry.drop();
consumeIf(SEMICOLON); consumeIf(SEMICOLON);
+3 -10
View File
@@ -1,16 +1,9 @@
JetFile: PackageBlockFirst.kt JetFile: PackageBlockFirst.kt
PACKAGE_DIRECTIVE PACKAGE_DIRECTIVE
<empty list>
PsiErrorElement:Expecting package directive or top level declaration
PsiElement(package)('package') PsiElement(package)('package')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
MODIFIER_LIST REFERENCE_EXPRESSION
ANNOTATION_ENTRY PsiElement(IDENTIFIER)('foobar')
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('foobar')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
PsiErrorElement:Expecting package directive or top level declaration PsiErrorElement:Expecting package directive or top level declaration
PsiElement(LBRACE)('{') PsiElement(LBRACE)('{')