Drop obsolete annotations syntax

This commit is contained in:
Denis Zharkov
2015-06-09 13:55:03 +03:00
parent 26864a4407
commit cf4b1ab7cd
133 changed files with 584 additions and 887 deletions
@@ -72,7 +72,6 @@ public class JetExpressionParsing extends AbstractJetParsing {
// Prefix // Prefix
MINUS, PLUS, MINUSMINUS, PLUSPLUS, MINUS, PLUS, MINUSMINUS, PLUSPLUS,
EXCL, EXCLEXCL, // Joining complex tokens makes it necessary to put EXCLEXCL here EXCL, EXCLEXCL, // Joining complex tokens makes it necessary to put EXCLEXCL here
LBRACKET,
// Atomic // Atomic
COLONCOLON, // callable reference COLONCOLON, // callable reference
@@ -121,7 +120,6 @@ public class JetExpressionParsing extends AbstractJetParsing {
EXPRESSION_FIRST, EXPRESSION_FIRST,
TokenSet.create( TokenSet.create(
// declaration // declaration
LBRACKET, // annotation
FUN_KEYWORD, FUN_KEYWORD,
VAL_KEYWORD, VAR_KEYWORD, VAL_KEYWORD, VAR_KEYWORD,
TRAIT_KEYWORD, TRAIT_KEYWORD,
@@ -343,7 +341,7 @@ public class JetExpressionParsing extends AbstractJetParsing {
private void parsePrefixExpression() { private void parsePrefixExpression() {
// System.out.println("pre at " + myBuilder.getTokenText()); // System.out.println("pre at " + myBuilder.getTokenText());
if (at(LBRACKET) || at(AT)) { if (at(AT)) {
if (!parseLocalDeclaration()) { if (!parseLocalDeclaration()) {
PsiBuilder.Marker expression = mark(); PsiBuilder.Marker expression = mark();
myJetParsing.parseAnnotations(ONLY_ESCAPED_REGULAR_ANNOTATIONS); myJetParsing.parseAnnotations(ONLY_ESCAPED_REGULAR_ANNOTATIONS);
@@ -453,8 +453,8 @@ public class JetParsing extends AbstractJetParsing {
else if (tryParseModifier(tokenConsumer)) { else if (tryParseModifier(tokenConsumer)) {
// modifier advanced // modifier advanced
} }
else if (at(LBRACKET) || (annotationParsingMode.allowShortAnnotations && at(IDENTIFIER))) { else if (annotationParsingMode.allowShortAnnotations && at(IDENTIFIER)) {
parseAnnotation(annotationParsingMode); parseAnnotationEntry(annotationParsingMode);
} }
else { else {
break; break;
@@ -534,10 +534,7 @@ public class JetParsing extends AbstractJetParsing {
* ; * ;
*/ */
private boolean parseAnnotation(AnnotationParsingMode mode) { private boolean parseAnnotation(AnnotationParsingMode mode) {
if (at(LBRACKET)) { if (mode.allowShortAnnotations && at(IDENTIFIER)) {
return parseAnnotationList(mode, false);
}
else if (mode.allowShortAnnotations && at(IDENTIFIER)) {
return parseAnnotationEntry(mode); return parseAnnotationEntry(mode);
} }
else if (at(AT)) { else if (at(AT)) {
@@ -559,7 +556,7 @@ public class JetParsing extends AbstractJetParsing {
return parseAnnotationEntry(mode); return parseAnnotationEntry(mode);
} }
else if (tokenToMatch == LBRACKET) { else if (tokenToMatch == LBRACKET) {
return parseAnnotationList(mode, true); return parseAnnotationList(mode);
} }
else { else {
if (isTargetedAnnotation) { if (isTargetedAnnotation) {
@@ -580,14 +577,13 @@ public class JetParsing extends AbstractJetParsing {
return false; return false;
} }
private boolean parseAnnotationList(AnnotationParsingMode mode, boolean expectAtSymbol) { private boolean parseAnnotationList(AnnotationParsingMode mode) {
assert !expectAtSymbol || _at(AT); assert _at(AT);
assert expectAtSymbol || _at(LBRACKET);
PsiBuilder.Marker annotation = mark(); PsiBuilder.Marker annotation = mark();
myBuilder.disableNewlines(); myBuilder.disableNewlines();
advance(); // AT or LBRACKET advance(); // AT
if (!parseAnnotationTargetIfNeeded(mode)) { if (!parseAnnotationTargetIfNeeded(mode)) {
annotation.rollbackTo(); annotation.rollbackTo();
@@ -595,10 +591,8 @@ public class JetParsing extends AbstractJetParsing {
return false; return false;
} }
if (expectAtSymbol) { assert _at(LBRACKET);
assert _at(LBRACKET); advance(); // LBRACKET
advance(); // LBRACKET
}
if (!at(IDENTIFIER) && !at(AT)) { if (!at(IDENTIFIER) && !at(AT)) {
error("Expecting a list of annotations"); error("Expecting a list of annotations");
@@ -1389,7 +1383,7 @@ public class JetParsing extends AbstractJetParsing {
if (!at(LPAR)) { if (!at(LPAR)) {
// Account for Jet-114 (val a : int get {...}) // Account for Jet-114 (val a : int get {...})
TokenSet ACCESSOR_FIRST_OR_PROPERTY_END = TokenSet.orSet(MODIFIER_KEYWORDS, TokenSet.create(LBRACKET, AT, GET_KEYWORD, SET_KEYWORD, EOL_OR_SEMICOLON, RBRACE)); TokenSet ACCESSOR_FIRST_OR_PROPERTY_END = TokenSet.orSet(MODIFIER_KEYWORDS, TokenSet.create(AT, GET_KEYWORD, SET_KEYWORD, EOL_OR_SEMICOLON, RBRACE));
if (!atSet(ACCESSOR_FIRST_OR_PROPERTY_END)) { if (!atSet(ACCESSOR_FIRST_OR_PROPERTY_END)) {
errorUntil("Accessor body expected", TokenSet.orSet(ACCESSOR_FIRST_OR_PROPERTY_END, TokenSet.create(LBRACE, LPAR, EQ))); errorUntil("Accessor body expected", TokenSet.orSet(ACCESSOR_FIRST_OR_PROPERTY_END, TokenSet.create(LBRACE, LPAR, EQ)));
} }
+1 -1
View File
@@ -1,4 +1,4 @@
[file:volatile] @file:[volatile]
/** /**
* Doc comment * Doc comment
*/ */
+3 -2
View File
@@ -1,9 +1,10 @@
JetFile: DocCommentAfterFileAnnotations.kt JetFile: DocCommentAfterFileAnnotations.kt
FILE_ANNOTATION_LIST FILE_ANNOTATION_LIST
ANNOTATION ANNOTATION
PsiElement(LBRACKET)('[') PsiElement(AT)('@')
PsiElement(file)('file') PsiElement(file)('file')
PsiElement(COLON)(':') PsiElement(COLON)(':')
PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
TYPE_REFERENCE TYPE_REFERENCE
@@ -31,4 +32,4 @@ JetFile: DocCommentAfterFileAnnotations.kt
PsiElement(IDENTIFIER)('C') PsiElement(IDENTIFIER)('C')
CLASS_BODY CLASS_BODY
PsiElement(LBRACE)('{') PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}') PsiElement(RBRACE)('}')
+1 -1
View File
@@ -1,5 +1,5 @@
dynamic class dynamic<dynamic>(dynamic: dynamic) : dynamic { dynamic class dynamic<dynamic>(dynamic: dynamic) : dynamic {
[dynamic] fun dynamic() { @dynamic fun dynamic() {
val dynamic = 1 val dynamic = 1
dynamic::foo dynamic::foo
} }
+7 -9
View File
@@ -45,15 +45,13 @@ JetFile: DynamicSoftKeyword.kt
PsiWhiteSpace('\n ') PsiWhiteSpace('\n ')
FUN FUN
MODIFIER_LIST MODIFIER_LIST
ANNOTATION ANNOTATION_ENTRY
PsiElement(LBRACKET)('[') PsiElement(AT)('@')
ANNOTATION_ENTRY CONSTRUCTOR_CALLEE
CONSTRUCTOR_CALLEE TYPE_REFERENCE
TYPE_REFERENCE USER_TYPE
USER_TYPE REFERENCE_EXPRESSION
REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('dynamic')
PsiElement(IDENTIFIER)('dynamic')
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
PsiElement(fun)('fun') PsiElement(fun)('fun')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
+1 -1
View File
@@ -1,6 +1,6 @@
fun foo( fun foo(
p1: dynamic, p1: dynamic,
p2: [a] dynamic, p2: @a dynamic,
p3: foo.dynamic, p3: foo.dynamic,
p4: dynamic.foo, p4: dynamic.foo,
p5: dynamic<T>, p5: dynamic<T>,
+7 -9
View File
@@ -24,15 +24,13 @@ JetFile: DynamicTypes.kt
PsiElement(COLON)(':') PsiElement(COLON)(':')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION_ENTRY
PsiElement(LBRACKET)('[') PsiElement(AT)('@')
ANNOTATION_ENTRY CONSTRUCTOR_CALLEE
CONSTRUCTOR_CALLEE TYPE_REFERENCE
TYPE_REFERENCE USER_TYPE
USER_TYPE REFERENCE_EXPRESSION
REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a')
PsiElement(IDENTIFIER)('a')
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
DYNAMIC_TYPE DYNAMIC_TYPE
PsiElement(dynamic)('dynamic') PsiElement(dynamic)('dynamic')
+2 -2
View File
@@ -6,8 +6,8 @@ fun foo() {
typealias x = t typealias x = t
var r var r
[a] var foo = 4 @a var foo = 4
1 1
[a] val f @a val f
} }
+15 -19
View File
@@ -51,15 +51,13 @@ JetFile: EOLsOnRollback.kt
PsiWhiteSpace('\n\n ') PsiWhiteSpace('\n\n ')
PROPERTY PROPERTY
MODIFIER_LIST MODIFIER_LIST
ANNOTATION ANNOTATION_ENTRY
PsiElement(LBRACKET)('[') PsiElement(AT)('@')
ANNOTATION_ENTRY CONSTRUCTOR_CALLEE
CONSTRUCTOR_CALLEE TYPE_REFERENCE
TYPE_REFERENCE USER_TYPE
USER_TYPE REFERENCE_EXPRESSION
REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a')
PsiElement(IDENTIFIER)('a')
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
PsiElement(var)('var') PsiElement(var)('var')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
@@ -75,18 +73,16 @@ JetFile: EOLsOnRollback.kt
PsiWhiteSpace('\n ') PsiWhiteSpace('\n ')
PROPERTY PROPERTY
MODIFIER_LIST MODIFIER_LIST
ANNOTATION ANNOTATION_ENTRY
PsiElement(LBRACKET)('[') PsiElement(AT)('@')
ANNOTATION_ENTRY CONSTRUCTOR_CALLEE
CONSTRUCTOR_CALLEE TYPE_REFERENCE
TYPE_REFERENCE USER_TYPE
USER_TYPE REFERENCE_EXPRESSION
REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a')
PsiElement(IDENTIFIER)('a')
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
PsiElement(val)('val') PsiElement(val)('val')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('f') PsiElement(IDENTIFIER)('f')
PsiWhiteSpace('\n') PsiWhiteSpace('\n')
PsiElement(RBRACE)('}') PsiElement(RBRACE)('}')
+13 -13
View File
@@ -1,37 +1,37 @@
val a = fun () val a = fun ()
val a = fun name() val a = fun name()
val a = fun T.name() val a = fun T.name()
val a = fun [a] T.(a : foo) : bar val a = fun @[a] T.(a : foo) : bar
val a = fun [a] T.name(a : foo) : bar val a = fun @[a] T.name(a : foo) : bar
val a = fun [a()] T.<T : (a) -> b>(a : foo) : bar val a = fun @[a()] T.<T : (a) -> b>(a : foo) : bar
fun c() = fun (); fun c() = fun ();
fun c() = fun name(); fun c() = fun name();
fun c() = fun [a] T.(); fun c() = fun @[a] T.();
fun c() = fun [a] T.(a : foo) : bar; fun c() = fun @[a] T.(a : foo) : bar;
fun c() = fun [a()] T.<T : (a) -> b>(a : foo) : bar; fun c() = fun @[a()] T.<T : (a) -> b>(a : foo) : bar;
val d = fun () = a val d = fun () = a
val d = fun name() = a val d = fun name() = a
val a = [a] fun () val a = @[a] fun ()
val b = fun <T> () where T: A val b = fun <T> () where T: A
fun outer() { fun outer() {
bar(fun () {}) bar(fun () {})
bar(fun name() {}) bar(fun name() {})
bar(fun [a] T.() {}) bar(fun @[a] T.() {})
bar(fun [a] T.name() {}) bar(fun @[a] T.name() {})
bar(fun [a] T.(a : foo) : bar {}) bar(fun @[a] T.(a : foo) : bar {})
bar(fun [a()] T.<T : (a) -> b>(a : foo) : bar {}) bar(fun @[a()] T.<T : (a) -> b>(a : foo) : bar {})
bar {fun [a()] T.<T : [a] (a) -> b>(a : foo) : bar {}} bar {fun @[a()] T.<T : @[a] (a) -> b>(a : foo) : bar {}}
bar {fun A?.() : bar?} bar {fun A?.() : bar?}
bar {fun A? .() : bar?} bar {fun A? .() : bar?}
bar(fun () = a) bar(fun () = a)
bar(fun name() = a) bar(fun name() = a)
bar([a] fun name() = a) bar(@[a] fun name() = a)
} }
+14
View File
@@ -64,6 +64,7 @@ JetFile: FunctionExpressions.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -109,6 +110,7 @@ JetFile: FunctionExpressions.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -155,6 +157,7 @@ JetFile: FunctionExpressions.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -268,6 +271,7 @@ JetFile: FunctionExpressions.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -301,6 +305,7 @@ JetFile: FunctionExpressions.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -350,6 +355,7 @@ JetFile: FunctionExpressions.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -461,6 +467,7 @@ JetFile: FunctionExpressions.kt
FUN FUN
MODIFIER_LIST MODIFIER_LIST
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -568,6 +575,7 @@ JetFile: FunctionExpressions.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -601,6 +609,7 @@ JetFile: FunctionExpressions.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -635,6 +644,7 @@ JetFile: FunctionExpressions.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -684,6 +694,7 @@ JetFile: FunctionExpressions.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -764,6 +775,7 @@ JetFile: FunctionExpressions.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -789,6 +801,7 @@ JetFile: FunctionExpressions.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -955,6 +968,7 @@ JetFile: FunctionExpressions.kt
FUN FUN
MODIFIER_LIST MODIFIER_LIST
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
+4 -4
View File
@@ -1,10 +1,10 @@
val a = fun ) val a = fun )
val a = fun foo) val a = fun foo)
val a = fun [a] T.foo(a : ) : bar val a = fun @[a] T.foo(a : ) : bar
val a = fun [a()] T.foo<>(a : foo) : bar val a = fun @[a()] T.foo<>(a : foo) : bar
val a = fun [a()] T.<>(a : foo) : bar val a = fun @[a()] T.<>(a : foo) : bar
val a = fun T.foo<T, , T>(a : foo) : bar val a = fun T.foo<T, , T>(a : foo) : bar
val a = fun T.foo<, T, , T>(a : foo) : bar val a = fun T.foo<, T, , T>(a : foo) : bar
@@ -24,7 +24,7 @@ fun outer() {
bar(fun T) bar(fun T)
bar(fun T.) bar(fun T.)
bar(fun [a]) bar(fun @[a])
bar(public fun ()) bar(public fun ())
+4
View File
@@ -46,6 +46,7 @@ JetFile: FunctionExpressions_ERR.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -91,6 +92,7 @@ JetFile: FunctionExpressions_ERR.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -145,6 +147,7 @@ JetFile: FunctionExpressions_ERR.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -546,6 +549,7 @@ JetFile: FunctionExpressions_ERR.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
PsiErrorElement:Annotations are not allowed in this position PsiErrorElement:Annotations are not allowed in this position
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
+1 -1
View File
@@ -26,7 +26,7 @@ fun foo() {
{T.(a) : T -> a} {T.(a) : T -> a}
{x, y -> 1} {x, y -> 1}
{[a] x, [b] y, [c] z -> 1} {@[a] x, @[b] y, @[c] z -> 1}
{((a: Int = object { fun t() {} }) -> Int).(x: Int) : String -> "" } {((a: Int = object { fun t() {} }) -> Int).(x: Int) : String -> "" }
{ A.B<String>.(x: Int) -> } { A.B<String>.(x: Int) -> }
+3
View File
@@ -463,6 +463,7 @@ JetFile: FunctionLiterals.kt
BLOCK BLOCK
ANNOTATED_EXPRESSION ANNOTATED_EXPRESSION
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -477,6 +478,7 @@ JetFile: FunctionLiterals.kt
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line) PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
PsiElement(COMMA)(',') PsiElement(COMMA)(',')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
PsiElement(IDENTIFIER)('b') PsiElement(IDENTIFIER)('b')
PsiElement(RBRACKET)(']') PsiElement(RBRACKET)(']')
@@ -484,6 +486,7 @@ JetFile: FunctionLiterals.kt
PsiElement(IDENTIFIER)('y') PsiElement(IDENTIFIER)('y')
PsiElement(COMMA)(',') PsiElement(COMMA)(',')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
PsiElement(IDENTIFIER)('c') PsiElement(IDENTIFIER)('c')
PsiElement(RBRACKET)(']') PsiElement(RBRACKET)(']')
+7 -7
View File
@@ -1,14 +1,14 @@
typealias f = ([a] a) -> b typealias f = (@[a] a) -> b
typealias f = (a) -> b typealias f = (a) -> b
typealias f = () -> [x] b typealias f = () -> @[x] b
typealias f = () -> Unit typealias f = () -> Unit
typealias f = (a : [a] a) -> b typealias f = (a : @[a] a) -> b
typealias f = (a : a) -> b typealias f = (a : a) -> b
typealias f = () -> b typealias f = () -> b
typealias f = () -> Unit typealias f = () -> Unit
typealias f = (a : [a] a, foo, x : bar) -> b typealias f = (a : @[a] a, foo, x : bar) -> b
typealias f = (foo, a : a) -> b typealias f = (foo, a : a) -> b
typealias f = (foo, a : (a) -> b) -> b typealias f = (foo, a : (a) -> b) -> b
typealias f = (foo, a : (a) -> b) -> () -> Unit typealias f = (foo, a : (a) -> b) -> () -> Unit
@@ -19,6 +19,6 @@ typealias f = T.() -> Unit
typealias f = T.T.() -> Unit typealias f = T.T.() -> Unit
typealias f = T<A, B>.T<x>.() -> Unit typealias f = T<A, B>.T<x>.() -> Unit
typealias f = [a] T.() -> Unit typealias f = @[a] T.() -> Unit
typealias f = [a] T.T.() -> Unit typealias f = @[a] T.T.() -> Unit
typealias f = [a] T<A, B>.T<x>.() -> Unit typealias f = @[a] T<A, B>.T<x>.() -> Unit
+7
View File
@@ -17,6 +17,7 @@ JetFile: FunctionTypes.kt
VALUE_PARAMETER VALUE_PARAMETER
MODIFIER_LIST MODIFIER_LIST
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -81,6 +82,7 @@ JetFile: FunctionTypes.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -132,6 +134,7 @@ JetFile: FunctionTypes.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -240,6 +243,7 @@ JetFile: FunctionTypes.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -544,6 +548,7 @@ JetFile: FunctionTypes.kt
FUNCTION_TYPE_RECEIVER FUNCTION_TYPE_RECEIVER
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -580,6 +585,7 @@ JetFile: FunctionTypes.kt
FUNCTION_TYPE_RECEIVER FUNCTION_TYPE_RECEIVER
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -620,6 +626,7 @@ JetFile: FunctionTypes.kt
FUNCTION_TYPE_RECEIVER FUNCTION_TYPE_RECEIVER
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
+13 -13
View File
@@ -1,22 +1,22 @@
fun foo() fun foo()
fun [a] foo() fun @[a] foo()
fun [a] T.foo() fun @[a] T.foo()
fun [a] T.foo(a : foo) : bar fun @[a] T.foo(a : foo) : bar
fun [a()] T.foo<T : (a) -> b>(a : foo) : bar fun @[a()] T.foo<T : (a) -> b>(a : foo) : bar
fun foo(); fun foo();
fun [a] foo(); fun @[a] foo();
fun [a] T.foo(); fun @[a] T.foo();
fun [a] T.foo(a : foo) : bar; fun @[a] T.foo(a : foo) : bar;
fun [a()] T.foo<T : (a) -> b>(a : foo) : bar; fun @[a()] T.foo<T : (a) -> b>(a : foo) : bar;
fun foo() {} fun foo() {}
fun [a] foo() {} fun @[a] foo() {}
fun [a] T.foo() {} fun @[a] T.foo() {}
fun [a] T.foo(a : foo) : bar {} fun @[a] T.foo(a : foo) : bar {}
fun [a()] T.foo<T : (a) -> b>(a : foo) : bar {} fun @[a()] T.foo<T : (a) -> b>(a : foo) : bar {}
fun [a()] T.foo<T : [a] (a) -> b>(a : foo) : bar {} fun @[a()] T.foo<T : @[a] (a) -> b>(a : foo) : bar {}
fun A?.foo() : bar? fun A?.foo() : bar?
fun A? .foo() : bar? fun A? .foo() : bar?
+14
View File
@@ -16,6 +16,7 @@ JetFile: Functions.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
PsiErrorElement:Annotations are not allowed in this position PsiErrorElement:Annotations are not allowed in this position
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -35,6 +36,7 @@ JetFile: Functions.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -58,6 +60,7 @@ JetFile: Functions.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -97,6 +100,7 @@ JetFile: Functions.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -173,6 +177,7 @@ JetFile: Functions.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
PsiErrorElement:Annotations are not allowed in this position PsiErrorElement:Annotations are not allowed in this position
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -193,6 +198,7 @@ JetFile: Functions.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -217,6 +223,7 @@ JetFile: Functions.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -257,6 +264,7 @@ JetFile: Functions.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -337,6 +345,7 @@ JetFile: Functions.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
PsiErrorElement:Annotations are not allowed in this position PsiErrorElement:Annotations are not allowed in this position
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -360,6 +369,7 @@ JetFile: Functions.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -387,6 +397,7 @@ JetFile: Functions.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -430,6 +441,7 @@ JetFile: Functions.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -501,6 +513,7 @@ JetFile: Functions.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -527,6 +540,7 @@ JetFile: Functions.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
+4 -4
View File
@@ -9,10 +9,10 @@ fun T.(a : foo) : bar;
fun T.<T : (a) -> b>(a : foo) : bar; fun T.<T : (a) -> b>(a : foo) : bar;
fun () {} fun () {}
fun [a] T.() {} fun @[a] T.() {}
fun [a] T.(a : foo) : bar {} fun @[a] T.(a : foo) : bar {}
fun [a()] T.<T : (a) -> b>(a : foo) : bar {} fun @[a()] T.<T : (a) -> b>(a : foo) : bar {}
fun [a()] T.<T : [a] (a) -> b>(a : foo) : bar {} fun @[a()] T.<T : @[a] (a) -> b>(a : foo) : bar {}
fun A?.() : bar? fun A?.() : bar?
fun A? .() : bar? fun A? .() : bar?
+5
View File
@@ -223,6 +223,7 @@ JetFile: FunctionsWithoutName.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -249,6 +250,7 @@ JetFile: FunctionsWithoutName.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -291,6 +293,7 @@ JetFile: FunctionsWithoutName.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -361,6 +364,7 @@ JetFile: FunctionsWithoutName.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -386,6 +390,7 @@ JetFile: FunctionsWithoutName.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
+5 -5
View File
@@ -1,8 +1,8 @@
fun ) fun )
fun [a] T.(a : ) : bar fun @[a] T.(a : ) : bar
fun [a()] T.<>(a : foo) : bar fun @[a()] T.<>(a : foo) : bar
fun [a()] T.<T, , T>(a : foo) : bar fun @[a()] T.<T, , T>(a : foo) : bar
fun [a()] T.<, T, , T>(a : foo) : bar fun @[a()] T.<, T, , T>(a : foo) : bar
fun [a()] T.<T, T>(, a : foo, , a: b) : bar fun @[a()] T.<T, T>(, a : foo, , a: b) : bar
fun () : = a; fun () : = a;
+5
View File
@@ -16,6 +16,7 @@ JetFile: FunctionsWithoutName_ERR.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -53,6 +54,7 @@ JetFile: FunctionsWithoutName_ERR.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -99,6 +101,7 @@ JetFile: FunctionsWithoutName_ERR.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -152,6 +155,7 @@ JetFile: FunctionsWithoutName_ERR.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -208,6 +212,7 @@ JetFile: FunctionsWithoutName_ERR.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
+5 -5
View File
@@ -1,9 +1,9 @@
fun foo) fun foo)
fun [a] T.foo(a : ) : bar fun @[a] T.foo(a : ) : bar
fun [a()] T.foo<>(a : foo) : bar fun @[a()] T.foo<>(a : foo) : bar
fun [a()] T.foo<T, , T>(a : foo) : bar fun @[a()] T.foo<T, , T>(a : foo) : bar
fun [a()] T.foo<, T, , T>(a : foo) : bar fun @[a()] T.foo<, T, , T>(a : foo) : bar
fun [a()] T.foo<T, T>(, a : foo, , a: b) : bar fun @[a()] T.foo<T, T>(, a : foo, , a: b) : bar
fun foo() : = a; fun foo() : = a;
fun foo() = ; fun foo() = ;
+5
View File
@@ -17,6 +17,7 @@ JetFile: Functions_ERR.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -55,6 +56,7 @@ JetFile: Functions_ERR.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -102,6 +104,7 @@ JetFile: Functions_ERR.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -156,6 +159,7 @@ JetFile: Functions_ERR.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -213,6 +217,7 @@ JetFile: Functions_ERR.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
+1 -1
View File
@@ -1,3 +1,3 @@
[file:volatile] @file:[volatile]
// class C // class C
class C{} class C{}
+2 -1
View File
@@ -1,9 +1,10 @@
JetFile: LineCommentAfterFileAnnotations.kt JetFile: LineCommentAfterFileAnnotations.kt
FILE_ANNOTATION_LIST FILE_ANNOTATION_LIST
ANNOTATION ANNOTATION
PsiElement(LBRACKET)('[') PsiElement(AT)('@')
PsiElement(file)('file') PsiElement(file)('file')
PsiElement(COLON)(':') PsiElement(COLON)(':')
PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
TYPE_REFERENCE TYPE_REFERENCE
+3 -3
View File
@@ -1,11 +1,11 @@
fun foo() { fun foo() {
out out
1 1
[a] abstract class foof {} @a abstract class foof {}
abstract [a] class foof {} abstract @a class foof {}
out val foo = 5 out val foo = 5
[a] var foo = 4 @a var foo = 4
typealias f = T.() -> Unit typealias f = T.() -> Unit
} }
+21 -27
View File
@@ -22,15 +22,13 @@ JetFile: LocalDeclarations.kt
PsiWhiteSpace('\n ') PsiWhiteSpace('\n ')
CLASS CLASS
MODIFIER_LIST MODIFIER_LIST
ANNOTATION ANNOTATION_ENTRY
PsiElement(LBRACKET)('[') PsiElement(AT)('@')
ANNOTATION_ENTRY CONSTRUCTOR_CALLEE
CONSTRUCTOR_CALLEE TYPE_REFERENCE
TYPE_REFERENCE USER_TYPE
USER_TYPE REFERENCE_EXPRESSION
REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a')
PsiElement(IDENTIFIER)('a')
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
PsiElement(abstract)('abstract') PsiElement(abstract)('abstract')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
@@ -46,15 +44,13 @@ JetFile: LocalDeclarations.kt
MODIFIER_LIST MODIFIER_LIST
PsiElement(abstract)('abstract') PsiElement(abstract)('abstract')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
ANNOTATION ANNOTATION_ENTRY
PsiElement(LBRACKET)('[') PsiElement(AT)('@')
ANNOTATION_ENTRY CONSTRUCTOR_CALLEE
CONSTRUCTOR_CALLEE TYPE_REFERENCE
TYPE_REFERENCE USER_TYPE
USER_TYPE REFERENCE_EXPRESSION
REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a')
PsiElement(IDENTIFIER)('a')
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
PsiElement(class)('class') PsiElement(class)('class')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
@@ -79,15 +75,13 @@ JetFile: LocalDeclarations.kt
PsiWhiteSpace('\n ') PsiWhiteSpace('\n ')
PROPERTY PROPERTY
MODIFIER_LIST MODIFIER_LIST
ANNOTATION ANNOTATION_ENTRY
PsiElement(LBRACKET)('[') PsiElement(AT)('@')
ANNOTATION_ENTRY CONSTRUCTOR_CALLEE
CONSTRUCTOR_CALLEE TYPE_REFERENCE
TYPE_REFERENCE USER_TYPE
USER_TYPE REFERENCE_EXPRESSION
REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a')
PsiElement(IDENTIFIER)('a')
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
PsiElement(var)('var') PsiElement(var)('var')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
+2 -2
View File
@@ -1,11 +1,11 @@
val foo = bar.foo.bar val foo = bar.foo.bar
val foo val foo
val [a] foo val @[a] foo
val foo.bar val foo.bar
val foo : T val foo : T
val [a] foo = bar val @[a] foo = bar
val foo.bar val foo.bar
get() {} get() {}
set(sad) = foo set(sad) = foo
+2
View File
@@ -31,6 +31,7 @@ JetFile: Properties.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
PsiErrorElement:Annotations are not allowed in this position PsiErrorElement:Annotations are not allowed in this position
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -69,6 +70,7 @@ JetFile: Properties.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
PsiErrorElement:Annotations are not allowed in this position PsiErrorElement:Annotations are not allowed in this position
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
+2 -2
View File
@@ -13,8 +13,8 @@ class Foo() {
} }
var b5 : Int get abstract set var b5 : Int get abstract set
var b6 : Int get [a] abstract set var b6 : Int get @[a] abstract set
var b7 : Int get [a] abstract {} var b7 : Int get @[a] abstract {}
var b8 : Int get @a abstract set var b8 : Int get @a abstract set
var b9 : Int get @a abstract {} var b9 : Int get @a abstract {}
} }
@@ -227,6 +227,7 @@ JetFile: PropertiesFollowedByInitializers.kt
PROPERTY_ACCESSOR PROPERTY_ACCESSOR
MODIFIER_LIST MODIFIER_LIST
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -256,6 +257,7 @@ JetFile: PropertiesFollowedByInitializers.kt
PsiElement(get)('get') PsiElement(get)('get')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
PsiErrorElement:Property getter or setter expected PsiErrorElement:Property getter or setter expected
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
PsiElement(IDENTIFIER)('a') PsiElement(IDENTIFIER)('a')
PsiElement(RBRACKET)(']') PsiElement(RBRACKET)(']')
+2 -2
View File
@@ -4,10 +4,10 @@ var f :
val foo : val foo :
val : val :
val : Int val : Int
val [a foo = foo val @[a foo = foo
val foo.bar. val foo.bar.
val foo. val foo.
val [a] foo : = bar val @a foo : = bar
val foo.bar val foo.bar
public () {} public () {}
() = foo () = foo
+8 -9
View File
@@ -79,6 +79,7 @@ JetFile: Properties_ERR.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
PsiErrorElement:Annotations are not allowed in this position PsiErrorElement:Annotations are not allowed in this position
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -131,15 +132,13 @@ JetFile: Properties_ERR.kt
PsiElement(val)('val') PsiElement(val)('val')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
PsiErrorElement:Annotations are not allowed in this position PsiErrorElement:Annotations are not allowed in this position
ANNOTATION ANNOTATION_ENTRY
PsiElement(LBRACKET)('[') PsiElement(AT)('@')
ANNOTATION_ENTRY CONSTRUCTOR_CALLEE
CONSTRUCTOR_CALLEE TYPE_REFERENCE
TYPE_REFERENCE USER_TYPE
USER_TYPE REFERENCE_EXPRESSION
REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a')
PsiElement(IDENTIFIER)('a')
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('foo') PsiElement(IDENTIFIER)('foo')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
+1 -1
View File
@@ -1,4 +1,4 @@
[`return`] fun `package`() { @`return` fun `package`() {
`class`() `class`()
} }
+7 -9
View File
@@ -5,15 +5,13 @@ JetFile: QuotedIdentifiers.kt
<empty list> <empty list>
FUN FUN
MODIFIER_LIST MODIFIER_LIST
ANNOTATION ANNOTATION_ENTRY
PsiElement(LBRACKET)('[') PsiElement(AT)('@')
ANNOTATION_ENTRY CONSTRUCTOR_CALLEE
CONSTRUCTOR_CALLEE TYPE_REFERENCE
TYPE_REFERENCE USER_TYPE
USER_TYPE REFERENCE_EXPRESSION
REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('`return`')
PsiElement(IDENTIFIER)('`return`')
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
PsiElement(fun)('fun') PsiElement(fun)('fun')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
+2 -2
View File
@@ -1,6 +1,6 @@
fun <A, B> foo() fun <A, B> foo()
fun <A, B> [a] foo() fun <A, B> @[a] foo()
fun <A, B> [a] T.foo() fun <A, B> @[a] T.foo()
val <A> List<A>.foo val <A> List<A>.foo
var <A> List<A>.foo var <A> List<A>.foo
+2
View File
@@ -36,6 +36,7 @@ JetFile: TypeParametersBeforeName.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
PsiErrorElement:Annotations are not allowed in this position PsiErrorElement:Annotations are not allowed in this position
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -65,6 +66,7 @@ JetFile: TypeParametersBeforeName.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
+2 -2
View File
@@ -1,5 +1,5 @@
fun foo() { fun foo() {
[a] foo @[a] foo
1 1
[a] this @[a] this
} }
@@ -16,6 +16,7 @@ JetFile: AnnotatedExpressions.kt
PsiWhiteSpace('\n ') PsiWhiteSpace('\n ')
ANNOTATED_EXPRESSION ANNOTATED_EXPRESSION
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -33,6 +34,7 @@ JetFile: AnnotatedExpressions.kt
PsiWhiteSpace('\n ') PsiWhiteSpace('\n ')
ANNOTATED_EXPRESSION ANNOTATED_EXPRESSION
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
+7 -7
View File
@@ -12,24 +12,24 @@ private
protected protected
public public
internal internal
[foo<A, B>(a, b) ina foo.bar.goo.doo<f>.foo<bar, goo>.foo] @[foo<A, B>(a, b) ina foo.bar.goo.doo<f>.foo<bar, goo>.foo]
[df] @[df]
in in
[sdfsdf] @[sdfsdf]
out out
ref ref
class Bar<abstract class Bar<abstract
open open
[sdfsdf(1+1) a] @[sdfsdf(1+1) a]
[sdfsdf(1+1)] @[sdfsdf(1+1)]
[a() sdfsdf(1+1)] @[a() sdfsdf(1+1)]
enum enum
open open
annotation annotation
override override
open open
abstract abstract
[sdfsd sdfsd a.b.f.c] @[sdfsd sdfsd a.b.f.c]
private private
protected protected
public public
+7
View File
@@ -42,6 +42,7 @@ JetFile: Annotations.kt
PsiElement(internal)('internal') PsiElement(internal)('internal')
PsiWhiteSpace('\n') PsiWhiteSpace('\n')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -135,6 +136,7 @@ JetFile: Annotations.kt
PsiElement(RBRACKET)(']') PsiElement(RBRACKET)(']')
PsiWhiteSpace('\n') PsiWhiteSpace('\n')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -147,6 +149,7 @@ JetFile: Annotations.kt
PsiElement(in)('in') PsiElement(in)('in')
PsiWhiteSpace('\n') PsiWhiteSpace('\n')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -177,6 +180,7 @@ JetFile: Annotations.kt
PsiElement(open)('open') PsiElement(open)('open')
PsiWhiteSpace('\n') PsiWhiteSpace('\n')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -205,6 +209,7 @@ JetFile: Annotations.kt
PsiElement(RBRACKET)(']') PsiElement(RBRACKET)(']')
PsiWhiteSpace('\n') PsiWhiteSpace('\n')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -226,6 +231,7 @@ JetFile: Annotations.kt
PsiElement(RBRACKET)(']') PsiElement(RBRACKET)(']')
PsiWhiteSpace('\n') PsiWhiteSpace('\n')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -269,6 +275,7 @@ JetFile: Annotations.kt
PsiElement(abstract)('abstract') PsiElement(abstract)('abstract')
PsiWhiteSpace('\n') PsiWhiteSpace('\n')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
+1 -1
View File
@@ -1,6 +1,6 @@
fun foo() { fun foo() {
when (e) { when (e) {
is [a] T -> d is @[a] T -> d
} }
} }
@@ -30,6 +30,7 @@ JetFile: AnnotationsOnPatterns.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
+6 -6
View File
@@ -8,16 +8,16 @@ annotation
override override
open open
abstract abstract
[] @[]
private private
protected protected
public public
internal internal
[foo<A, B>(a, b), ina foo.bar.goo.doo<f>.foo<bar, goo>.foo] @[foo<A, B>(a, b), ina foo.bar.goo.doo<f>.foo<bar, goo>.foo]
[df] @[df]
in in
[sdfsdf ] @[sdfsdf ]
[s fd d, ] @[s fd d, ]
out out
ref ref
class Bar<abstract class Bar<abstract
@@ -28,7 +28,7 @@ annotation
override override
open open
abstract abstract
[sdfsd sdfsd a.b.f.c] @[sdfsd sdfsd a.b.f.c]
private private
protected protected
public public
+6
View File
@@ -34,6 +34,7 @@ JetFile: Annotations_ERR.kt
PsiElement(abstract)('abstract') PsiElement(abstract)('abstract')
PsiWhiteSpace('\n') PsiWhiteSpace('\n')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
PsiErrorElement:Expecting a list of annotations PsiErrorElement:Expecting a list of annotations
<empty list> <empty list>
@@ -48,6 +49,7 @@ JetFile: Annotations_ERR.kt
PsiElement(internal)('internal') PsiElement(internal)('internal')
PsiWhiteSpace('\n') PsiWhiteSpace('\n')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -143,6 +145,7 @@ JetFile: Annotations_ERR.kt
PsiElement(RBRACKET)(']') PsiElement(RBRACKET)(']')
PsiWhiteSpace('\n') PsiWhiteSpace('\n')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -155,6 +158,7 @@ JetFile: Annotations_ERR.kt
PsiElement(in)('in') PsiElement(in)('in')
PsiWhiteSpace('\n') PsiWhiteSpace('\n')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -166,6 +170,7 @@ JetFile: Annotations_ERR.kt
PsiElement(RBRACKET)(']') PsiElement(RBRACKET)(']')
PsiWhiteSpace('\n') PsiWhiteSpace('\n')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -225,6 +230,7 @@ JetFile: Annotations_ERR.kt
PsiElement(abstract)('abstract') PsiElement(abstract)('abstract')
PsiWhiteSpace('\n') PsiWhiteSpace('\n')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
+3 -3
View File
@@ -1,5 +1,5 @@
class F(a : [a] [b] B) class F(a : @[a] @[b] B)
typealias f = [b] [x] F<[x] A, B> typealias f = @[b] @[x] F<@[x] A, B>
class C : [a] B, [c d] E by F, [g] H(), [i] () -> Unit class C : @[a] B, @[c d] E by F, @[g] H(), @[i] () -> Unit
+9
View File
@@ -17,6 +17,7 @@ JetFile: TypeAnnotations.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -27,6 +28,7 @@ JetFile: TypeAnnotations.kt
PsiElement(RBRACKET)(']') PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -50,6 +52,7 @@ JetFile: TypeAnnotations.kt
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -60,6 +63,7 @@ JetFile: TypeAnnotations.kt
PsiElement(RBRACKET)(']') PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -77,6 +81,7 @@ JetFile: TypeAnnotations.kt
TYPE_PROJECTION TYPE_PROJECTION
MODIFIER_LIST MODIFIER_LIST
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -110,6 +115,7 @@ JetFile: TypeAnnotations.kt
DELEGATOR_SUPER_CLASS DELEGATOR_SUPER_CLASS
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -127,6 +133,7 @@ JetFile: TypeAnnotations.kt
DELEGATOR_BY DELEGATOR_BY
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -157,6 +164,7 @@ JetFile: TypeAnnotations.kt
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -177,6 +185,7 @@ JetFile: TypeAnnotations.kt
DELEGATOR_SUPER_CLASS DELEGATOR_SUPER_CLASS
TYPE_REFERENCE TYPE_REFERENCE
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -1,4 +1,4 @@
private @ [Ann1(1)] Ann3("2") class A( private @ @[Ann1(1)] Ann3("2") class A(
@ private val x: Int, @ private val x: Int,
@ private var y: Int, @ private var y: Int,
@ open z: Int @ open z: Int
@@ -10,10 +10,10 @@ private @ [Ann1(1)] Ann3("2") class A(
@ @
[inline2] private @[inline2] private
fun inlineLocal() {} fun inlineLocal() {}
[Ann] @[Ann]
private private
@ @
@volatile var x = 1 @volatile var x = 1
@@ -11,6 +11,7 @@ JetFile: declarationsJustAtTyped.kt
PsiElement(AT)('@') PsiElement(AT)('@')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -145,6 +146,7 @@ JetFile: declarationsJustAtTyped.kt
PsiElement(AT)('@') PsiElement(AT)('@')
PsiWhiteSpace('\n\n ') PsiWhiteSpace('\n\n ')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -170,6 +172,7 @@ JetFile: declarationsJustAtTyped.kt
PROPERTY PROPERTY
MODIFIER_LIST MODIFIER_LIST
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
+1 -1
View File
@@ -1,5 +1,5 @@
enum class A { enum class A {
[Ann] @Ann(1) X : A() @[Ann] @Ann(1) X : A()
@Ann Y : A() {} @Ann Y : A() {}
+1
View File
@@ -17,6 +17,7 @@ JetFile: enumEntries.kt
ENUM_ENTRY ENUM_ENTRY
MODIFIER_LIST MODIFIER_LIST
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
+3 -3
View File
@@ -3,7 +3,7 @@ class A1 @Ann1("") ()
class A2 @Ann2("")(x: Int) : B { class A2 @Ann2("")(x: Int) : B {
} }
class A3 [Ann3] private @(x: Int) class A3 @[Ann3] private @(x: Int)
class A4 [Ann4] @private @(x: Int) class A4 @[Ann4] @private @(x: Int)
class A5 private @Ann4(x: Int) : B class A5 private @Ann4(x: Int) : B
class A6 [Ann5] @private @ [Ann6]() class A6 @[Ann5] @private @ @[Ann6]()
+5 -1
View File
@@ -84,6 +84,7 @@ JetFile: primaryConstructor.kt
PRIMARY_CONSTRUCTOR PRIMARY_CONSTRUCTOR
MODIFIER_LIST MODIFIER_LIST
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -117,6 +118,7 @@ JetFile: primaryConstructor.kt
PRIMARY_CONSTRUCTOR PRIMARY_CONSTRUCTOR
MODIFIER_LIST MODIFIER_LIST
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -192,6 +194,7 @@ JetFile: primaryConstructor.kt
PRIMARY_CONSTRUCTOR PRIMARY_CONSTRUCTOR
MODIFIER_LIST MODIFIER_LIST
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -207,6 +210,7 @@ JetFile: primaryConstructor.kt
PsiElement(AT)('@') PsiElement(AT)('@')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -217,4 +221,4 @@ JetFile: primaryConstructor.kt
PsiElement(RBRACKET)(']') PsiElement(RBRACKET)(']')
VALUE_PARAMETER_LIST VALUE_PARAMETER_LIST
PsiElement(LPAR)('(') PsiElement(LPAR)('(')
PsiElement(RPAR)(')') PsiElement(RPAR)(')')
+6 -6
View File
@@ -1,19 +1,19 @@
private @open [Ann1(1)] @Ann2("1") Ann3("2") class A( private @open @[Ann1(1)] @Ann2("1") Ann3("2") class A(
@volatile(1) private val x: @AnnType("3") @open Int, @volatile(1) private val x: @AnnType("3") @open Int,
@private var y: Int, @private var y: Int,
@open z: Int @open z: Int
) { ) {
@private [Ann3(2)] @Ann4("4") fun foo() { @private @[Ann3(2)] @Ann4("4") fun foo() {
@data class LocalClass @data class LocalClass
print(1) print(1)
@inline(option1, option2) @inline(option1, option2)
[inline2] private @[inline2] private
fun inlineLocal() {} fun inlineLocal() {}
[Ann] @[Ann]
private private
@abstract @abstract
@volatile var x = 1 @volatile var x = 1
@@ -22,7 +22,7 @@ private @open [Ann1(1)] @Ann2("1") Ann3("2") class A(
} }
val x: Int val x: Int
@inject [inline] private @open get() = 1 @inject @[inline] private @open get() = 1
@open @ann init {} @open @ann init {}
@@ -35,7 +35,7 @@ private @open [Ann1(1)] @Ann2("1") Ann3("2") class A(
@private @private
constructor() constructor()
fun <@ann("") [ann] T : R> foo() {} fun <@ann("") @[ann] T : R> foo() {}
} }
@private val x = 1 @private val x = 1
@@ -10,6 +10,7 @@ JetFile: validDeclarations.kt
PsiElement(open)('@open') PsiElement(open)('@open')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -156,6 +157,7 @@ JetFile: validDeclarations.kt
PsiElement(private)('@private') PsiElement(private)('@private')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -244,6 +246,7 @@ JetFile: validDeclarations.kt
PsiElement(RPAR)(')') PsiElement(RPAR)(')')
PsiWhiteSpace('\n\n ') PsiWhiteSpace('\n\n ')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -269,6 +272,7 @@ JetFile: validDeclarations.kt
PROPERTY PROPERTY
MODIFIER_LIST MODIFIER_LIST
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -365,6 +369,7 @@ JetFile: validDeclarations.kt
PsiElement(IDENTIFIER)('inject') PsiElement(IDENTIFIER)('inject')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -466,6 +471,7 @@ JetFile: validDeclarations.kt
PsiElement(RPAR)(')') PsiElement(RPAR)(')')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
+1 -1
View File
@@ -25,7 +25,7 @@ fun foo() {
label@simpleName label@simpleName
val x = @ann [ann] l@{ val x = @ann @[ann] l@{
a, b, c -> a a, b, c -> a
} }
} }
@@ -336,6 +336,7 @@ JetFile: validExpressions.kt
PsiElement(IDENTIFIER)('ann') PsiElement(IDENTIFIER)('ann')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
+3 -3
View File
@@ -1,12 +1,12 @@
fun foo() { fun foo() {
for (@volatile x in z) {} for (@volatile x in z) {}
for ([ann]) {} for (@[ann]) {}
for (@ in z) {} for (@ in z) {}
for ((x, private data @ann [ann] y) in x) {} for ((x, private data @ann @[ann] y) in x) {}
for (([ann], x) in pair) {} for ((@[ann], x) in pair) {}
for (volatile x in 1..100) {} for (volatile x in 1..100) {}
for (volatile(1) x in 1..100) {} for (volatile(1) x in 1..100) {}
+3
View File
@@ -49,6 +49,7 @@ JetFile: forParameters.kt
VALUE_PARAMETER VALUE_PARAMETER
MODIFIER_LIST MODIFIER_LIST
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -124,6 +125,7 @@ JetFile: forParameters.kt
PsiElement(IDENTIFIER)('ann') PsiElement(IDENTIFIER)('ann')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -157,6 +159,7 @@ JetFile: forParameters.kt
MULTI_VARIABLE_DECLARATION_ENTRY MULTI_VARIABLE_DECLARATION_ENTRY
MODIFIER_LIST MODIFIER_LIST
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
+4 -4
View File
@@ -7,7 +7,7 @@ fun foo() {
print(2) print(2)
} }
bar @ann [ann] { bar @ann @[ann] {
print(2) print(2)
} }
@@ -15,11 +15,11 @@ fun foo() {
print(1) print(1)
} }
bar() [ann] { bar() @[ann] {
print(2) print(2)
} }
bar() @ann [ann] { bar() @ann @[ann] {
print(2) print(2)
} }
@@ -30,7 +30,7 @@ fun foo() {
if (true) @ann { if (true) @ann {
} }
else [ann] @ann { else @[ann] @ann {
} }
+4
View File
@@ -91,6 +91,7 @@ JetFile: lambda.kt
PsiElement(IDENTIFIER)('ann') PsiElement(IDENTIFIER)('ann')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -161,6 +162,7 @@ JetFile: lambda.kt
FUNCTION_LITERAL_ARGUMENT FUNCTION_LITERAL_ARGUMENT
ANNOTATED_EXPRESSION ANNOTATED_EXPRESSION
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -205,6 +207,7 @@ JetFile: lambda.kt
PsiElement(IDENTIFIER)('ann') PsiElement(IDENTIFIER)('ann')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -292,6 +295,7 @@ JetFile: lambda.kt
ELSE ELSE
ANNOTATED_EXPRESSION ANNOTATED_EXPRESSION
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
+3 -3
View File
@@ -7,7 +7,7 @@ fun foo() {
print(1) print(1)
} }
bar @ [ann] { bar @ @[ann] {
print(2) print(2)
} }
@@ -19,7 +19,7 @@ fun foo() {
print(1) print(1)
} }
bar() [] @ { bar() @[] @ {
print(2) print(2)
} }
@@ -34,7 +34,7 @@ fun foo() {
if (true) @ { if (true) @ {
} }
else [ann] @ ann { else @[ann] @ ann {
} }
} }
+4 -1
View File
@@ -75,6 +75,7 @@ JetFile: lambdaRecovery.kt
PsiElement(AT)('@') PsiElement(AT)('@')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -173,6 +174,7 @@ JetFile: lambdaRecovery.kt
FUNCTION_LITERAL_ARGUMENT FUNCTION_LITERAL_ARGUMENT
ANNOTATED_EXPRESSION ANNOTATED_EXPRESSION
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
PsiErrorElement:Expecting a list of annotations PsiErrorElement:Expecting a list of annotations
<empty list> <empty list>
@@ -281,6 +283,7 @@ JetFile: lambdaRecovery.kt
ELSE ELSE
ANNOTATED_EXPRESSION ANNOTATED_EXPRESSION
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -306,4 +309,4 @@ JetFile: lambdaRecovery.kt
<empty list> <empty list>
PsiElement(RBRACE)('}') PsiElement(RBRACE)('}')
PsiWhiteSpace('\n') PsiWhiteSpace('\n')
PsiElement(RBRACE)('}') PsiElement(RBRACE)('}')
+2 -2
View File
@@ -1,6 +1,6 @@
fun foo() { fun foo() {
val (x, private data @ann [ann] y) = pair val (x, private data @ann @[ann] y) = pair
val ([ann], x) = pair val (@[ann], x) = pair
@volatile val (@ann x, y) = 1 @volatile val (@ann x, y) = 1
@volatile val (@ann x, y = 1 @volatile val (@ann x, y = 1
+2
View File
@@ -42,6 +42,7 @@ JetFile: multiDeclaration.kt
PsiElement(IDENTIFIER)('ann') PsiElement(IDENTIFIER)('ann')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -66,6 +67,7 @@ JetFile: multiDeclaration.kt
MULTI_VARIABLE_DECLARATION_ENTRY MULTI_VARIABLE_DECLARATION_ENTRY
MODIFIER_LIST MODIFIER_LIST
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -0,0 +1,9 @@
[data(1)] class A {
fun foo() {
[inline] fun bar() {
return 1
}
[suppress("1")] 1+1
}
}
@@ -0,0 +1,92 @@
JetFile: oldAnnotationsRecovery.kt
PACKAGE_DIRECTIVE
<empty list>
IMPORT_LIST
<empty list>
PsiErrorElement:Expecting a top level declaration
PsiElement(LBRACKET)('[')
MODIFIER_LIST
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('data')
VALUE_ARGUMENT_LIST
PsiElement(LPAR)('(')
VALUE_ARGUMENT
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('1')
PsiElement(RPAR)(')')
PsiErrorElement:Expecting a top level declaration
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ')
CLASS
PsiElement(class)('class')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('A')
PsiWhiteSpace(' ')
CLASS_BODY
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('foo')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
PsiErrorElement:Expecting an element
PsiElement(LBRACKET)('[')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('inline')
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ')
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('bar')
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
FUNCTION_LITERAL_EXPRESSION
FUNCTION_LITERAL
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
BLOCK
RETURN
PsiElement(return)('return')
PsiWhiteSpace(' ')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('1')
PsiWhiteSpace('\n ')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n ')
PsiErrorElement:Expecting an element
PsiElement(LBRACKET)('[')
CALL_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('suppress')
VALUE_ARGUMENT_LIST
PsiElement(LPAR)('(')
VALUE_ARGUMENT
STRING_TEMPLATE
PsiElement(OPEN_QUOTE)('"')
LITERAL_STRING_TEMPLATE_ENTRY
PsiElement(REGULAR_STRING_PART)('1')
PsiElement(CLOSING_QUOTE)('"')
PsiElement(RPAR)(')')
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ')
PsiElement(INTEGER_LITERAL)('1')
PsiElement(PLUS)('+')
PsiElement(INTEGER_LITERAL)('1')
PsiWhiteSpace('\n ')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
PsiElement(RBRACE)('}')
@@ -1,13 +0,0 @@
package bar
[file: foo]
val prop
[file:bar baz]
fun func() {}
[file:baz]
class C
[file:]
interface T
@@ -1,95 +0,0 @@
JetFile: fileAnnotationInWrongPlace.kt
PACKAGE_DIRECTIVE
PsiElement(package)('package')
PsiWhiteSpace(' ')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('bar')
IMPORT_LIST
<empty list>
PsiWhiteSpace('\n\n')
PROPERTY
MODIFIER_LIST
ANNOTATION
PsiElement(LBRACKET)('[')
PsiErrorElement:File annotations are only allowed before package declaration
PsiElement(file)('file')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('foo')
PsiElement(RBRACKET)(']')
PsiWhiteSpace('\n')
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('prop')
PsiWhiteSpace('\n\n')
FUN
MODIFIER_LIST
ANNOTATION
PsiElement(LBRACKET)('[')
PsiErrorElement:File annotations are only allowed before package declaration
PsiElement(file)('file')
PsiElement(COLON)(':')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('bar')
PsiWhiteSpace(' ')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('baz')
PsiElement(RBRACKET)(']')
PsiWhiteSpace('\n')
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('func')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n')
CLASS
MODIFIER_LIST
ANNOTATION
PsiElement(LBRACKET)('[')
PsiErrorElement:File annotations are only allowed before package declaration
PsiElement(file)('file')
PsiElement(COLON)(':')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('baz')
PsiElement(RBRACKET)(']')
PsiWhiteSpace('\n')
PsiElement(class)('class')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('C')
PsiWhiteSpace('\n\n')
CLASS
MODIFIER_LIST
ANNOTATION
PsiElement(LBRACKET)('[')
PsiErrorElement:File annotations are only allowed before package declaration
PsiElement(file)('file')
PsiElement(COLON)(':')
PsiErrorElement:Expecting a list of annotations
<empty list>
PsiElement(RBRACKET)(']')
PsiWhiteSpace('\n')
PsiElement(interface)('interface')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('T')
@@ -1,3 +0,0 @@
[file: foo]
[file:bar baz]
package bar
@@ -1,41 +0,0 @@
JetFile: manyAnnotationBlocks.kt
FILE_ANNOTATION_LIST
ANNOTATION
PsiElement(LBRACKET)('[')
PsiElement(file)('file')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('foo')
PsiElement(RBRACKET)(']')
PsiWhiteSpace('\n')
ANNOTATION
PsiElement(LBRACKET)('[')
PsiElement(file)('file')
PsiElement(COLON)(':')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('bar')
PsiWhiteSpace(' ')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('baz')
PsiElement(RBRACKET)(']')
PsiWhiteSpace('\n')
PACKAGE_DIRECTIVE
PsiElement(package)('package')
PsiWhiteSpace(' ')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('bar')
IMPORT_LIST
<empty list>
@@ -1,3 +0,0 @@
[file: foo bar
baz]
package bar
@@ -1,36 +0,0 @@
JetFile: manyInOneAnnotationBlock.kt
FILE_ANNOTATION_LIST
ANNOTATION
PsiElement(LBRACKET)('[')
PsiElement(file)('file')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('foo')
PsiWhiteSpace(' ')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('bar')
PsiWhiteSpace('\n')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('baz')
PsiElement(RBRACKET)(']')
PsiWhiteSpace('\n')
PACKAGE_DIRECTIVE
PsiElement(package)('package')
PsiWhiteSpace(' ')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('bar')
IMPORT_LIST
<empty list>
@@ -1,8 +0,0 @@
[foo]
[file bar]
[file, baz]
[file]
[:foo.bar]
[file:]
[:]
package boo
@@ -1,88 +0,0 @@
JetFile: nonFIleAnnotationBeforePackage.kt
FILE_ANNOTATION_LIST
ANNOTATION
PsiElement(LBRACKET)('[')
PsiErrorElement:Expecting "file:" prefix for file annotations
<empty list>
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('foo')
PsiElement(RBRACKET)(']')
PsiWhiteSpace('\n')
ANNOTATION
PsiElement(LBRACKET)('[')
PsiElement(file)('file')
PsiErrorElement:Expecting "file:" prefix for file annotations
<empty list>
PsiWhiteSpace(' ')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('bar')
PsiElement(RBRACKET)(']')
PsiWhiteSpace('\n')
ANNOTATION
PsiElement(LBRACKET)('[')
PsiElement(file)('file')
PsiErrorElement:Expecting "file:" prefix for file annotations
PsiElement(COMMA)(',')
PsiWhiteSpace(' ')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('baz')
PsiElement(RBRACKET)(']')
PsiWhiteSpace('\n')
ANNOTATION
PsiElement(LBRACKET)('[')
PsiElement(file)('file')
PsiErrorElement:Expecting "file:" prefix for file annotations
<empty list>
PsiElement(RBRACKET)(']')
PsiWhiteSpace('\n')
ANNOTATION
PsiElement(LBRACKET)('[')
PsiErrorElement:Expected 'file' keyword before ':'
PsiElement(COLON)(':')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('foo')
PsiElement(DOT)('.')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('bar')
PsiElement(RBRACKET)(']')
PsiWhiteSpace('\n')
ANNOTATION
PsiElement(LBRACKET)('[')
PsiElement(file)('file')
PsiElement(COLON)(':')
PsiErrorElement:Expecting a list of annotations
<empty list>
PsiElement(RBRACKET)(']')
PsiWhiteSpace('\n')
ANNOTATION
PsiElement(LBRACKET)('[')
PsiErrorElement:Expected 'file' keyword before ':'
PsiElement(COLON)(':')
PsiErrorElement:Expecting a list of annotations
<empty list>
PsiElement(RBRACKET)(']')
PsiWhiteSpace('\n')
PACKAGE_DIRECTIVE
PsiElement(package)('package')
PsiWhiteSpace(' ')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('boo')
IMPORT_LIST
<empty list>
@@ -1,2 +0,0 @@
[file: foo]
package bar
@@ -1,22 +0,0 @@
JetFile: single.kt
FILE_ANNOTATION_LIST
ANNOTATION
PsiElement(LBRACKET)('[')
PsiElement(file)('file')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('foo')
PsiElement(RBRACKET)(']')
PsiWhiteSpace('\n')
PACKAGE_DIRECTIVE
PsiElement(package)('package')
PsiWhiteSpace(' ')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('bar')
IMPORT_LIST
<empty list>
@@ -1,3 +0,0 @@
[ann] fun foo(): String? = null
annotation class ann
@@ -1,44 +0,0 @@
JetFile: withoutFileAnnotationAndPackageDeclaration.kt
PACKAGE_DIRECTIVE
<empty list>
IMPORT_LIST
<empty list>
FUN
MODIFIER_LIST
ANNOTATION
PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('ann')
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ')
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('foo')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
TYPE_REFERENCE
NULLABLE_TYPE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('String')
PsiElement(QUEST)('?')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
NULL
PsiElement(null)('null')
PsiWhiteSpace('\n\n')
CLASS
MODIFIER_LIST
PsiElement(annotation)('annotation')
PsiWhiteSpace(' ')
PsiElement(class)('class')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('ann')
@@ -1,4 +0,0 @@
[file: foo]
[foo bar]
[file: baz]
fun foo() {}
@@ -1,62 +0,0 @@
JetFile: withoutPackage.kt
FILE_ANNOTATION_LIST
ANNOTATION
PsiElement(LBRACKET)('[')
PsiElement(file)('file')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('foo')
PsiElement(RBRACKET)(']')
PACKAGE_DIRECTIVE
<empty list>
IMPORT_LIST
<empty list>
PsiWhiteSpace('\n')
FUN
MODIFIER_LIST
ANNOTATION
PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('foo')
PsiWhiteSpace(' ')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('bar')
PsiElement(RBRACKET)(']')
PsiWhiteSpace('\n')
ANNOTATION
PsiElement(LBRACKET)('[')
PsiErrorElement:File annotations are only allowed before package declaration
PsiElement(file)('file')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('baz')
PsiElement(RBRACKET)(']')
PsiWhiteSpace('\n')
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('foo')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
@@ -1,4 +0,0 @@
[file: foo]
foo bar
[file: baz]
fun foo() {}
@@ -1,59 +0,0 @@
JetFile: withoutPackageWithSimpleAnnotation.kt
FILE_ANNOTATION_LIST
ANNOTATION
PsiElement(LBRACKET)('[')
PsiElement(file)('file')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('foo')
PsiElement(RBRACKET)(']')
PACKAGE_DIRECTIVE
<empty list>
IMPORT_LIST
<empty list>
PsiWhiteSpace('\n')
FUN
MODIFIER_LIST
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('foo')
PsiWhiteSpace(' ')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('bar')
PsiWhiteSpace('\n')
ANNOTATION
PsiElement(LBRACKET)('[')
PsiErrorElement:File annotations are only allowed before package declaration
PsiElement(file)('file')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('baz')
PsiElement(RBRACKET)(']')
PsiWhiteSpace('\n')
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('foo')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
+1 -1
View File
@@ -20,7 +20,7 @@ class BinaryTree<T> : IMutableSet<T> {
constructor() : this(naturalOrder<T>()) { constructor() : this(naturalOrder<T>()) {
} }
private [operator] fun T.compareTo(other : T) : Int = compare(this, other) private @[operator] fun T.compareTo(other : T) : Int = compare(this, other)
override fun contains(item : T) : Boolean { override fun contains(item : T) : Boolean {
return contains(root, item) return contains(root, item)
+1
View File
@@ -246,6 +246,7 @@ JetFile: BinaryTree.kt
PsiElement(private)('private') PsiElement(private)('private')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
+2 -2
View File
@@ -23,7 +23,7 @@ fun Int.matchMask(mask : Int) = this and mask == mask
open class INumber : IComparable<This> { open class INumber : IComparable<This> {
val bits : Int val bits : Int
[operator] fun plus(other : This) : This @operator fun plus(other : This) : This
[operator] fun shl(bits : Int) : This @operator fun shl(bits : Int) : This
// ... // ...
} }
+14 -18
View File
@@ -557,15 +557,13 @@ JetFile: BitArith.kt
PsiWhiteSpace('\n ') PsiWhiteSpace('\n ')
FUN FUN
MODIFIER_LIST MODIFIER_LIST
ANNOTATION ANNOTATION_ENTRY
PsiElement(LBRACKET)('[') PsiElement(AT)('@')
ANNOTATION_ENTRY CONSTRUCTOR_CALLEE
CONSTRUCTOR_CALLEE TYPE_REFERENCE
TYPE_REFERENCE USER_TYPE
USER_TYPE REFERENCE_EXPRESSION
REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('operator')
PsiElement(IDENTIFIER)('operator')
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
PsiElement(fun)('fun') PsiElement(fun)('fun')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
@@ -590,15 +588,13 @@ JetFile: BitArith.kt
PsiWhiteSpace('\n ') PsiWhiteSpace('\n ')
FUN FUN
MODIFIER_LIST MODIFIER_LIST
ANNOTATION ANNOTATION_ENTRY
PsiElement(LBRACKET)('[') PsiElement(AT)('@')
ANNOTATION_ENTRY CONSTRUCTOR_CALLEE
CONSTRUCTOR_CALLEE TYPE_REFERENCE
TYPE_REFERENCE USER_TYPE
USER_TYPE REFERENCE_EXPRESSION
REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('operator')
PsiElement(IDENTIFIER)('operator')
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
PsiElement(fun)('fun') PsiElement(fun)('fun')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
+3 -3
View File
@@ -1,16 +1,16 @@
val foo = object : AntBuilder() { val foo = object : AntBuilder() {
[lazy] val groovy = library { @lazy val groovy = library {
classpath("$libs/groovy-...") classpath("$libs/groovy-...")
} }
[lazy] val gant = library { @lazy val gant = library {
File("$gantHome/lib").files.each { File("$gantHome/lib").files.each {
classpath(it) classpath(it)
} }
} }
[lazy] val JPS = module { @lazy val JPS = module {
targetLevel = "1.5" targetLevel = "1.5"
classpath(antLayout, gant, groovy) classpath(antLayout, gant, groovy)
src("$projectHome/antLayout/src") src("$projectHome/antLayout/src")
+21 -27
View File
@@ -33,15 +33,13 @@ JetFile: Builder.kt
PsiWhiteSpace('\n\n ') PsiWhiteSpace('\n\n ')
PROPERTY PROPERTY
MODIFIER_LIST MODIFIER_LIST
ANNOTATION ANNOTATION_ENTRY
PsiElement(LBRACKET)('[') PsiElement(AT)('@')
ANNOTATION_ENTRY CONSTRUCTOR_CALLEE
CONSTRUCTOR_CALLEE TYPE_REFERENCE
TYPE_REFERENCE USER_TYPE
USER_TYPE REFERENCE_EXPRESSION
REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('lazy')
PsiElement(IDENTIFIER)('lazy')
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
PsiElement(val)('val') PsiElement(val)('val')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
@@ -80,15 +78,13 @@ JetFile: Builder.kt
PsiWhiteSpace('\n\n ') PsiWhiteSpace('\n\n ')
PROPERTY PROPERTY
MODIFIER_LIST MODIFIER_LIST
ANNOTATION ANNOTATION_ENTRY
PsiElement(LBRACKET)('[') PsiElement(AT)('@')
ANNOTATION_ENTRY CONSTRUCTOR_CALLEE
CONSTRUCTOR_CALLEE TYPE_REFERENCE
TYPE_REFERENCE USER_TYPE
USER_TYPE REFERENCE_EXPRESSION
REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('lazy')
PsiElement(IDENTIFIER)('lazy')
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
PsiElement(val)('val') PsiElement(val)('val')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
@@ -154,15 +150,13 @@ JetFile: Builder.kt
PsiWhiteSpace('\n\n ') PsiWhiteSpace('\n\n ')
PROPERTY PROPERTY
MODIFIER_LIST MODIFIER_LIST
ANNOTATION ANNOTATION_ENTRY
PsiElement(LBRACKET)('[') PsiElement(AT)('@')
ANNOTATION_ENTRY CONSTRUCTOR_CALLEE
CONSTRUCTOR_CALLEE TYPE_REFERENCE
TYPE_REFERENCE USER_TYPE
USER_TYPE REFERENCE_EXPRESSION
REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('lazy')
PsiElement(IDENTIFIER)('lazy')
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
PsiElement(val)('val') PsiElement(val)('val')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
+1 -1
View File
@@ -1,4 +1,4 @@
[inline] fun with<T>(receiver : T, body : T.() -> Unit) = receiver.body() inline fun with<T>(receiver : T, body : T.() -> Unit) = receiver.body()
fun example() { fun example() {
+6 -9
View File
@@ -5,15 +5,12 @@ JetFile: With.kt
<empty list> <empty list>
FUN FUN
MODIFIER_LIST MODIFIER_LIST
ANNOTATION ANNOTATION_ENTRY
PsiElement(LBRACKET)('[') CONSTRUCTOR_CALLEE
ANNOTATION_ENTRY TYPE_REFERENCE
CONSTRUCTOR_CALLEE USER_TYPE
TYPE_REFERENCE REFERENCE_EXPRESSION
USER_TYPE PsiElement(IDENTIFIER)('inline')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('inline')
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
PsiElement(fun)('fun') PsiElement(fun)('fun')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
+2 -2
View File
@@ -3,11 +3,11 @@
*/ */
open class ReadOnlyArray<out T> : ISized { open class ReadOnlyArray<out T> : ISized {
[operator] fun get(index : Int) : T @[operator] fun get(index : Int) : T
} }
open class WriteOnlyArray<in T> : ISized { // This is needed to keep IIterator's <T> covariant open class WriteOnlyArray<in T> : ISized { // This is needed to keep IIterator's <T> covariant
[operator] fun set(index : Int, value : T) @[operator] fun set(index : Int, value : T)
} }
class MutableArray<T> : ReadOnlyArray<T>, WriteOnlyArray<T> {/*...*/} class MutableArray<T> : ReadOnlyArray<T>, WriteOnlyArray<T> {/*...*/}
+2
View File
@@ -42,6 +42,7 @@ JetFile: MutableArray.kt
FUN FUN
MODIFIER_LIST MODIFIER_LIST
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -109,6 +110,7 @@ JetFile: MutableArray.kt
FUN FUN
MODIFIER_LIST MODIFIER_LIST
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
+3 -3
View File
@@ -19,7 +19,7 @@ open class IMap<K, V> {
class HashableWrapper(val obj : Any) : IHashable class HashableWrapper(val obj : Any) : IHashable
// equals and hashCode implementations are inherited // equals and hashCode implementations are inherited
[inline] fun Any.hashable() : HashableWrapper = HashableWrapper(this) @[inline] fun Any.hashable() : HashableWrapper = HashableWrapper(this)
open class IHashingStrategy<K> { open class IHashingStrategy<K> {
fun equals(a : K, b : K) : Boolean fun equals(a : K, b : K) : Boolean
@@ -39,8 +39,8 @@ class JavaObjectHashingStrategy<K> : IHashingStrategy<K> {
} }
class HashMap<K, V> : IMap<K, V> { class HashMap<K, V> : IMap<K, V> {
private [inline] fun hashCode(a : K) = a.hashable().hashCode private @[inline] fun hashCode(a : K) = a.hashable().hashCode
private [inline] fun equals(a : K, b : K) = a.hashable() == b private @[inline] fun equals(a : K, b : K) = a.hashable() == b
// everything else uses these equals() and hashCode()... // everything else uses these equals() and hashCode()...
@@ -330,6 +330,7 @@ JetFile: HashMap.kt
FUN FUN
MODIFIER_LIST MODIFIER_LIST
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -764,6 +765,7 @@ JetFile: HashMap.kt
PsiElement(private)('private') PsiElement(private)('private')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
@@ -811,6 +813,7 @@ JetFile: HashMap.kt
PsiElement(private)('private') PsiElement(private)('private')
PsiWhiteSpace(' ') PsiWhiteSpace(' ')
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE
+1 -1
View File
@@ -1,4 +1,4 @@
open class IList<out T> : IIterable<T>, ISized { open class IList<out T> : IIterable<T>, ISized {
[operator] fun get(index : Int) : T @[operator] fun get(index : Int) : T
val isEmpty : Boolean val isEmpty : Boolean
} }
+1
View File
@@ -49,6 +49,7 @@ JetFile: IList.kt
FUN FUN
MODIFIER_LIST MODIFIER_LIST
ANNOTATION ANNOTATION
PsiElement(AT)('@')
PsiElement(LBRACKET)('[') PsiElement(LBRACKET)('[')
ANNOTATION_ENTRY ANNOTATION_ENTRY
CONSTRUCTOR_CALLEE CONSTRUCTOR_CALLEE

Some files were not shown because too many files have changed in this diff Show More