Minor, restructure parsing test case for '::'
This commit is contained in:
Vendored
+10
-30
@@ -1,4 +1,4 @@
|
|||||||
fun ok() {
|
fun simple() {
|
||||||
A::a
|
A::a
|
||||||
A::a + 1
|
A::a + 1
|
||||||
Map<String, Int>::size
|
Map<String, Int>::size
|
||||||
@@ -9,6 +9,11 @@ fun ok() {
|
|||||||
a::b.c
|
a::b.c
|
||||||
a.b::c.d
|
a.b::c.d
|
||||||
|
|
||||||
|
(a::b)()
|
||||||
|
a.(b::c)()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun genericType() {
|
||||||
a<b>::c
|
a<b>::c
|
||||||
a<b>::c.d
|
a<b>::c.d
|
||||||
a.b<c>::d
|
a.b<c>::d
|
||||||
@@ -18,43 +23,18 @@ fun ok() {
|
|||||||
a.b<c.d<e.f>>::g.h
|
a.b<c.d<e.f>>::g.h
|
||||||
|
|
||||||
a.b.c<d>.e<f>.g::h
|
a.b.c<d>.e<f>.g::h
|
||||||
|
}
|
||||||
|
|
||||||
a::b()
|
fun nullableType() {
|
||||||
(a::b)()
|
|
||||||
a.(b::c)()
|
|
||||||
a.b::c()
|
|
||||||
|
|
||||||
a?::b
|
a?::b
|
||||||
a??::b
|
a??::b
|
||||||
a<b>?::c
|
a<b>?::c
|
||||||
a<b?,c?>?::d
|
a<b?,c?>?::d
|
||||||
|
}
|
||||||
|
|
||||||
|
fun classLiteral() {
|
||||||
A::class
|
A::class
|
||||||
a<b,c>::class
|
a<b,c>::class
|
||||||
::class
|
::class
|
||||||
a b ::class
|
a b ::class
|
||||||
}
|
}
|
||||||
|
|
||||||
fun err0() {
|
|
||||||
a::b.c::d
|
|
||||||
}
|
|
||||||
|
|
||||||
fun err1() {
|
|
||||||
A::
|
|
||||||
}
|
|
||||||
|
|
||||||
fun err2() {
|
|
||||||
A::a::b
|
|
||||||
}
|
|
||||||
|
|
||||||
fun err3() {
|
|
||||||
::
|
|
||||||
}
|
|
||||||
|
|
||||||
fun typeArgumentsError() {
|
|
||||||
::a<b>
|
|
||||||
::a<b,c<*>>
|
|
||||||
a::b<c>
|
|
||||||
|
|
||||||
::a<b>()
|
|
||||||
}
|
|
||||||
|
|||||||
+77
-245
@@ -6,7 +6,7 @@ JetFile: DoubleColon.kt
|
|||||||
FUN
|
FUN
|
||||||
PsiElement(fun)('fun')
|
PsiElement(fun)('fun')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('ok')
|
PsiElement(IDENTIFIER)('simple')
|
||||||
VALUE_PARAMETER_LIST
|
VALUE_PARAMETER_LIST
|
||||||
PsiElement(LPAR)('(')
|
PsiElement(LPAR)('(')
|
||||||
PsiElement(RPAR)(')')
|
PsiElement(RPAR)(')')
|
||||||
@@ -111,6 +111,55 @@ JetFile: DoubleColon.kt
|
|||||||
REFERENCE_EXPRESSION
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('d')
|
PsiElement(IDENTIFIER)('d')
|
||||||
PsiWhiteSpace('\n\n ')
|
PsiWhiteSpace('\n\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
PARENTHESIZED
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
CALLABLE_REFERENCE_EXPRESSION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
PsiElement(COLONCOLON)('::')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('b')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
DOT_QUALIFIED_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
PARENTHESIZED
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
CALLABLE_REFERENCE_EXPRESSION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('b')
|
||||||
|
PsiElement(COLONCOLON)('::')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('c')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
PsiWhiteSpace('\n\n')
|
||||||
|
FUN
|
||||||
|
PsiElement(fun)('fun')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(IDENTIFIER)('genericType')
|
||||||
|
VALUE_PARAMETER_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
CALLABLE_REFERENCE_EXPRESSION
|
CALLABLE_REFERENCE_EXPRESSION
|
||||||
TYPE_REFERENCE
|
TYPE_REFERENCE
|
||||||
USER_TYPE
|
USER_TYPE
|
||||||
@@ -330,71 +379,20 @@ JetFile: DoubleColon.kt
|
|||||||
PsiElement(COLONCOLON)('::')
|
PsiElement(COLONCOLON)('::')
|
||||||
REFERENCE_EXPRESSION
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('h')
|
PsiElement(IDENTIFIER)('h')
|
||||||
PsiWhiteSpace('\n\n ')
|
PsiWhiteSpace('\n')
|
||||||
CALLABLE_REFERENCE_EXPRESSION
|
PsiElement(RBRACE)('}')
|
||||||
TYPE_REFERENCE
|
PsiWhiteSpace('\n\n')
|
||||||
USER_TYPE
|
FUN
|
||||||
REFERENCE_EXPRESSION
|
PsiElement(fun)('fun')
|
||||||
PsiElement(IDENTIFIER)('a')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(COLONCOLON)('::')
|
PsiElement(IDENTIFIER)('nullableType')
|
||||||
REFERENCE_EXPRESSION
|
VALUE_PARAMETER_LIST
|
||||||
PsiElement(IDENTIFIER)('b')
|
PsiElement(LPAR)('(')
|
||||||
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
|
PsiElement(RPAR)(')')
|
||||||
PsiElement(LPAR)('(')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(RPAR)(')')
|
BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
CALL_EXPRESSION
|
|
||||||
PARENTHESIZED
|
|
||||||
PsiElement(LPAR)('(')
|
|
||||||
CALLABLE_REFERENCE_EXPRESSION
|
|
||||||
TYPE_REFERENCE
|
|
||||||
USER_TYPE
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('a')
|
|
||||||
PsiElement(COLONCOLON)('::')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('b')
|
|
||||||
PsiElement(RPAR)(')')
|
|
||||||
VALUE_ARGUMENT_LIST
|
|
||||||
PsiElement(LPAR)('(')
|
|
||||||
PsiElement(RPAR)(')')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
DOT_QUALIFIED_EXPRESSION
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('a')
|
|
||||||
PsiElement(DOT)('.')
|
|
||||||
CALL_EXPRESSION
|
|
||||||
PARENTHESIZED
|
|
||||||
PsiElement(LPAR)('(')
|
|
||||||
CALLABLE_REFERENCE_EXPRESSION
|
|
||||||
TYPE_REFERENCE
|
|
||||||
USER_TYPE
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('b')
|
|
||||||
PsiElement(COLONCOLON)('::')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('c')
|
|
||||||
PsiElement(RPAR)(')')
|
|
||||||
VALUE_ARGUMENT_LIST
|
|
||||||
PsiElement(LPAR)('(')
|
|
||||||
PsiElement(RPAR)(')')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
CALLABLE_REFERENCE_EXPRESSION
|
|
||||||
TYPE_REFERENCE
|
|
||||||
USER_TYPE
|
|
||||||
USER_TYPE
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('a')
|
|
||||||
PsiElement(DOT)('.')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('b')
|
|
||||||
PsiElement(COLONCOLON)('::')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('c')
|
|
||||||
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
|
|
||||||
PsiElement(LPAR)('(')
|
|
||||||
PsiElement(RPAR)(')')
|
|
||||||
PsiWhiteSpace('\n\n ')
|
|
||||||
CALLABLE_REFERENCE_EXPRESSION
|
CALLABLE_REFERENCE_EXPRESSION
|
||||||
TYPE_REFERENCE
|
TYPE_REFERENCE
|
||||||
NULLABLE_TYPE
|
NULLABLE_TYPE
|
||||||
@@ -466,7 +464,20 @@ JetFile: DoubleColon.kt
|
|||||||
PsiElement(COLONCOLON)('::')
|
PsiElement(COLONCOLON)('::')
|
||||||
REFERENCE_EXPRESSION
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('d')
|
PsiElement(IDENTIFIER)('d')
|
||||||
PsiWhiteSpace('\n\n ')
|
PsiWhiteSpace('\n')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
PsiWhiteSpace('\n\n')
|
||||||
|
FUN
|
||||||
|
PsiElement(fun)('fun')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(IDENTIFIER)('classLiteral')
|
||||||
|
VALUE_PARAMETER_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
CLASS_LITERAL_EXPRESSION
|
CLASS_LITERAL_EXPRESSION
|
||||||
TYPE_REFERENCE
|
TYPE_REFERENCE
|
||||||
USER_TYPE
|
USER_TYPE
|
||||||
@@ -513,182 +524,3 @@ JetFile: DoubleColon.kt
|
|||||||
PsiElement(class)('class')
|
PsiElement(class)('class')
|
||||||
PsiWhiteSpace('\n')
|
PsiWhiteSpace('\n')
|
||||||
PsiElement(RBRACE)('}')
|
PsiElement(RBRACE)('}')
|
||||||
PsiWhiteSpace('\n\n')
|
|
||||||
FUN
|
|
||||||
PsiElement(fun)('fun')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(IDENTIFIER)('err0')
|
|
||||||
VALUE_PARAMETER_LIST
|
|
||||||
PsiElement(LPAR)('(')
|
|
||||||
PsiElement(RPAR)(')')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
BLOCK
|
|
||||||
PsiElement(LBRACE)('{')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
DOT_QUALIFIED_EXPRESSION
|
|
||||||
CALLABLE_REFERENCE_EXPRESSION
|
|
||||||
TYPE_REFERENCE
|
|
||||||
USER_TYPE
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('a')
|
|
||||||
PsiElement(COLONCOLON)('::')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('b')
|
|
||||||
PsiElement(DOT)('.')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('c')
|
|
||||||
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
|
|
||||||
PsiElement(COLONCOLON)('::')
|
|
||||||
PsiElement(IDENTIFIER)('d')
|
|
||||||
PsiWhiteSpace('\n')
|
|
||||||
PsiElement(RBRACE)('}')
|
|
||||||
PsiWhiteSpace('\n\n')
|
|
||||||
FUN
|
|
||||||
PsiElement(fun)('fun')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(IDENTIFIER)('err1')
|
|
||||||
VALUE_PARAMETER_LIST
|
|
||||||
PsiElement(LPAR)('(')
|
|
||||||
PsiElement(RPAR)(')')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
BLOCK
|
|
||||||
PsiElement(LBRACE)('{')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
CALLABLE_REFERENCE_EXPRESSION
|
|
||||||
TYPE_REFERENCE
|
|
||||||
USER_TYPE
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('A')
|
|
||||||
PsiElement(COLONCOLON)('::')
|
|
||||||
PsiWhiteSpace('\n')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiErrorElement:Expecting an identifier
|
|
||||||
<empty list>
|
|
||||||
PsiElement(RBRACE)('}')
|
|
||||||
PsiWhiteSpace('\n\n')
|
|
||||||
FUN
|
|
||||||
PsiElement(fun)('fun')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(IDENTIFIER)('err2')
|
|
||||||
VALUE_PARAMETER_LIST
|
|
||||||
PsiElement(LPAR)('(')
|
|
||||||
PsiElement(RPAR)(')')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
BLOCK
|
|
||||||
PsiElement(LBRACE)('{')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
CALLABLE_REFERENCE_EXPRESSION
|
|
||||||
TYPE_REFERENCE
|
|
||||||
USER_TYPE
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('A')
|
|
||||||
PsiElement(COLONCOLON)('::')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('a')
|
|
||||||
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
|
|
||||||
PsiElement(COLONCOLON)('::')
|
|
||||||
PsiElement(IDENTIFIER)('b')
|
|
||||||
PsiWhiteSpace('\n')
|
|
||||||
PsiElement(RBRACE)('}')
|
|
||||||
PsiWhiteSpace('\n\n')
|
|
||||||
FUN
|
|
||||||
PsiElement(fun)('fun')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(IDENTIFIER)('err3')
|
|
||||||
VALUE_PARAMETER_LIST
|
|
||||||
PsiElement(LPAR)('(')
|
|
||||||
PsiElement(RPAR)(')')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
BLOCK
|
|
||||||
PsiElement(LBRACE)('{')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
CALLABLE_REFERENCE_EXPRESSION
|
|
||||||
PsiElement(COLONCOLON)('::')
|
|
||||||
PsiWhiteSpace('\n')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiErrorElement:Expecting an identifier
|
|
||||||
<empty list>
|
|
||||||
PsiElement(RBRACE)('}')
|
|
||||||
PsiWhiteSpace('\n\n')
|
|
||||||
FUN
|
|
||||||
PsiElement(fun)('fun')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(IDENTIFIER)('typeArgumentsError')
|
|
||||||
VALUE_PARAMETER_LIST
|
|
||||||
PsiElement(LPAR)('(')
|
|
||||||
PsiElement(RPAR)(')')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
BLOCK
|
|
||||||
PsiElement(LBRACE)('{')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
CALLABLE_REFERENCE_EXPRESSION
|
|
||||||
PsiElement(COLONCOLON)('::')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('a')
|
|
||||||
PsiErrorElement:Type arguments are not allowed
|
|
||||||
PsiElement(LT)('<')
|
|
||||||
TYPE_PROJECTION
|
|
||||||
TYPE_REFERENCE
|
|
||||||
USER_TYPE
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('b')
|
|
||||||
PsiElement(GT)('>')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
CALLABLE_REFERENCE_EXPRESSION
|
|
||||||
PsiElement(COLONCOLON)('::')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('a')
|
|
||||||
PsiErrorElement:Type arguments are not allowed
|
|
||||||
PsiElement(LT)('<')
|
|
||||||
TYPE_PROJECTION
|
|
||||||
TYPE_REFERENCE
|
|
||||||
USER_TYPE
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('b')
|
|
||||||
PsiElement(COMMA)(',')
|
|
||||||
TYPE_PROJECTION
|
|
||||||
TYPE_REFERENCE
|
|
||||||
USER_TYPE
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('c')
|
|
||||||
TYPE_ARGUMENT_LIST
|
|
||||||
PsiElement(LT)('<')
|
|
||||||
TYPE_PROJECTION
|
|
||||||
PsiElement(MUL)('*')
|
|
||||||
PsiElement(GT)('>')
|
|
||||||
PsiElement(GT)('>')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
CALLABLE_REFERENCE_EXPRESSION
|
|
||||||
TYPE_REFERENCE
|
|
||||||
USER_TYPE
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('a')
|
|
||||||
PsiElement(COLONCOLON)('::')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('b')
|
|
||||||
PsiErrorElement:Type arguments are not allowed
|
|
||||||
PsiElement(LT)('<')
|
|
||||||
TYPE_PROJECTION
|
|
||||||
TYPE_REFERENCE
|
|
||||||
USER_TYPE
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('c')
|
|
||||||
PsiElement(GT)('>')
|
|
||||||
PsiWhiteSpace('\n\n ')
|
|
||||||
CALLABLE_REFERENCE_EXPRESSION
|
|
||||||
PsiElement(COLONCOLON)('::')
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('a')
|
|
||||||
PsiErrorElement:Type arguments are not allowed
|
|
||||||
PsiElement(LT)('<')
|
|
||||||
TYPE_PROJECTION
|
|
||||||
TYPE_REFERENCE
|
|
||||||
USER_TYPE
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('b')
|
|
||||||
PsiElement(GT)('>')
|
|
||||||
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
|
|
||||||
PsiElement(LPAR)('(')
|
|
||||||
PsiElement(RPAR)(')')
|
|
||||||
PsiWhiteSpace('\n')
|
|
||||||
PsiElement(RBRACE)('}')
|
|
||||||
+28
@@ -0,0 +1,28 @@
|
|||||||
|
fun err0() {
|
||||||
|
a::b()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun err1() {
|
||||||
|
a.b::c()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun err2() {
|
||||||
|
A::
|
||||||
|
}
|
||||||
|
|
||||||
|
fun err3() {
|
||||||
|
::
|
||||||
|
}
|
||||||
|
|
||||||
|
fun typeArgumentsError() {
|
||||||
|
::a<b>
|
||||||
|
::a<b,c<*>>
|
||||||
|
a::b<c>
|
||||||
|
|
||||||
|
::a<b>()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun expressionsOnLHS() {
|
||||||
|
a::b.c::d
|
||||||
|
A::a::b
|
||||||
|
}
|
||||||
+224
@@ -0,0 +1,224 @@
|
|||||||
|
JetFile: DoubleColon_ERR.kt
|
||||||
|
PACKAGE_DIRECTIVE
|
||||||
|
<empty list>
|
||||||
|
IMPORT_LIST
|
||||||
|
<empty list>
|
||||||
|
FUN
|
||||||
|
PsiElement(fun)('fun')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(IDENTIFIER)('err0')
|
||||||
|
VALUE_PARAMETER_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALLABLE_REFERENCE_EXPRESSION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
PsiElement(COLONCOLON)('::')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('b')
|
||||||
|
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
PsiWhiteSpace('\n\n')
|
||||||
|
FUN
|
||||||
|
PsiElement(fun)('fun')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(IDENTIFIER)('err1')
|
||||||
|
VALUE_PARAMETER_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALLABLE_REFERENCE_EXPRESSION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('b')
|
||||||
|
PsiElement(COLONCOLON)('::')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('c')
|
||||||
|
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
PsiWhiteSpace('\n\n')
|
||||||
|
FUN
|
||||||
|
PsiElement(fun)('fun')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(IDENTIFIER)('err2')
|
||||||
|
VALUE_PARAMETER_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALLABLE_REFERENCE_EXPRESSION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('A')
|
||||||
|
PsiElement(COLONCOLON)('::')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiErrorElement:Expecting an identifier
|
||||||
|
<empty list>
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
PsiWhiteSpace('\n\n')
|
||||||
|
FUN
|
||||||
|
PsiElement(fun)('fun')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(IDENTIFIER)('err3')
|
||||||
|
VALUE_PARAMETER_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALLABLE_REFERENCE_EXPRESSION
|
||||||
|
PsiElement(COLONCOLON)('::')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiErrorElement:Expecting an identifier
|
||||||
|
<empty list>
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
PsiWhiteSpace('\n\n')
|
||||||
|
FUN
|
||||||
|
PsiElement(fun)('fun')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(IDENTIFIER)('typeArgumentsError')
|
||||||
|
VALUE_PARAMETER_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALLABLE_REFERENCE_EXPRESSION
|
||||||
|
PsiElement(COLONCOLON)('::')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
PsiErrorElement:Type arguments are not allowed
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('b')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALLABLE_REFERENCE_EXPRESSION
|
||||||
|
PsiElement(COLONCOLON)('::')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
PsiErrorElement:Type arguments are not allowed
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('b')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('c')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
PsiElement(MUL)('*')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALLABLE_REFERENCE_EXPRESSION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
PsiElement(COLONCOLON)('::')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('b')
|
||||||
|
PsiErrorElement:Type arguments are not allowed
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('c')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiWhiteSpace('\n\n ')
|
||||||
|
CALLABLE_REFERENCE_EXPRESSION
|
||||||
|
PsiElement(COLONCOLON)('::')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
PsiErrorElement:Type arguments are not allowed
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('b')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
PsiWhiteSpace('\n\n')
|
||||||
|
FUN
|
||||||
|
PsiElement(fun)('fun')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(IDENTIFIER)('expressionsOnLHS')
|
||||||
|
VALUE_PARAMETER_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
DOT_QUALIFIED_EXPRESSION
|
||||||
|
CALLABLE_REFERENCE_EXPRESSION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
PsiElement(COLONCOLON)('::')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('b')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('c')
|
||||||
|
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
|
||||||
|
PsiElement(COLONCOLON)('::')
|
||||||
|
PsiElement(IDENTIFIER)('d')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALLABLE_REFERENCE_EXPRESSION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('A')
|
||||||
|
PsiElement(COLONCOLON)('::')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
|
||||||
|
PsiElement(COLONCOLON)('::')
|
||||||
|
PsiElement(IDENTIFIER)('b')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
@@ -175,6 +175,12 @@ public class ParsingTestGenerated extends AbstractParsingTest {
|
|||||||
doParsingTest(fileName);
|
doParsingTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("DoubleColon_ERR.kt")
|
||||||
|
public void testDoubleColon_ERR() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/DoubleColon_ERR.kt");
|
||||||
|
doParsingTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("DuplicateAccessor.kt")
|
@TestMetadata("DuplicateAccessor.kt")
|
||||||
public void testDuplicateAccessor() throws Exception {
|
public void testDuplicateAccessor() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/DuplicateAccessor.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/DuplicateAccessor.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user