[Parser] Add additional parsing tests

This commit is contained in:
Victor Petukhov
2022-05-24 10:31:17 +02:00
committed by teamcity
parent 96d1f89836
commit de9d1dc536
9 changed files with 818 additions and 0 deletions
@@ -0,0 +1,21 @@
fun main() {
0..<n
}
fun main(val x: Int = 0..<n) {}
@Suppress(0 ..< n)
fun main() {}
fun main() {
when {
0 ..< n -> true
n..<n+1 -> true
n+1..<n+2 -> true
n * 2 ..< n * 3 -> true
}
}
fun main() {
if (0..<n..<n) {} else if (0..n..<n..n) {} else if (0 ..< n .. n ..< n ..< n) {} else { ((0+1..<n-1..1+n)-1..<3*n) ..< n }
}
@@ -0,0 +1,382 @@
KtFile: untilOperatorDifferentContexts.kt
PACKAGE_DIRECTIVE
<empty list>
IMPORT_LIST
<empty list>
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('main')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
BINARY_EXPRESSION
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('0')
OPERATION_REFERENCE
PsiElement(RANGE_UNTIL)('..<')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('n')
PsiWhiteSpace('\n')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n')
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('main')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
VALUE_PARAMETER
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('x')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
BINARY_EXPRESSION
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('0')
OPERATION_REFERENCE
PsiElement(RANGE_UNTIL)('..<')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('n')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n')
FUN
MODIFIER_LIST
ANNOTATION_ENTRY
PsiElement(AT)('@')
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Suppress')
VALUE_ARGUMENT_LIST
PsiElement(LPAR)('(')
VALUE_ARGUMENT
BINARY_EXPRESSION
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('0')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(RANGE_UNTIL)('..<')
PsiWhiteSpace(' ')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('n')
PsiElement(RPAR)(')')
PsiWhiteSpace('\n')
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('main')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n')
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('main')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
WHEN
PsiElement(when)('when')
PsiWhiteSpace(' ')
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
WHEN_ENTRY
WHEN_CONDITION_WITH_EXPRESSION
BINARY_EXPRESSION
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('0')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(RANGE_UNTIL)('..<')
PsiWhiteSpace(' ')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('n')
PsiWhiteSpace(' ')
PsiElement(ARROW)('->')
PsiWhiteSpace(' ')
BOOLEAN_CONSTANT
PsiElement(true)('true')
PsiWhiteSpace('\n ')
WHEN_ENTRY
WHEN_CONDITION_WITH_EXPRESSION
BINARY_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('n')
OPERATION_REFERENCE
PsiElement(RANGE_UNTIL)('..<')
BINARY_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('n')
OPERATION_REFERENCE
PsiElement(PLUS)('+')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('1')
PsiWhiteSpace(' ')
PsiElement(ARROW)('->')
PsiWhiteSpace(' ')
BOOLEAN_CONSTANT
PsiElement(true)('true')
PsiWhiteSpace('\n ')
WHEN_ENTRY
WHEN_CONDITION_WITH_EXPRESSION
BINARY_EXPRESSION
BINARY_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('n')
OPERATION_REFERENCE
PsiElement(PLUS)('+')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('1')
OPERATION_REFERENCE
PsiElement(RANGE_UNTIL)('..<')
BINARY_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('n')
OPERATION_REFERENCE
PsiElement(PLUS)('+')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('2')
PsiWhiteSpace(' ')
PsiElement(ARROW)('->')
PsiWhiteSpace(' ')
BOOLEAN_CONSTANT
PsiElement(true)('true')
PsiWhiteSpace('\n ')
WHEN_ENTRY
WHEN_CONDITION_WITH_EXPRESSION
BINARY_EXPRESSION
BINARY_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('n')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(MUL)('*')
PsiWhiteSpace(' ')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('2')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(RANGE_UNTIL)('..<')
PsiWhiteSpace(' ')
BINARY_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('n')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(MUL)('*')
PsiWhiteSpace(' ')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('3')
PsiWhiteSpace(' ')
PsiElement(ARROW)('->')
PsiWhiteSpace(' ')
BOOLEAN_CONSTANT
PsiElement(true)('true')
PsiWhiteSpace('\n ')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n')
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('main')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
IF
PsiElement(if)('if')
PsiWhiteSpace(' ')
PsiElement(LPAR)('(')
CONDITION
BINARY_EXPRESSION
BINARY_EXPRESSION
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('0')
OPERATION_REFERENCE
PsiElement(RANGE_UNTIL)('..<')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('n')
OPERATION_REFERENCE
PsiElement(RANGE_UNTIL)('..<')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('n')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
THEN
BLOCK
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
PsiWhiteSpace(' ')
PsiElement(else)('else')
PsiWhiteSpace(' ')
ELSE
IF
PsiElement(if)('if')
PsiWhiteSpace(' ')
PsiElement(LPAR)('(')
CONDITION
BINARY_EXPRESSION
BINARY_EXPRESSION
BINARY_EXPRESSION
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('0')
OPERATION_REFERENCE
PsiElement(RANGE)('..')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('n')
OPERATION_REFERENCE
PsiElement(RANGE_UNTIL)('..<')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('n')
OPERATION_REFERENCE
PsiElement(RANGE)('..')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('n')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
THEN
BLOCK
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
PsiWhiteSpace(' ')
PsiElement(else)('else')
PsiWhiteSpace(' ')
ELSE
IF
PsiElement(if)('if')
PsiWhiteSpace(' ')
PsiElement(LPAR)('(')
CONDITION
BINARY_EXPRESSION
BINARY_EXPRESSION
BINARY_EXPRESSION
BINARY_EXPRESSION
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('0')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(RANGE_UNTIL)('..<')
PsiWhiteSpace(' ')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('n')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(RANGE)('..')
PsiWhiteSpace(' ')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('n')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(RANGE_UNTIL)('..<')
PsiWhiteSpace(' ')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('n')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(RANGE_UNTIL)('..<')
PsiWhiteSpace(' ')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('n')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
THEN
BLOCK
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
PsiWhiteSpace(' ')
PsiElement(else)('else')
PsiWhiteSpace(' ')
ELSE
BLOCK
PsiElement(LBRACE)('{')
PsiWhiteSpace(' ')
BINARY_EXPRESSION
PARENTHESIZED
PsiElement(LPAR)('(')
BINARY_EXPRESSION
BINARY_EXPRESSION
PARENTHESIZED
PsiElement(LPAR)('(')
BINARY_EXPRESSION
BINARY_EXPRESSION
BINARY_EXPRESSION
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('0')
OPERATION_REFERENCE
PsiElement(PLUS)('+')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('1')
OPERATION_REFERENCE
PsiElement(RANGE_UNTIL)('..<')
BINARY_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('n')
OPERATION_REFERENCE
PsiElement(MINUS)('-')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('1')
OPERATION_REFERENCE
PsiElement(RANGE)('..')
BINARY_EXPRESSION
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('1')
OPERATION_REFERENCE
PsiElement(PLUS)('+')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('n')
PsiElement(RPAR)(')')
OPERATION_REFERENCE
PsiElement(MINUS)('-')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('1')
OPERATION_REFERENCE
PsiElement(RANGE_UNTIL)('..<')
BINARY_EXPRESSION
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('3')
OPERATION_REFERENCE
PsiElement(MUL)('*')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('n')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(RANGE_UNTIL)('..<')
PsiWhiteSpace(' ')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('n')
PsiWhiteSpace(' ')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
PsiElement(RBRACE)('}')
@@ -0,0 +1,5 @@
fun main() {
val x: ..<Int> = 1
val x = ..<Int>::class
val x = `..`<Int>::class
}
@@ -0,0 +1,72 @@
KtFile: untilOperatorGenericsClash.kt
PACKAGE_DIRECTIVE
<empty list>
IMPORT_LIST
<empty list>
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('main')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('x')
PsiElement(COLON)(':')
PsiWhiteSpace(' ')
TYPE_REFERENCE
PsiErrorElement:Type expected
PsiElement(RANGE_UNTIL)('..<')
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
PsiElement(IDENTIFIER)('Int')
PsiElement(GT)('>')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
PsiElement(INTEGER_LITERAL)('1')
PsiWhiteSpace('\n ')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('x')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiErrorElement:Expecting an expression
<empty list>
PsiWhiteSpace(' ')
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
PsiElement(RANGE_UNTIL)('..<')
PsiElement(IDENTIFIER)('Int')
PsiElement(GT)('>')
PsiElement(COLONCOLON)('::')
PsiElement(class)('class')
PsiWhiteSpace('\n ')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('x')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
CLASS_LITERAL_EXPRESSION
CALL_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('`..`')
TYPE_ARGUMENT_LIST
PsiElement(LT)('<')
TYPE_PROJECTION
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('Int')
PsiElement(GT)('>')
PsiElement(COLONCOLON)('::')
PsiElement(class)('class')
PsiWhiteSpace('\n')
PsiElement(RBRACE)('}')
@@ -0,0 +1,5 @@
fun main() {
for (i in 0..>n) {}
for (i in 0 ..> n) {}
for (i in 0.. >n) {}
}
+107
View File
@@ -0,0 +1,107 @@
KtFile: untilOperatorGreater.kt
PACKAGE_DIRECTIVE
<empty list>
IMPORT_LIST
<empty list>
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('main')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
FOR
PsiElement(for)('for')
PsiWhiteSpace(' ')
PsiElement(LPAR)('(')
VALUE_PARAMETER
PsiElement(IDENTIFIER)('i')
PsiWhiteSpace(' ')
PsiElement(in)('in')
PsiWhiteSpace(' ')
LOOP_RANGE
BINARY_EXPRESSION
BINARY_EXPRESSION
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('0')
OPERATION_REFERENCE
PsiElement(RANGE)('..')
PsiErrorElement:Expecting an element
PsiElement(GT)('>')
OPERATION_REFERENCE
PsiElement(IDENTIFIER)('n')
PsiErrorElement:Expecting an element
<empty list>
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BODY
BLOCK
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n ')
FOR
PsiElement(for)('for')
PsiWhiteSpace(' ')
PsiElement(LPAR)('(')
VALUE_PARAMETER
PsiElement(IDENTIFIER)('i')
PsiWhiteSpace(' ')
PsiElement(in)('in')
PsiWhiteSpace(' ')
LOOP_RANGE
BINARY_EXPRESSION
BINARY_EXPRESSION
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('0')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(RANGE)('..')
PsiErrorElement:Expecting an element
PsiElement(GT)('>')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(IDENTIFIER)('n')
PsiErrorElement:Expecting an element
<empty list>
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BODY
BLOCK
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n ')
FOR
PsiElement(for)('for')
PsiWhiteSpace(' ')
PsiElement(LPAR)('(')
VALUE_PARAMETER
PsiElement(IDENTIFIER)('i')
PsiWhiteSpace(' ')
PsiElement(in)('in')
PsiWhiteSpace(' ')
LOOP_RANGE
BINARY_EXPRESSION
BINARY_EXPRESSION
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('0')
OPERATION_REFERENCE
PsiElement(RANGE)('..')
PsiWhiteSpace(' ')
PsiErrorElement:Expecting an element
PsiElement(GT)('>')
OPERATION_REFERENCE
PsiElement(IDENTIFIER)('n')
PsiErrorElement:Expecting an element
<empty list>
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BODY
BLOCK
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
PsiElement(RBRACE)('}')
@@ -0,0 +1,8 @@
fun main() {
for (i in 0.. <n) {}
for (i in 0 .. <n) {}
for (i in 0 ..< n) {}
for (i in 0 .. < n) {}
for (i in 0. .< n) {}
for (i in 0 . . < n) {}
}
@@ -0,0 +1,198 @@
KtFile: untilOperatorWithWhitespace.kt
PACKAGE_DIRECTIVE
<empty list>
IMPORT_LIST
<empty list>
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('main')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
FOR
PsiElement(for)('for')
PsiWhiteSpace(' ')
PsiElement(LPAR)('(')
VALUE_PARAMETER
PsiElement(IDENTIFIER)('i')
PsiWhiteSpace(' ')
PsiElement(in)('in')
PsiWhiteSpace(' ')
LOOP_RANGE
BINARY_EXPRESSION
BINARY_EXPRESSION
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('0')
OPERATION_REFERENCE
PsiElement(RANGE)('..')
PsiWhiteSpace(' ')
PsiErrorElement:Expecting an element
PsiElement(LT)('<')
OPERATION_REFERENCE
PsiElement(IDENTIFIER)('n')
PsiErrorElement:Expecting an element
<empty list>
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BODY
BLOCK
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n ')
FOR
PsiElement(for)('for')
PsiWhiteSpace(' ')
PsiElement(LPAR)('(')
VALUE_PARAMETER
PsiElement(IDENTIFIER)('i')
PsiWhiteSpace(' ')
PsiElement(in)('in')
PsiWhiteSpace(' ')
LOOP_RANGE
BINARY_EXPRESSION
BINARY_EXPRESSION
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('0')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(RANGE)('..')
PsiWhiteSpace(' ')
PsiErrorElement:Expecting an element
PsiElement(LT)('<')
OPERATION_REFERENCE
PsiElement(IDENTIFIER)('n')
PsiErrorElement:Expecting an element
<empty list>
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BODY
BLOCK
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n ')
FOR
PsiElement(for)('for')
PsiWhiteSpace(' ')
PsiElement(LPAR)('(')
VALUE_PARAMETER
PsiElement(IDENTIFIER)('i')
PsiWhiteSpace(' ')
PsiElement(in)('in')
PsiWhiteSpace(' ')
LOOP_RANGE
BINARY_EXPRESSION
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('0')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(RANGE_UNTIL)('..<')
PsiWhiteSpace(' ')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('n')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BODY
BLOCK
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n ')
FOR
PsiElement(for)('for')
PsiWhiteSpace(' ')
PsiElement(LPAR)('(')
VALUE_PARAMETER
PsiElement(IDENTIFIER)('i')
PsiWhiteSpace(' ')
PsiElement(in)('in')
PsiWhiteSpace(' ')
LOOP_RANGE
BINARY_EXPRESSION
BINARY_EXPRESSION
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('0')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(RANGE)('..')
PsiWhiteSpace(' ')
PsiErrorElement:Expecting an element
PsiElement(LT)('<')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(IDENTIFIER)('n')
PsiErrorElement:Expecting an element
<empty list>
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BODY
BLOCK
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n ')
FOR
PsiElement(for)('for')
PsiWhiteSpace(' ')
PsiElement(LPAR)('(')
VALUE_PARAMETER
PsiElement(IDENTIFIER)('i')
PsiWhiteSpace(' ')
PsiElement(in)('in')
PsiWhiteSpace(' ')
LOOP_RANGE
BINARY_EXPRESSION
DOT_QUALIFIED_EXPRESSION
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('0')
PsiElement(DOT)('.')
PsiWhiteSpace(' ')
PsiErrorElement:Expecting an element
PsiElement(DOT)('.')
OPERATION_REFERENCE
PsiElement(LT)('<')
PsiWhiteSpace(' ')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('n')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BODY
BLOCK
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n ')
FOR
PsiElement(for)('for')
PsiWhiteSpace(' ')
PsiElement(LPAR)('(')
VALUE_PARAMETER
PsiElement(IDENTIFIER)('i')
PsiWhiteSpace(' ')
PsiElement(in)('in')
PsiWhiteSpace(' ')
LOOP_RANGE
BINARY_EXPRESSION
DOT_QUALIFIED_EXPRESSION
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('0')
PsiWhiteSpace(' ')
PsiElement(DOT)('.')
PsiWhiteSpace(' ')
PsiErrorElement:Expecting an element
PsiElement(DOT)('.')
PsiWhiteSpace(' ')
OPERATION_REFERENCE
PsiElement(LT)('<')
PsiWhiteSpace(' ')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('n')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BODY
BLOCK
PsiElement(LBRACE)('{')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n')
PsiElement(RBRACE)('}')
@@ -1855,6 +1855,26 @@ public class ParsingTestGenerated extends AbstractParsingTest {
public void testUntilOperator() throws Exception {
runTest("compiler/testData/psi/operators/untilOperator.kt");
}
@TestMetadata("untilOperatorDifferentContexts.kt")
public void testUntilOperatorDifferentContexts() throws Exception {
runTest("compiler/testData/psi/operators/untilOperatorDifferentContexts.kt");
}
@TestMetadata("untilOperatorGenericsClash.kt")
public void testUntilOperatorGenericsClash() throws Exception {
runTest("compiler/testData/psi/operators/untilOperatorGenericsClash.kt");
}
@TestMetadata("untilOperatorGreater.kt")
public void testUntilOperatorGreater() throws Exception {
runTest("compiler/testData/psi/operators/untilOperatorGreater.kt");
}
@TestMetadata("untilOperatorWithWhitespace.kt")
public void testUntilOperatorWithWhitespace() throws Exception {
runTest("compiler/testData/psi/operators/untilOperatorWithWhitespace.kt");
}
}
@TestMetadata("compiler/testData/psi/packages")