Minor in Parser: drop obsolete code.
This commit is contained in:
@@ -194,20 +194,8 @@ public class JetParsing extends AbstractJetParsing {
|
||||
if (at(PACKAGE_KEYWORD)) {
|
||||
advance(); // PACKAGE_KEYWORD
|
||||
|
||||
|
||||
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();
|
||||
|
||||
consumeIf(SEMICOLON);
|
||||
|
||||
@@ -1,16 +1,9 @@
|
||||
JetFile: PackageBlockFirst.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
PsiErrorElement:Expecting package directive or top level declaration
|
||||
PsiElement(package)('package')
|
||||
PsiWhiteSpace(' ')
|
||||
MODIFIER_LIST
|
||||
ANNOTATION_ENTRY
|
||||
CONSTRUCTOR_CALLEE
|
||||
TYPE_REFERENCE
|
||||
USER_TYPE
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('foobar')
|
||||
PsiWhiteSpace(' ')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('foobar')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Expecting package directive or top level declaration
|
||||
PsiElement(LBRACE)('{')
|
||||
@@ -40,4 +33,4 @@ JetFile: PackageBlockFirst.kt
|
||||
PsiElement(IDENTIFIER)('a')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiErrorElement:Expecting package directive or top level declaration
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiElement(RBRACE)('}')
|
||||
|
||||
Reference in New Issue
Block a user