diff --git a/compiler/frontend/src/org/jetbrains/kotlin/parsing/JetParsing.java b/compiler/frontend/src/org/jetbrains/kotlin/parsing/JetParsing.java index 25d7ae68c34..ce8dcae55ea 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/parsing/JetParsing.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/parsing/JetParsing.java @@ -453,10 +453,6 @@ public class JetParsing extends AbstractJetParsing { PsiBuilder.Marker list = mark(); boolean empty = true; while (!eof()) { - if (annotationParsingMode.atMemberStart && atSet(SOFT_KEYWORDS_AT_MEMBER_START)) break; - if ((annotationParsingMode == PRIMARY_CONSTRUCTOR_MODIFIER_LIST || annotationParsingMode == PRIMARY_CONSTRUCTOR_MODIFIER_LIST_LOCAL) && - atSet(CONSTRUCTOR_KEYWORD, WHERE_KEYWORD)) break; - if (at(AT) && annotationParsingMode.allowAnnotations) { parseAnnotationOrList(annotationParsingMode); } @@ -809,10 +805,7 @@ public class JetParsing extends AbstractJetParsing { PsiBuilder.Marker beforeConstructorModifiers = mark(); PsiBuilder.Marker primaryConstructorMarker = mark(); - boolean hasConstructorModifiers = parseModifierList( - declarationParsingMode != LOCAL ? PRIMARY_CONSTRUCTOR_MODIFIER_LIST : PRIMARY_CONSTRUCTOR_MODIFIER_LIST_LOCAL, - TokenSet.EMPTY - ); + boolean hasConstructorModifiers = parseModifierList(ONLY_ESCAPED_REGULAR_ANNOTATIONS, TokenSet.EMPTY); // Some modifiers found, but no parentheses following: class has already ended, and we are looking at something else if (hasConstructorModifiers && !atSet(LPAR, LBRACE, COLON, CONSTRUCTOR_KEYWORD)) { @@ -1058,7 +1051,7 @@ public class JetParsing extends AbstractJetParsing { PsiBuilder.Marker decl = mark(); ModifierDetector detector = new ModifierDetector(); - parseModifierList(detector, ALLOW_UNESCAPED_REGULAR_ANNOTATIONS_AT_MEMBER_MODIFIER_LIST, TokenSet.EMPTY); + parseModifierList(detector, ONLY_ESCAPED_REGULAR_ANNOTATIONS, TokenSet.EMPTY); IElementType declType = parseMemberDeclarationRest(detector.isEnumDetected(), detector.isDefaultDetected()); @@ -2267,30 +2260,23 @@ public class JetParsing extends AbstractJetParsing { } enum AnnotationParsingMode { - FILE_ANNOTATIONS_BEFORE_PACKAGE(false, true, false, true), - FILE_ANNOTATIONS_WHEN_PACKAGE_OMITTED(false, true, false, true), - ONLY_ESCAPED_REGULAR_ANNOTATIONS(false, false, false, true), - ALLOW_UNESCAPED_REGULAR_ANNOTATIONS(true, false, false, true), - ALLOW_UNESCAPED_REGULAR_ANNOTATIONS_AT_MEMBER_MODIFIER_LIST(true, false, true, true), - PRIMARY_CONSTRUCTOR_MODIFIER_LIST(true, false, false, true), - PRIMARY_CONSTRUCTOR_MODIFIER_LIST_LOCAL(false, false, false, true), - NO_ANNOTATIONS(false, false, false, false); - + FILE_ANNOTATIONS_BEFORE_PACKAGE(false, true, true), + FILE_ANNOTATIONS_WHEN_PACKAGE_OMITTED(false, true, true), + ONLY_ESCAPED_REGULAR_ANNOTATIONS(false, false, true), + ALLOW_UNESCAPED_REGULAR_ANNOTATIONS(true, false, true), + NO_ANNOTATIONS(false, false, false); boolean allowShortAnnotations; boolean isFileAnnotationParsingMode; - boolean atMemberStart; boolean allowAnnotations; AnnotationParsingMode( boolean allowShortAnnotations, boolean isFileAnnotationParsingMode, - boolean atMemberStart, boolean allowAnnotations ) { this.allowShortAnnotations = allowShortAnnotations; this.isFileAnnotationParsingMode = isFileAnnotationParsingMode; - this.atMemberStart = atMemberStart; this.allowAnnotations = allowAnnotations; } } diff --git a/compiler/testData/psi/EnumOldConstructorSyntax.txt b/compiler/testData/psi/EnumOldConstructorSyntax.txt index 995ce0d1562..9dedd8c7209 100644 --- a/compiler/testData/psi/EnumOldConstructorSyntax.txt +++ b/compiler/testData/psi/EnumOldConstructorSyntax.txt @@ -34,23 +34,16 @@ JetFile: EnumOldConstructorSyntax.kt PsiErrorElement:Expecting member declaration PsiElement(COLON)(':') PsiWhiteSpace(' ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('My') + PsiErrorElement:Expecting member declaration + PsiElement(LPAR)('(') + PsiErrorElement:Expecting member declaration + PsiElement(INTEGER_LITERAL)('13') + PsiErrorElement:Expecting member declaration + PsiElement(RPAR)(')') + PsiWhiteSpace('\n\n ') PROPERTY - MODIFIER_LIST - PsiErrorElement:Use '@' symbol before annotations - - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('My') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('13') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n\n ') PsiElement(val)('val') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('y') diff --git a/compiler/testData/psi/InterfaceWithEnumKeyword.txt b/compiler/testData/psi/InterfaceWithEnumKeyword.txt index 05040faf6c6..aed6fe37c58 100644 --- a/compiler/testData/psi/InterfaceWithEnumKeyword.txt +++ b/compiler/testData/psi/InterfaceWithEnumKeyword.txt @@ -19,17 +19,8 @@ JetFile: InterfaceWithEnumKeyword.kt CLASS_BODY PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') - MODIFIER_LIST - PsiErrorElement:Use '@' symbol before annotations - - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('D') PsiErrorElement:Expecting member declaration - + PsiElement(IDENTIFIER)('D') PsiWhiteSpace('\n') PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n') @@ -46,17 +37,8 @@ JetFile: InterfaceWithEnumKeyword.kt CLASS_BODY PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') - MODIFIER_LIST - PsiErrorElement:Use '@' symbol before annotations - - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('D') PsiErrorElement:Expecting member declaration - + PsiElement(IDENTIFIER)('D') PsiWhiteSpace('\n') PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n') diff --git a/compiler/testData/psi/NonTypeBeforeDotInBaseClass.txt b/compiler/testData/psi/NonTypeBeforeDotInBaseClass.txt index 20db7e7c838..97293c7e161 100644 --- a/compiler/testData/psi/NonTypeBeforeDotInBaseClass.txt +++ b/compiler/testData/psi/NonTypeBeforeDotInBaseClass.txt @@ -28,22 +28,16 @@ JetFile: NonTypeBeforeDotInBaseClass.kt PsiElement(super)('super') PsiErrorElement:Expecting member declaration PsiElement(DOT)('.') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('ClassA') + PsiErrorElement:Expecting member declaration + PsiElement(LPAR)('(') + PsiErrorElement:Expecting member declaration + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') FUN - MODIFIER_LIST - PsiErrorElement:Use '@' symbol before annotations - - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('ClassA') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') PsiErrorElement:Expecting member declaration - PsiWhiteSpace(' ') BLOCK PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') diff --git a/compiler/testData/psi/SimpleClassMembers_ERR.txt b/compiler/testData/psi/SimpleClassMembers_ERR.txt index 552fb531cdc..dc1e52614c5 100644 --- a/compiler/testData/psi/SimpleClassMembers_ERR.txt +++ b/compiler/testData/psi/SimpleClassMembers_ERR.txt @@ -31,17 +31,8 @@ JetFile: SimpleClassMembers_ERR.kt CLASS_BODY PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') - MODIFIER_LIST - PsiErrorElement:Use '@' symbol before annotations - - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('sdfsd') PsiErrorElement:Expecting member declaration - + PsiElement(IDENTIFIER)('sdfsd') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n ') diff --git a/compiler/testData/psi/annotation/ShortAnnotations.txt b/compiler/testData/psi/annotation/ShortAnnotations.txt index 371f384b107..e4ab36f3484 100644 --- a/compiler/testData/psi/annotation/ShortAnnotations.txt +++ b/compiler/testData/psi/annotation/ShortAnnotations.txt @@ -296,64 +296,38 @@ JetFile: ShortAnnotations.kt CLASS_BODY PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('foo') + PsiWhiteSpace(' ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('bar') + PsiErrorElement:Expecting member declaration + PsiElement(LPAR)('(') + PsiErrorElement:Expecting member declaration + PsiElement(INTEGER_LITERAL)('1') + PsiErrorElement:Expecting member declaration + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('buzz') + PsiErrorElement:Expecting member declaration + PsiElement(LT)('<') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('T') + PsiErrorElement:Expecting member declaration + PsiElement(GT)('>') + PsiErrorElement:Expecting member declaration + PsiElement(LPAR)('(') + PsiErrorElement:Expecting member declaration + PsiElement(INTEGER_LITERAL)('1') + PsiErrorElement:Expecting member declaration + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('zoo') + PsiWhiteSpace(' ') OBJECT_DECLARATION MODIFIER_LIST - PsiErrorElement:Use '@' symbol before annotations - - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiErrorElement:Use '@' symbol before annotations - - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('bar') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('1') - PsiElement(RPAR)(')') - PsiErrorElement:Use '@' symbol before annotations - - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('buzz') - TYPE_ARGUMENT_LIST - PsiElement(LT)('<') - TYPE_PROJECTION - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('T') - PsiElement(GT)('>') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('1') - PsiElement(RPAR)(')') - PsiErrorElement:Use '@' symbol before annotations - - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('zoo') - PsiWhiteSpace(' ') PsiElement(companion)('companion') PsiWhiteSpace(' ') PsiElement(object)('object') @@ -362,189 +336,108 @@ JetFile: ShortAnnotations.kt PsiElement(LBRACE)('{') PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('foo') + PsiWhiteSpace(' ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('bar') + PsiErrorElement:Expecting member declaration + PsiElement(LPAR)('(') + PsiErrorElement:Expecting member declaration + PsiElement(INTEGER_LITERAL)('1') + PsiErrorElement:Expecting member declaration + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('buzz') + PsiErrorElement:Expecting member declaration + PsiElement(LT)('<') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('T') + PsiErrorElement:Expecting member declaration + PsiElement(GT)('>') + PsiErrorElement:Expecting member declaration + PsiElement(LPAR)('(') + PsiErrorElement:Expecting member declaration + PsiElement(INTEGER_LITERAL)('1') + PsiErrorElement:Expecting member declaration + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('zoo') + PsiWhiteSpace(' ') CLASS - MODIFIER_LIST - PsiErrorElement:Use '@' symbol before annotations - - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiErrorElement:Use '@' symbol before annotations - - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('bar') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('1') - PsiElement(RPAR)(')') - PsiErrorElement:Use '@' symbol before annotations - - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('buzz') - TYPE_ARGUMENT_LIST - PsiElement(LT)('<') - TYPE_PROJECTION - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('T') - PsiElement(GT)('>') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('1') - PsiElement(RPAR)(')') - PsiErrorElement:Use '@' symbol before annotations - - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('zoo') - PsiWhiteSpace(' ') PsiElement(class)('class') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('A') PsiWhiteSpace('\n ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('foo') + PsiWhiteSpace(' ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('bar') + PsiErrorElement:Expecting member declaration + PsiElement(LPAR)('(') + PsiErrorElement:Expecting member declaration + PsiElement(INTEGER_LITERAL)('1') + PsiErrorElement:Expecting member declaration + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('buzz') + PsiErrorElement:Expecting member declaration + PsiElement(LT)('<') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('T') + PsiErrorElement:Expecting member declaration + PsiElement(GT)('>') + PsiErrorElement:Expecting member declaration + PsiElement(LPAR)('(') + PsiErrorElement:Expecting member declaration + PsiElement(INTEGER_LITERAL)('1') + PsiErrorElement:Expecting member declaration + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('zoo') + PsiWhiteSpace(' ') OBJECT_DECLARATION - MODIFIER_LIST - PsiErrorElement:Use '@' symbol before annotations - - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiErrorElement:Use '@' symbol before annotations - - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('bar') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('1') - PsiElement(RPAR)(')') - PsiErrorElement:Use '@' symbol before annotations - - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('buzz') - TYPE_ARGUMENT_LIST - PsiElement(LT)('<') - TYPE_PROJECTION - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('T') - PsiElement(GT)('>') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('1') - PsiElement(RPAR)(')') - PsiErrorElement:Use '@' symbol before annotations - - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('zoo') - PsiWhiteSpace(' ') PsiElement(object)('object') PsiWhiteSpace(' ') OBJECT_DECLARATION_NAME PsiElement(IDENTIFIER)('B') PsiWhiteSpace('\n ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('foo') + PsiWhiteSpace(' ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('bar') + PsiErrorElement:Expecting member declaration + PsiElement(LPAR)('(') + PsiErrorElement:Expecting member declaration + PsiElement(INTEGER_LITERAL)('1') + PsiErrorElement:Expecting member declaration + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('buzz') + PsiErrorElement:Expecting member declaration + PsiElement(LT)('<') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('T') + PsiErrorElement:Expecting member declaration + PsiElement(GT)('>') + PsiErrorElement:Expecting member declaration + PsiElement(LPAR)('(') + PsiErrorElement:Expecting member declaration + PsiElement(INTEGER_LITERAL)('1') + PsiErrorElement:Expecting member declaration + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('zoo') + PsiWhiteSpace(' ') FUN - MODIFIER_LIST - PsiErrorElement:Use '@' symbol before annotations - - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiErrorElement:Use '@' symbol before annotations - - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('bar') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('1') - PsiElement(RPAR)(')') - PsiErrorElement:Use '@' symbol before annotations - - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('buzz') - TYPE_ARGUMENT_LIST - PsiElement(LT)('<') - TYPE_PROJECTION - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('T') - PsiElement(GT)('>') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('1') - PsiElement(RPAR)(')') - PsiErrorElement:Use '@' symbol before annotations - - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('zoo') - PsiWhiteSpace(' ') PsiElement(fun)('fun') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('a') @@ -556,64 +449,37 @@ JetFile: ShortAnnotations.kt PsiElement(LBRACE)('{') PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('foo') + PsiWhiteSpace(' ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('bar') + PsiErrorElement:Expecting member declaration + PsiElement(LPAR)('(') + PsiErrorElement:Expecting member declaration + PsiElement(INTEGER_LITERAL)('1') + PsiErrorElement:Expecting member declaration + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('buzz') + PsiErrorElement:Expecting member declaration + PsiElement(LT)('<') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('T') + PsiErrorElement:Expecting member declaration + PsiElement(GT)('>') + PsiErrorElement:Expecting member declaration + PsiElement(LPAR)('(') + PsiErrorElement:Expecting member declaration + PsiElement(INTEGER_LITERAL)('1') + PsiErrorElement:Expecting member declaration + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('zoo') + PsiWhiteSpace(' ') PROPERTY - MODIFIER_LIST - PsiErrorElement:Use '@' symbol before annotations - - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiErrorElement:Use '@' symbol before annotations - - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('bar') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('1') - PsiElement(RPAR)(')') - PsiErrorElement:Use '@' symbol before annotations - - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('buzz') - TYPE_ARGUMENT_LIST - PsiElement(LT)('<') - TYPE_PROJECTION - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('T') - PsiElement(GT)('>') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('1') - PsiElement(RPAR)(')') - PsiErrorElement:Use '@' symbol before annotations - - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('zoo') - PsiWhiteSpace(' ') PsiElement(val)('val') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('c') @@ -630,64 +496,37 @@ JetFile: ShortAnnotations.kt INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('0') PsiWhiteSpace('\n ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('foo') + PsiWhiteSpace(' ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('bar') + PsiErrorElement:Expecting member declaration + PsiElement(LPAR)('(') + PsiErrorElement:Expecting member declaration + PsiElement(INTEGER_LITERAL)('1') + PsiErrorElement:Expecting member declaration + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('buzz') + PsiErrorElement:Expecting member declaration + PsiElement(LT)('<') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('T') + PsiErrorElement:Expecting member declaration + PsiElement(GT)('>') + PsiErrorElement:Expecting member declaration + PsiElement(LPAR)('(') + PsiErrorElement:Expecting member declaration + PsiElement(INTEGER_LITERAL)('1') + PsiErrorElement:Expecting member declaration + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('zoo') + PsiWhiteSpace(' ') PROPERTY - MODIFIER_LIST - PsiErrorElement:Use '@' symbol before annotations - - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiErrorElement:Use '@' symbol before annotations - - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('bar') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('1') - PsiElement(RPAR)(')') - PsiErrorElement:Use '@' symbol before annotations - - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('buzz') - TYPE_ARGUMENT_LIST - PsiElement(LT)('<') - TYPE_PROJECTION - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('T') - PsiElement(GT)('>') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('1') - PsiElement(RPAR)(')') - PsiErrorElement:Use '@' symbol before annotations - - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('zoo') - PsiWhiteSpace(' ') PsiElement(var)('var') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('v') @@ -704,64 +543,37 @@ JetFile: ShortAnnotations.kt INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('0') PsiWhiteSpace('\n ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('foo') + PsiWhiteSpace(' ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('bar') + PsiErrorElement:Expecting member declaration + PsiElement(LPAR)('(') + PsiErrorElement:Expecting member declaration + PsiElement(INTEGER_LITERAL)('1') + PsiErrorElement:Expecting member declaration + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('buzz') + PsiErrorElement:Expecting member declaration + PsiElement(LT)('<') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('T') + PsiErrorElement:Expecting member declaration + PsiElement(GT)('>') + PsiErrorElement:Expecting member declaration + PsiElement(LPAR)('(') + PsiErrorElement:Expecting member declaration + PsiElement(INTEGER_LITERAL)('1') + PsiErrorElement:Expecting member declaration + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('zoo') + PsiWhiteSpace(' ') TYPEDEF - MODIFIER_LIST - PsiErrorElement:Use '@' symbol before annotations - - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiErrorElement:Use '@' symbol before annotations - - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('bar') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('1') - PsiElement(RPAR)(')') - PsiErrorElement:Use '@' symbol before annotations - - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('buzz') - TYPE_ARGUMENT_LIST - PsiElement(LT)('<') - TYPE_PROJECTION - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('T') - PsiElement(GT)('>') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('1') - PsiElement(RPAR)(')') - PsiErrorElement:Use '@' symbol before annotations - - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('zoo') - PsiWhiteSpace(' ') PsiElement(typealias)('typealias') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('T') @@ -773,64 +585,37 @@ JetFile: ShortAnnotations.kt REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('Int') PsiWhiteSpace('\n\n ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('foo') + PsiWhiteSpace(' ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('bar') + PsiErrorElement:Expecting member declaration + PsiElement(LPAR)('(') + PsiErrorElement:Expecting member declaration + PsiElement(INTEGER_LITERAL)('1') + PsiErrorElement:Expecting member declaration + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('buzz') + PsiErrorElement:Expecting member declaration + PsiElement(LT)('<') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('T') + PsiErrorElement:Expecting member declaration + PsiElement(GT)('>') + PsiErrorElement:Expecting member declaration + PsiElement(LPAR)('(') + PsiErrorElement:Expecting member declaration + PsiElement(INTEGER_LITERAL)('1') + PsiErrorElement:Expecting member declaration + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('zoo') + PsiWhiteSpace(' ') ANONYMOUS_INITIALIZER - MODIFIER_LIST - PsiErrorElement:Use '@' symbol before annotations - - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiErrorElement:Use '@' symbol before annotations - - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('bar') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('1') - PsiElement(RPAR)(')') - PsiErrorElement:Use '@' symbol before annotations - - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('buzz') - TYPE_ARGUMENT_LIST - PsiElement(LT)('<') - TYPE_PROJECTION - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('T') - PsiElement(GT)('>') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('1') - PsiElement(RPAR)(')') - PsiErrorElement:Use '@' symbol before annotations - - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('zoo') - PsiWhiteSpace(' ') PsiElement(init)('init') PsiWhiteSpace(' ') BLOCK diff --git a/compiler/testData/psi/annotation/modifiersMigration/oldUsages.txt b/compiler/testData/psi/annotation/modifiersMigration/oldUsages.txt index cb2da9fa4f0..a7cc49a7e3b 100644 --- a/compiler/testData/psi/annotation/modifiersMigration/oldUsages.txt +++ b/compiler/testData/psi/annotation/modifiersMigration/oldUsages.txt @@ -56,20 +56,13 @@ JetFile: oldUsages.kt PsiWhiteSpace('\n\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n ') + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('kotlin') + PsiErrorElement:Expecting member declaration + PsiElement(DOT)('.') FUN MODIFIER_LIST - PsiErrorElement:Use '@' symbol before annotations - - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('kotlin') - PsiElement(DOT)('.') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('inline') + PsiElement(inline)('inline') PsiWhiteSpace(' ') PsiElement(fun)('fun') PsiWhiteSpace(' ') diff --git a/compiler/testData/psi/primaryConstructor/recovery.txt b/compiler/testData/psi/primaryConstructor/recovery.txt index 39744426c0c..8341c1afb46 100644 --- a/compiler/testData/psi/primaryConstructor/recovery.txt +++ b/compiler/testData/psi/primaryConstructor/recovery.txt @@ -50,32 +50,19 @@ JetFile: recovery.kt PsiElement(class)('class') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('A1') - PsiWhiteSpace(' ') - PRIMARY_CONSTRUCTOR - MODIFIER_LIST - PsiErrorElement:Use '@' symbol before annotations - - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('Ann') - PsiErrorElement:Expecting 'constructor' keyword - - PsiWhiteSpace(' ') + PsiWhiteSpace(' ') + PsiErrorElement:Expecting a top level declaration + PsiElement(IDENTIFIER)('Ann') + PsiWhiteSpace(' ') + PsiErrorElement:Expecting a top level declaration PsiElement(COLON)(':') - PsiWhiteSpace(' ') - DELEGATION_SPECIFIER_LIST - DELEGATOR_SUPER_CALL - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('Base') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + PsiErrorElement:Expecting a top level declaration + PsiElement(IDENTIFIER)('Base') + PsiErrorElement:Expecting a top level declaration + PsiElement(LPAR)('(') + PsiErrorElement:Expecting a top level declaration + PsiElement(RPAR)(')') PsiWhiteSpace('\n\n') CLASS PsiElement(class)('class') @@ -89,21 +76,14 @@ JetFile: recovery.kt PsiElement(class)('class') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('A3') - PsiWhiteSpace(' ') - PRIMARY_CONSTRUCTOR - MODIFIER_LIST - PsiErrorElement:Use '@' symbol before annotations - - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('Ann') - PsiErrorElement:Expecting 'constructor' keyword + PsiWhiteSpace(' ') + PsiErrorElement:Expecting a top level declaration + PsiElement(IDENTIFIER)('Ann') + PsiWhiteSpace(' ') + FUN + PsiErrorElement:Expecting a top level declaration - PsiWhiteSpace(' ') - CLASS_BODY + BLOCK PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') FUN diff --git a/compiler/testData/psi/primaryConstructor/recoveryNestedClassAmbiguity.txt b/compiler/testData/psi/primaryConstructor/recoveryNestedClassAmbiguity.txt index df7f60e0f92..5fb71694bd3 100644 --- a/compiler/testData/psi/primaryConstructor/recoveryNestedClassAmbiguity.txt +++ b/compiler/testData/psi/primaryConstructor/recoveryNestedClassAmbiguity.txt @@ -226,20 +226,13 @@ JetFile: recoveryNestedClassAmbiguity.kt PsiWhiteSpace('\n ') MODIFIER_LIST PsiElement(private)('private') - PsiErrorElement:Use '@' symbol before annotations - - PsiWhiteSpace(' ') - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('Ann') - PsiWhiteSpace(' ') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') + PsiWhiteSpace(' ') PsiErrorElement:Expecting member declaration - + PsiElement(IDENTIFIER)('Ann') + PsiWhiteSpace(' ') + PsiErrorElement:Expecting member declaration + PsiElement(LPAR)('(') + PsiErrorElement:Expecting member declaration + PsiElement(RPAR)(')') PsiWhiteSpace('\n') PsiElement(RBRACE)('}') \ No newline at end of file diff --git a/compiler/testData/psi/primaryConstructor/valid.kt b/compiler/testData/psi/primaryConstructor/valid.kt index 01493ab73d0..779ee5748e3 100644 --- a/compiler/testData/psi/primaryConstructor/valid.kt +++ b/compiler/testData/psi/primaryConstructor/valid.kt @@ -12,4 +12,4 @@ class A4 private @Ann(1) constructor(y: Int) class A5 @Ann private constructor() {} -class A6 Ann() private constructor() {} +class A6 @Ann() private constructor() {} diff --git a/compiler/testData/psi/primaryConstructor/valid.txt b/compiler/testData/psi/primaryConstructor/valid.txt index d300a41a7a7..cfd3c774c55 100644 --- a/compiler/testData/psi/primaryConstructor/valid.txt +++ b/compiler/testData/psi/primaryConstructor/valid.txt @@ -209,9 +209,8 @@ JetFile: valid.kt PsiWhiteSpace(' ') PRIMARY_CONSTRUCTOR MODIFIER_LIST - PsiErrorElement:Use '@' symbol before annotations - ANNOTATION_ENTRY + PsiElement(AT)('@') CONSTRUCTOR_CALLEE TYPE_REFERENCE USER_TYPE diff --git a/compiler/testData/psi/secondaryConstructors/recoveryWithoutBodyWrongDelegationName.kt b/compiler/testData/psi/secondaryConstructors/recoveryWithoutBodyWrongDelegationName.kt index d29ce5ba201..4db2af91c6b 100644 --- a/compiler/testData/psi/secondaryConstructors/recoveryWithoutBodyWrongDelegationName.kt +++ b/compiler/testData/psi/secondaryConstructors/recoveryWithoutBodyWrongDelegationName.kt @@ -4,7 +4,7 @@ class A { constructor(): - ann fun foo() + @ann fun foo() constructor(): sup diff --git a/compiler/testData/psi/secondaryConstructors/recoveryWithoutBodyWrongDelegationName.txt b/compiler/testData/psi/secondaryConstructors/recoveryWithoutBodyWrongDelegationName.txt index 59d6cdf0f5f..ed7c8da1f38 100644 --- a/compiler/testData/psi/secondaryConstructors/recoveryWithoutBodyWrongDelegationName.txt +++ b/compiler/testData/psi/secondaryConstructors/recoveryWithoutBodyWrongDelegationName.txt @@ -21,18 +21,14 @@ JetFile: recoveryWithoutBodyWrongDelegationName.kt CONSTRUCTOR_DELEGATION_CALL PsiErrorElement:Expecting a 'this' or 'super' constructor call + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('thi') + PsiErrorElement:Expecting member declaration + PsiElement(LPAR)('(') + PsiErrorElement:Expecting member declaration + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') PROPERTY - MODIFIER_LIST - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('thi') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') PsiElement(val)('val') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('x') @@ -56,6 +52,7 @@ JetFile: recoveryWithoutBodyWrongDelegationName.kt FUN MODIFIER_LIST ANNOTATION_ENTRY + PsiElement(AT)('@') CONSTRUCTOR_CALLEE TYPE_REFERENCE USER_TYPE @@ -79,15 +76,10 @@ JetFile: recoveryWithoutBodyWrongDelegationName.kt CONSTRUCTOR_DELEGATION_CALL PsiErrorElement:Expecting a 'this' or 'super' constructor call + PsiErrorElement:Expecting member declaration + PsiElement(IDENTIFIER)('sup') + PsiWhiteSpace('\n\n ') SECONDARY_CONSTRUCTOR - MODIFIER_LIST - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('sup') - PsiWhiteSpace('\n\n ') PsiElement(constructor)('constructor') VALUE_PARAMETER_LIST PsiElement(LPAR)('(') @@ -97,18 +89,12 @@ JetFile: recoveryWithoutBodyWrongDelegationName.kt CONSTRUCTOR_DELEGATION_CALL PsiErrorElement:Expecting a 'this' or 'super' constructor call - MODIFIER_LIST - ANNOTATION_ENTRY - CONSTRUCTOR_CALLEE - TYPE_REFERENCE - USER_TYPE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('thi') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') PsiErrorElement:Expecting member declaration - + PsiElement(IDENTIFIER)('thi') + PsiErrorElement:Expecting member declaration + PsiElement(LPAR)('(') + PsiErrorElement:Expecting member declaration + PsiElement(RPAR)(')') PsiWhiteSpace('\n') PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n')