KT-8263: Conditional operators are not parsed correctly
This commit is contained in:
+22
@@ -32149,6 +32149,28 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
@TestMetadata("compiler/testData/diagnostics/tests/typeArguments")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
public class TypeArguments {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInTypeArguments() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/typeArguments"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("allowTypeArgumentListLikeExpressions.kt")
|
||||||
|
public void testAllowTypeArgumentListLikeExpressions() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/typeArguments/allowTypeArgumentListLikeExpressions.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("forbidTypeArgumentListLikeExpressions.kt")
|
||||||
|
public void testForbidTypeArgumentListLikeExpressions() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/typeArguments/forbidTypeArgumentListLikeExpressions.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Nested
|
@Nested
|
||||||
@TestMetadata("compiler/testData/diagnostics/tests/typeParameters")
|
@TestMetadata("compiler/testData/diagnostics/tests/typeParameters")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
|||||||
+22
@@ -32149,6 +32149,28 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
@TestMetadata("compiler/testData/diagnostics/tests/typeArguments")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
public class TypeArguments {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInTypeArguments() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/typeArguments"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("allowTypeArgumentListLikeExpressions.kt")
|
||||||
|
public void testAllowTypeArgumentListLikeExpressions() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/typeArguments/allowTypeArgumentListLikeExpressions.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("forbidTypeArgumentListLikeExpressions.kt")
|
||||||
|
public void testForbidTypeArgumentListLikeExpressions() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/typeArguments/forbidTypeArgumentListLikeExpressions.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Nested
|
@Nested
|
||||||
@TestMetadata("compiler/testData/diagnostics/tests/typeParameters")
|
@TestMetadata("compiler/testData/diagnostics/tests/typeParameters")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
|||||||
+22
@@ -32149,6 +32149,28 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
@TestMetadata("compiler/testData/diagnostics/tests/typeArguments")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
public class TypeArguments {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInTypeArguments() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/typeArguments"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("allowTypeArgumentListLikeExpressions.kt")
|
||||||
|
public void testAllowTypeArgumentListLikeExpressions() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/typeArguments/allowTypeArgumentListLikeExpressions.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("forbidTypeArgumentListLikeExpressions.kt")
|
||||||
|
public void testForbidTypeArgumentListLikeExpressions() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/typeArguments/forbidTypeArgumentListLikeExpressions.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Nested
|
@Nested
|
||||||
@TestMetadata("compiler/testData/diagnostics/tests/typeParameters")
|
@TestMetadata("compiler/testData/diagnostics/tests/typeParameters")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
|||||||
@@ -235,6 +235,7 @@ public interface Errors {
|
|||||||
DiagnosticFactoryForDeprecation1<PsiElement, CallableDescriptor> PROGRESSIONS_CHANGING_RESOLVE = DiagnosticFactoryForDeprecation1.create(LanguageFeature.ProgressionsChangingResolve);
|
DiagnosticFactoryForDeprecation1<PsiElement, CallableDescriptor> PROGRESSIONS_CHANGING_RESOLVE = DiagnosticFactoryForDeprecation1.create(LanguageFeature.ProgressionsChangingResolve);
|
||||||
|
|
||||||
DiagnosticFactory0<PsiElement> EXPRESSION_AFTER_TYPE_REFERENCE_WITHOUT_SPACING_NOT_ALLOWED = DiagnosticFactory0.create(ERROR);
|
DiagnosticFactory0<PsiElement> EXPRESSION_AFTER_TYPE_REFERENCE_WITHOUT_SPACING_NOT_ALLOWED = DiagnosticFactory0.create(ERROR);
|
||||||
|
DiagnosticFactory0<PsiElement> TYPE_ARGUMENT_LIST_LIKE_EXPRESSION = DiagnosticFactory0.create(ERROR);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|||||||
+1
@@ -629,6 +629,7 @@ public class DefaultErrorMessages {
|
|||||||
"See https://youtrack.jetbrains.com/issue/KT-49276 for more details. " +
|
"See https://youtrack.jetbrains.com/issue/KT-49276 for more details. " +
|
||||||
"Please specify a progression type of argument explicitly through explicit cast to resolve to a proper declaration", COMPACT);
|
"Please specify a progression type of argument explicitly through explicit cast to resolve to a proper declaration", COMPACT);
|
||||||
MAP.put(EXPRESSION_AFTER_TYPE_REFERENCE_WITHOUT_SPACING_NOT_ALLOWED, "Expression body directly after type without a whitespace in-between the '>=' is only allowed since version 1.8");
|
MAP.put(EXPRESSION_AFTER_TYPE_REFERENCE_WITHOUT_SPACING_NOT_ALLOWED, "Expression body directly after type without a whitespace in-between the '>=' is only allowed since version 1.8");
|
||||||
|
MAP.put(TYPE_ARGUMENT_LIST_LIKE_EXPRESSION, "Type argument list like expressions are only allowed since version 1.8");
|
||||||
|
|
||||||
MAP.put(TOO_MANY_ARGUMENTS, "Too many arguments for {0}", FQ_NAMES_IN_TYPES);
|
MAP.put(TOO_MANY_ARGUMENTS, "Too many arguments for {0}", FQ_NAMES_IN_TYPES);
|
||||||
|
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ private val DEFAULT_DECLARATION_CHECKERS = listOf(
|
|||||||
UnsupportedUntilRangeDeclarationChecker,
|
UnsupportedUntilRangeDeclarationChecker,
|
||||||
DataObjectContentChecker,
|
DataObjectContentChecker,
|
||||||
ExpressionAfterTypeParameterWithoutSpacingChecker,
|
ExpressionAfterTypeParameterWithoutSpacingChecker,
|
||||||
|
TypeArgumentListLikeExpressionsChecker,
|
||||||
)
|
)
|
||||||
|
|
||||||
private val DEFAULT_CALL_CHECKERS = listOf(
|
private val DEFAULT_CALL_CHECKERS = listOf(
|
||||||
|
|||||||
+50
@@ -0,0 +1,50 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.jetbrains.kotlin.resolve.checkers
|
||||||
|
|
||||||
|
import org.jetbrains.kotlin.KtNodeTypes
|
||||||
|
import org.jetbrains.kotlin.config.LanguageFeature
|
||||||
|
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
|
||||||
|
import org.jetbrains.kotlin.diagnostics.Errors
|
||||||
|
import org.jetbrains.kotlin.psi.*
|
||||||
|
import org.jetbrains.kotlin.psi.psiUtil.children
|
||||||
|
|
||||||
|
object TypeArgumentListLikeExpressionsChecker : DeclarationChecker {
|
||||||
|
|
||||||
|
override fun check(declaration: KtDeclaration, descriptor: DeclarationDescriptor, context: DeclarationCheckerContext) {
|
||||||
|
if (context.languageVersionSettings.supportsFeature(LanguageFeature.AllowTypeArgumentListLikeExpressions)) return
|
||||||
|
if (declaration.parent !is KtFile) return
|
||||||
|
|
||||||
|
val visitor = object : KtTreeVisitorVoid() {
|
||||||
|
override fun visitBinaryExpression(expression: KtBinaryExpression) {
|
||||||
|
super.visitBinaryExpression(expression)
|
||||||
|
|
||||||
|
if (wasTypeArgumentListLikeExpression(expression)) {
|
||||||
|
context.trace.report(Errors.TYPE_ARGUMENT_LIST_LIKE_EXPRESSION.on(expression.operationReference))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun visitUserType(type: KtUserType) {
|
||||||
|
super.visitUserType(type)
|
||||||
|
|
||||||
|
if (wasTypeArgumentListLikeExpression(type)) {
|
||||||
|
var parent = type.parent ?: return
|
||||||
|
while (parent !is KtBinaryExpression) {
|
||||||
|
parent = parent.parent ?: return
|
||||||
|
}
|
||||||
|
|
||||||
|
context.trace.report(Errors.TYPE_ARGUMENT_LIST_LIKE_EXPRESSION.on(parent.operationReference))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun wasTypeArgumentListLikeExpression(element: KtElement): Boolean {
|
||||||
|
return element.node.children().any { it.elementType == KtNodeTypes.TYPE_ARGUMENT_LIST_LIKE_EXPRESSION }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
declaration.accept(visitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -149,6 +149,8 @@ public interface KtNodeTypes {
|
|||||||
IElementType CLASS_LITERAL_EXPRESSION = new KtNodeType("CLASS_LITERAL_EXPRESSION", KtClassLiteralExpression.class);
|
IElementType CLASS_LITERAL_EXPRESSION = new KtNodeType("CLASS_LITERAL_EXPRESSION", KtClassLiteralExpression.class);
|
||||||
IElementType SAFE_ACCESS_EXPRESSION = new KtNodeType("SAFE_ACCESS_EXPRESSION", KtSafeQualifiedExpression.class);
|
IElementType SAFE_ACCESS_EXPRESSION = new KtNodeType("SAFE_ACCESS_EXPRESSION", KtSafeQualifiedExpression.class);
|
||||||
|
|
||||||
|
IElementType TYPE_ARGUMENT_LIST_LIKE_EXPRESSION = new IElementType("TYPE_ARGUMENT_LIST_LIKE_EXPRESSION", null);
|
||||||
|
|
||||||
IElementType OBJECT_LITERAL = new KtNodeType("OBJECT_LITERAL", KtObjectLiteralExpression.class);
|
IElementType OBJECT_LITERAL = new KtNodeType("OBJECT_LITERAL", KtObjectLiteralExpression.class);
|
||||||
|
|
||||||
IElementType WHEN = new KtNodeType("WHEN", KtWhenExpression.class);
|
IElementType WHEN = new KtNodeType("WHEN", KtWhenExpression.class);
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import com.intellij.lang.ASTNode;
|
|||||||
import com.intellij.lang.Language;
|
import com.intellij.lang.Language;
|
||||||
import com.intellij.lang.PsiBuilder;
|
import com.intellij.lang.PsiBuilder;
|
||||||
import com.intellij.openapi.project.Project;
|
import com.intellij.openapi.project.Project;
|
||||||
|
import com.intellij.psi.TokenType;
|
||||||
import com.intellij.psi.tree.IElementType;
|
import com.intellij.psi.tree.IElementType;
|
||||||
import com.intellij.psi.tree.TokenSet;
|
import com.intellij.psi.tree.TokenSet;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
@@ -68,20 +69,17 @@ public class KotlinExpressionParsing extends AbstractKotlinParsing {
|
|||||||
return builder.build();
|
return builder.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final TokenSet TYPE_ARGUMENT_LIST_STOPPERS = TokenSet.create(
|
private static final TokenSet STRONG_TYPE_ARGUMENT_LIST_POSTFIX_INDICATORS = TokenSet.orSet(
|
||||||
INTEGER_LITERAL, FLOAT_LITERAL, CHARACTER_LITERAL, OPEN_QUOTE,
|
TokenSet.create(COLONCOLON, QUEST, LBRACKET, TokenType.BAD_CHARACTER), Precedence.POSTFIX.getOperations()
|
||||||
PACKAGE_KEYWORD, AS_KEYWORD, TYPE_ALIAS_KEYWORD, INTERFACE_KEYWORD, CLASS_KEYWORD, THIS_KEYWORD, VAL_KEYWORD, VAR_KEYWORD,
|
);
|
||||||
FUN_KEYWORD, FOR_KEYWORD, NULL_KEYWORD,
|
private static final TokenSet WEAK_TYPE_ARGUMENT_LIST_POSTFIX_INDICATORS = TokenSet.create(
|
||||||
TRUE_KEYWORD, FALSE_KEYWORD, IS_KEYWORD, THROW_KEYWORD, RETURN_KEYWORD, BREAK_KEYWORD,
|
RBRACKET, RBRACE, RPAR, EQ, COLON, SEMICOLON, COMMA,
|
||||||
CONTINUE_KEYWORD, OBJECT_KEYWORD, IF_KEYWORD, TRY_KEYWORD, ELSE_KEYWORD, WHILE_KEYWORD, DO_KEYWORD,
|
|
||||||
WHEN_KEYWORD, RBRACKET, RBRACE, RPAR, PLUSPLUS, MINUSMINUS, EXCLEXCL,
|
EQEQEQ, EXCLEQEQEQ, EQEQ, EXCLEQ, ELVIS, AS_KEYWORD, IS_KEYWORD, NOT_IS, NOT_IN, RANGE, RANGE_UNTIL, ARROW,
|
||||||
// MUL,
|
|
||||||
PLUS, MINUS, EXCL, DIV, PERC, LTEQ,
|
PACKAGE_KEYWORD, CLASS_KEYWORD, INTERFACE_KEYWORD, OBJECT_KEYWORD, TYPE_ALIAS_KEYWORD, SUPER_KEYWORD, VAL_KEYWORD,
|
||||||
// TODO GTEQ, foo<bar, baz>=x
|
VAR_KEYWORD, FUN_KEYWORD, RETURN_KEYWORD, FOR_KEYWORD, WHILE_KEYWORD, DO_KEYWORD, BREAK_KEYWORD, CONTINUE_KEYWORD,
|
||||||
EQEQEQ, EXCLEQEQEQ, EQEQ, EXCLEQ, ANDAND, OROR, SAFE_ACCESS, ELVIS,
|
THROW_KEYWORD
|
||||||
SEMICOLON, RANGE, RANGE_UNTIL, EQ, MULTEQ, DIVEQ, PERCEQ, PLUSEQ, MINUSEQ, NOT_IN, NOT_IS,
|
|
||||||
COLONCOLON,
|
|
||||||
COLON
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/*package*/ static final TokenSet EXPRESSION_FIRST = TokenSet.create(
|
/*package*/ static final TokenSet EXPRESSION_FIRST = TokenSet.create(
|
||||||
@@ -168,7 +166,7 @@ public class KotlinExpressionParsing extends AbstractKotlinParsing {
|
|||||||
AS(AS_KEYWORD, AS_SAFE) {
|
AS(AS_KEYWORD, AS_SAFE) {
|
||||||
@Override
|
@Override
|
||||||
public IElementType parseRightHandSide(IElementType operation, KotlinExpressionParsing parser) {
|
public IElementType parseRightHandSide(IElementType operation, KotlinExpressionParsing parser) {
|
||||||
parser.myKotlinParsing.parseTypeRefWithoutIntersections();
|
parser.myKotlinParsing.parseTypeRefWithoutIntersections(/* partOfExpression */ true);
|
||||||
return BINARY_WITH_TYPE;
|
return BINARY_WITH_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +185,7 @@ public class KotlinExpressionParsing extends AbstractKotlinParsing {
|
|||||||
@Override
|
@Override
|
||||||
public IElementType parseRightHandSide(IElementType operation, KotlinExpressionParsing parser) {
|
public IElementType parseRightHandSide(IElementType operation, KotlinExpressionParsing parser) {
|
||||||
if (operation == IS_KEYWORD || operation == NOT_IS) {
|
if (operation == IS_KEYWORD || operation == NOT_IS) {
|
||||||
parser.myKotlinParsing.parseTypeRefWithoutIntersections();
|
parser.myKotlinParsing.parseTypeRefWithoutIntersections(/* partOfExpression */ true);
|
||||||
return IS_EXPRESSION;
|
return IS_EXPRESSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -402,7 +400,7 @@ public class KotlinExpressionParsing extends AbstractKotlinParsing {
|
|||||||
|
|
||||||
if (at(LT)) {
|
if (at(LT)) {
|
||||||
PsiBuilder.Marker typeArgumentList = mark();
|
PsiBuilder.Marker typeArgumentList = mark();
|
||||||
if (myKotlinParsing.tryParseTypeArgumentList(TYPE_ARGUMENT_LIST_STOPPERS)) {
|
if (parseCallSuffixTypeArgumentList()) {
|
||||||
typeArgumentList.error("Type arguments are not allowed");
|
typeArgumentList.error("Type arguments are not allowed");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -410,7 +408,7 @@ public class KotlinExpressionParsing extends AbstractKotlinParsing {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (at(LPAR) && !myBuilder.newlineBeforeCurrentToken()) {
|
if (isAtValueArgumentList()) {
|
||||||
PsiBuilder.Marker lpar = mark();
|
PsiBuilder.Marker lpar = mark();
|
||||||
parseCallSuffix();
|
parseCallSuffix();
|
||||||
lpar.error("This syntax is reserved for future use; to call a reference, enclose it in parentheses: (foo::bar)(args)");
|
lpar.error("This syntax is reserved for future use; to call a reference, enclose it in parentheses: (foo::bar)(args)");
|
||||||
@@ -494,37 +492,143 @@ public class KotlinExpressionParsing extends AbstractKotlinParsing {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* callSuffix
|
* callSuffix
|
||||||
* : typeArguments? valueArguments annotatedLambda
|
* : typeArguments? valueArguments? annotatedLambda*
|
||||||
* : typeArguments annotatedLambda
|
|
||||||
* ;
|
* ;
|
||||||
*/
|
*/
|
||||||
private boolean parseCallSuffix() {
|
private boolean parseCallSuffix() {
|
||||||
if (parseCallWithClosure()) {
|
if (at(LT) && parseCallSuffixTypeArgumentList()) {
|
||||||
// do nothing
|
if (at(LPAR) && !myBuilder.newlineBeforeCurrentToken()) parseValueArgumentList();
|
||||||
|
parseCallWithClosure();
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
else if (at(LPAR)) {
|
else if (at(LPAR)) {
|
||||||
parseValueArgumentList();
|
parseValueArgumentList();
|
||||||
parseCallWithClosure();
|
parseCallWithClosure();
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
else if (at(LT)) {
|
else if (parseCallWithClosure()) {
|
||||||
PsiBuilder.Marker typeArgumentList = mark();
|
return true;
|
||||||
if (myKotlinParsing.tryParseTypeArgumentList(TYPE_ARGUMENT_LIST_STOPPERS)) {
|
|
||||||
typeArgumentList.done(TYPE_ARGUMENT_LIST);
|
|
||||||
if (!myBuilder.newlineBeforeCurrentToken() && at(LPAR)) parseValueArgumentList();
|
|
||||||
parseCallWithClosure();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
typeArgumentList.rollbackTo();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean parseCallSuffixTypeArgumentList() {
|
||||||
|
PsiBuilder.Marker typeArgumentList = mark();
|
||||||
|
|
||||||
|
KotlinParsing.TypeArgumentListKind kind = myKotlinParsing.tryParseTypeArgumentList();
|
||||||
|
|
||||||
|
// If the parsed section did not fulfill the criteria of a type argument list or
|
||||||
|
// if there's no indication of an intended call suffix, drop the type argument list.
|
||||||
|
if (kind == KotlinParsing.TypeArgumentListKind.NONE) {
|
||||||
|
typeArgumentList.rollbackTo();
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isAtTypeArgumentListPostfixIndicator()) {
|
||||||
|
typeArgumentList.rollbackTo();
|
||||||
|
|
||||||
|
mark().done(TYPE_ARGUMENT_LIST_LIKE_EXPRESSION);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If the parsed section could have been a faulty type argument type list, check
|
||||||
|
// whether it could have also been parsed as the right-hand side of a comparison
|
||||||
|
// expression correctly. If so, we have never had a faulty type argument list in
|
||||||
|
// the first place, and therefor it must be dropped.
|
||||||
|
if (kind == KotlinParsing.TypeArgumentListKind.FAULTY_TYPE_ARGUMENT_LIST) {
|
||||||
|
// For better error highlighting we only try to produce a faulty type argument list, if
|
||||||
|
// there are strong indicators. Otherwise, we would lean too much towards call suffixes
|
||||||
|
// in cases like when typing "x < 0 && 1 > ", where the last element hasn't been typed
|
||||||
|
// yet.
|
||||||
|
if (!isAtStrongTypeArgumentListPostfixIndicator()) {
|
||||||
|
typeArgumentList.rollbackTo();
|
||||||
|
|
||||||
|
mark().done(TYPE_ARGUMENT_LIST_LIKE_EXPRESSION);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
typeArgumentList.rollbackTo();
|
||||||
|
|
||||||
|
if (isAtConditionalExpression()) {
|
||||||
|
mark().done(TYPE_ARGUMENT_LIST_LIKE_EXPRESSION);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
typeArgumentList = mark();
|
||||||
|
|
||||||
|
myKotlinParsing.tryParseTypeArgumentList();
|
||||||
|
}
|
||||||
|
|
||||||
|
// At this point we're sure that it's either a correct type argument list followed
|
||||||
|
// by some indication of a call suffix or that it's faulty type argument list that
|
||||||
|
// is definitely not a correct right-hand side of an expression and is followed by
|
||||||
|
// a strong indication of a call suffix.
|
||||||
|
|
||||||
|
typeArgumentList.done(TYPE_ARGUMENT_LIST);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isAtTypeArgumentListPostfixIndicator() {
|
||||||
|
return isAtStrongTypeArgumentListPostfixIndicator() || isAtWeakTypeArgumentListPostfixIndicator();
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isAtStrongTypeArgumentListPostfixIndicator() {
|
||||||
|
// The start of a value argument list or an annotated lambda indicates a type argument list.
|
||||||
|
// <...>( <...>{ <...>@identifier{ <...>identifier@{ <...>[
|
||||||
|
// Postfix expression are usually not applied to non-null boolean comparisons.
|
||||||
|
// <...>:: <...>? <...>. <...>?. <...>!! <...>++ <...>--
|
||||||
|
return isAtValueArgumentList() || isAtAnnotatedLambda() || atSet(STRONG_TYPE_ARGUMENT_LIST_POSTFIX_INDICATORS);
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isAtWeakTypeArgumentListPostfixIndicator() {
|
||||||
|
// Line breaks are only available outside of value argument list. This is an incomplete line of code.
|
||||||
|
// <...>↵
|
||||||
|
// Other limiting tokens are also a likely indicator of an indented function call.
|
||||||
|
// <...>) <...>] <...>} <...>, <...>: <...>=
|
||||||
|
// Operators are unlikely to be applied to non-null booleans.
|
||||||
|
// <...>== <...>!= <...>=== <...>!== <...> as <...> is <...> in
|
||||||
|
// Hard keywords hint towards some formatting issue where line breaks are missing
|
||||||
|
// <...>fun <...>var <...>var <...>object
|
||||||
|
return myBuilder.newlineBeforeCurrentToken() || atSet(WEAK_TYPE_ARGUMENT_LIST_POSTFIX_INDICATORS);
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean isAtConditionalExpression() {
|
||||||
|
assert _at(LT) : "caller must check that current token is LT";
|
||||||
|
|
||||||
|
PsiBuilder.Marker marker = mark();
|
||||||
|
|
||||||
|
advance(); // LT
|
||||||
|
|
||||||
|
boolean hasNoErrors;
|
||||||
|
|
||||||
|
do {
|
||||||
|
PsiBuilder.Marker errorScope = mark();
|
||||||
|
|
||||||
|
parseExpression();
|
||||||
|
|
||||||
|
hasNoErrors = !myBuilder.hasErrorsAfter(errorScope);
|
||||||
|
errorScope.drop();
|
||||||
|
|
||||||
|
if (!hasNoErrors) break;
|
||||||
|
|
||||||
|
if (at(COMMA)) {
|
||||||
|
advance();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} while (true);
|
||||||
|
|
||||||
|
marker.rollbackTo();
|
||||||
|
|
||||||
|
return hasNoErrors;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* atomicExpression typeParameters? valueParameters? functionLiteral*
|
* atomicExpression typeParameters? valueParameters? functionLiteral*
|
||||||
*/
|
*/
|
||||||
@@ -594,6 +698,24 @@ public class KotlinExpressionParsing extends AbstractKotlinParsing {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isAtAnnotatedLambda() {
|
||||||
|
// "{"
|
||||||
|
if (_at(LBRACE)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
// IDENTIFIER "@" "{"
|
||||||
|
else if (_at(IDENTIFIER) && myBuilder.rawLookup(1) == AT && myBuilder.rawLookup(2) == LBRACE) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
// "@"
|
||||||
|
else if (_at(AT)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static void doneOrDrop(
|
private static void doneOrDrop(
|
||||||
@NotNull PsiBuilder.Marker marker,
|
@NotNull PsiBuilder.Marker marker,
|
||||||
@NotNull IElementType type,
|
@NotNull IElementType type,
|
||||||
@@ -993,7 +1115,7 @@ public class KotlinExpressionParsing extends AbstractKotlinParsing {
|
|||||||
error("Expecting a type");
|
error("Expecting a type");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
myKotlinParsing.parseTypeRef();
|
myKotlinParsing.parseTypeRef(/* partOfExpression */ false);
|
||||||
}
|
}
|
||||||
condition.done(WHEN_CONDITION_IS_PATTERN);
|
condition.done(WHEN_CONDITION_IS_PATTERN);
|
||||||
break;
|
break;
|
||||||
@@ -1271,7 +1393,7 @@ public class KotlinExpressionParsing extends AbstractKotlinParsing {
|
|||||||
|
|
||||||
if (at(COLON)) {
|
if (at(COLON)) {
|
||||||
advance(); // COLON
|
advance(); // COLON
|
||||||
myKotlinParsing.parseTypeRef(ARROW_COMMA_SET);
|
myKotlinParsing.parseTypeRef(ARROW_COMMA_SET, /* partOfExpression */ false);
|
||||||
}
|
}
|
||||||
parameter.done(VALUE_PARAMETER);
|
parameter.done(VALUE_PARAMETER);
|
||||||
|
|
||||||
@@ -1497,7 +1619,7 @@ public class KotlinExpressionParsing extends AbstractKotlinParsing {
|
|||||||
|
|
||||||
if (at(COLON)) {
|
if (at(COLON)) {
|
||||||
advance(); // COLON
|
advance(); // COLON
|
||||||
myKotlinParsing.parseTypeRef(IN_KEYWORD_SET);
|
myKotlinParsing.parseTypeRef(IN_KEYWORD_SET, /* partOfExpression */ false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
parameter.done(VALUE_PARAMETER);
|
parameter.done(VALUE_PARAMETER);
|
||||||
@@ -1813,7 +1935,7 @@ public class KotlinExpressionParsing extends AbstractKotlinParsing {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* "this" ("<" type ">")? label?
|
* "super" ("<" type ">")? label?
|
||||||
*/
|
*/
|
||||||
private void parseSuperExpression() {
|
private void parseSuperExpression() {
|
||||||
assert _at(SUPER_KEYWORD);
|
assert _at(SUPER_KEYWORD);
|
||||||
@@ -1830,7 +1952,7 @@ public class KotlinExpressionParsing extends AbstractKotlinParsing {
|
|||||||
myBuilder.disableNewlines();
|
myBuilder.disableNewlines();
|
||||||
advance(); // LT
|
advance(); // LT
|
||||||
|
|
||||||
myKotlinParsing.parseTypeRef();
|
myKotlinParsing.parseTypeRef(/* partOfExpression */ false);
|
||||||
|
|
||||||
if (at(GT)) {
|
if (at(GT)) {
|
||||||
advance(); // GT
|
advance(); // GT
|
||||||
@@ -1888,6 +2010,10 @@ public class KotlinExpressionParsing extends AbstractKotlinParsing {
|
|||||||
list.done(VALUE_ARGUMENT_LIST);
|
list.done(VALUE_ARGUMENT_LIST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isAtValueArgumentList() {
|
||||||
|
return _at(LPAR) && !myBuilder.newlineBeforeCurrentToken();
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (SimpleName "=")? "*"? element
|
* (SimpleName "=")? "*"? element
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -105,6 +105,21 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
|||||||
private final static TokenSet EOL_OR_SEMICOLON_RBRACE_SET = TokenSet.create(EOL_OR_SEMICOLON, RBRACE);
|
private final static TokenSet EOL_OR_SEMICOLON_RBRACE_SET = TokenSet.create(EOL_OR_SEMICOLON, RBRACE);
|
||||||
private final static TokenSet CLASS_INTERFACE_SET = TokenSet.create(CLASS_KEYWORD, INTERFACE_KEYWORD);
|
private final static TokenSet CLASS_INTERFACE_SET = TokenSet.create(CLASS_KEYWORD, INTERFACE_KEYWORD);
|
||||||
|
|
||||||
|
private static final TokenSet TYPE_ARGUMENT_LIST_RECOVERY_SET = TokenSet.create(
|
||||||
|
INTEGER_LITERAL, FLOAT_LITERAL, CHARACTER_LITERAL, OPEN_QUOTE,
|
||||||
|
PACKAGE_KEYWORD, AS_KEYWORD, TYPE_ALIAS_KEYWORD, INTERFACE_KEYWORD, CLASS_KEYWORD, THIS_KEYWORD, VAL_KEYWORD, VAR_KEYWORD,
|
||||||
|
FUN_KEYWORD, FOR_KEYWORD, NULL_KEYWORD,
|
||||||
|
TRUE_KEYWORD, FALSE_KEYWORD, IS_KEYWORD, THROW_KEYWORD, RETURN_KEYWORD, BREAK_KEYWORD,
|
||||||
|
CONTINUE_KEYWORD, OBJECT_KEYWORD, IF_KEYWORD, TRY_KEYWORD, ELSE_KEYWORD, WHILE_KEYWORD, DO_KEYWORD,
|
||||||
|
WHEN_KEYWORD, RBRACKET, RBRACE, RPAR, PLUSPLUS, MINUSMINUS, EXCLEXCL,
|
||||||
|
// MUL,
|
||||||
|
PLUS, MINUS, EXCL, DIV, PERC, LTEQ,
|
||||||
|
GTEQ, GT, EQEQEQ, EXCLEQEQEQ, EQEQ, EXCLEQ, ANDAND, OROR, SAFE_ACCESS, ELVIS,
|
||||||
|
SEMICOLON, RANGE, RANGE_UNTIL, EQ, MULTEQ, DIVEQ, PERCEQ, PLUSEQ, MINUSEQ, NOT_IN, NOT_IS,
|
||||||
|
COLONCOLON,
|
||||||
|
COLON
|
||||||
|
);
|
||||||
|
|
||||||
static KotlinParsing createForTopLevel(SemanticWhitespaceAwarePsiBuilder builder) {
|
static KotlinParsing createForTopLevel(SemanticWhitespaceAwarePsiBuilder builder) {
|
||||||
return new KotlinParsing(builder, true);
|
return new KotlinParsing(builder, true);
|
||||||
}
|
}
|
||||||
@@ -195,7 +210,7 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
|||||||
|
|
||||||
void parseTypeCodeFragment() {
|
void parseTypeCodeFragment() {
|
||||||
PsiBuilder.Marker marker = mark();
|
PsiBuilder.Marker marker = mark();
|
||||||
parseTypeRef();
|
parseTypeRef(/* partOfExpression */ false);
|
||||||
|
|
||||||
checkForUnexpectedSymbols();
|
checkForUnexpectedSymbols();
|
||||||
|
|
||||||
@@ -714,7 +729,7 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
|||||||
if (myExpressionParsing.isAtLabelDefinitionOrMissingIdentifier()) {
|
if (myExpressionParsing.isAtLabelDefinitionOrMissingIdentifier()) {
|
||||||
myExpressionParsing.parseLabelDefinition();
|
myExpressionParsing.parseLabelDefinition();
|
||||||
}
|
}
|
||||||
parseTypeRef();
|
parseTypeRef(/* partOfExpression */ false);
|
||||||
contextReceiver.done(CONTEXT_RECEIVER);
|
contextReceiver.done(CONTEXT_RECEIVER);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -939,11 +954,11 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
|||||||
|
|
||||||
PsiBuilder.Marker reference = mark();
|
PsiBuilder.Marker reference = mark();
|
||||||
PsiBuilder.Marker typeReference = mark();
|
PsiBuilder.Marker typeReference = mark();
|
||||||
parseUserType();
|
parseUserType(/* partOfExpression */ false);
|
||||||
typeReference.done(TYPE_REFERENCE);
|
typeReference.done(TYPE_REFERENCE);
|
||||||
reference.done(CONSTRUCTOR_CALLEE);
|
reference.done(CONSTRUCTOR_CALLEE);
|
||||||
|
|
||||||
parseTypeArgumentList();
|
parseTypeArgumentList(/* partOfExpression */ false);
|
||||||
|
|
||||||
boolean whitespaceAfterAnnotation = WHITE_SPACE_OR_COMMENT_BIT_SET.contains(myBuilder.rawLookup(-1));
|
boolean whitespaceAfterAnnotation = WHITE_SPACE_OR_COMMENT_BIT_SET.contains(myBuilder.rawLookup(-1));
|
||||||
boolean shouldBeParsedNextAsFunctionalType = at(LPAR) && whitespaceAfterAnnotation && mode.withSignificantWhitespaceBeforeArguments;
|
boolean shouldBeParsedNextAsFunctionalType = at(LPAR) && whitespaceAfterAnnotation && mode.withSignificantWhitespaceBeforeArguments;
|
||||||
@@ -1425,7 +1440,7 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
|||||||
|
|
||||||
expect(EQ, "Expecting '='", TOP_LEVEL_DECLARATION_FIRST_SEMICOLON_SET);
|
expect(EQ, "Expecting '='", TOP_LEVEL_DECLARATION_FIRST_SEMICOLON_SET);
|
||||||
|
|
||||||
parseTypeRef();
|
parseTypeRef(/* partOfExpression */ false);
|
||||||
|
|
||||||
consumeIf(SEMICOLON);
|
consumeIf(SEMICOLON);
|
||||||
|
|
||||||
@@ -1497,7 +1512,7 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
|||||||
noTypeReference = false;
|
noTypeReference = false;
|
||||||
PsiBuilder.Marker type = mark();
|
PsiBuilder.Marker type = mark();
|
||||||
advance(); // COLON
|
advance(); // COLON
|
||||||
parseTypeRef();
|
parseTypeRef(/* partOfExpression */ false);
|
||||||
errorIf(type, multiDeclaration, "Type annotations are not allowed on destructuring declarations");
|
errorIf(type, multiDeclaration, "Type annotations are not allowed on destructuring declarations");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1599,7 +1614,7 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
|||||||
|
|
||||||
if (at(COLON)) {
|
if (at(COLON)) {
|
||||||
advance(); // COLON
|
advance(); // COLON
|
||||||
parseTypeRef(follow);
|
parseTypeRef(follow, /* partOfExpression */ false);
|
||||||
}
|
}
|
||||||
property.done(DESTRUCTURING_DECLARATION_ENTRY);
|
property.done(DESTRUCTURING_DECLARATION_ENTRY);
|
||||||
|
|
||||||
@@ -1694,7 +1709,7 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
|||||||
|
|
||||||
if (at(COLON)) {
|
if (at(COLON)) {
|
||||||
advance(); // COLON
|
advance(); // COLON
|
||||||
parseTypeRef();
|
parseTypeRef(/* partOfExpression */ false);
|
||||||
}
|
}
|
||||||
setterParameter.done(VALUE_PARAMETER);
|
setterParameter.done(VALUE_PARAMETER);
|
||||||
if (at(COMMA)) {
|
if (at(COMMA)) {
|
||||||
@@ -1714,7 +1729,7 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
|||||||
if (at(COLON)) {
|
if (at(COLON)) {
|
||||||
advance();
|
advance();
|
||||||
|
|
||||||
parseTypeRef();
|
parseTypeRef(/* partOfExpression */ false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (propertyComponentKind != PropertyComponentKind.FIELD) {
|
if (propertyComponentKind != PropertyComponentKind.FIELD) {
|
||||||
@@ -1808,7 +1823,7 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
|||||||
if (at(COLON)) {
|
if (at(COLON)) {
|
||||||
advance(); // COLON
|
advance(); // COLON
|
||||||
|
|
||||||
parseTypeRef();
|
parseTypeRef(/* partOfExpression */ false);
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean functionContractOccurred = parseFunctionContract();
|
boolean functionContractOccurred = parseFunctionContract();
|
||||||
@@ -1851,7 +1866,7 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
|||||||
|
|
||||||
if (!receiverPresent) return false;
|
if (!receiverPresent) return false;
|
||||||
|
|
||||||
createTruncatedBuilder(lastDot).parseTypeRefWithoutIntersections();
|
createTruncatedBuilder(lastDot).parseTypeRefWithoutIntersections(/* partOfExpression */ false);
|
||||||
|
|
||||||
if (atSet(RECEIVER_TYPE_TERMINATORS)) {
|
if (atSet(RECEIVER_TYPE_TERMINATORS)) {
|
||||||
advance(); // expectation
|
advance(); // expectation
|
||||||
@@ -1992,7 +2007,7 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
|||||||
private void parseDelegationSpecifier() {
|
private void parseDelegationSpecifier() {
|
||||||
PsiBuilder.Marker delegator = mark();
|
PsiBuilder.Marker delegator = mark();
|
||||||
PsiBuilder.Marker reference = mark();
|
PsiBuilder.Marker reference = mark();
|
||||||
parseTypeRef();
|
parseTypeRef(/* partOfExpression */ false);
|
||||||
|
|
||||||
if (at(BY_KEYWORD)) {
|
if (at(BY_KEYWORD)) {
|
||||||
reference.drop();
|
reference.drop();
|
||||||
@@ -2103,7 +2118,7 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
|||||||
|
|
||||||
expect(COLON, "Expecting ':' before the upper bound", LBRACE_RBRACE_TYPE_REF_FIRST_SET);
|
expect(COLON, "Expecting ':' before the upper bound", LBRACE_RBRACE_TYPE_REF_FIRST_SET);
|
||||||
|
|
||||||
parseTypeRef();
|
parseTypeRef(/* partOfExpression */ false);
|
||||||
|
|
||||||
constraint.done(TYPE_CONSTRAINT);
|
constraint.done(TYPE_CONSTRAINT);
|
||||||
}
|
}
|
||||||
@@ -2135,7 +2150,7 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
|||||||
|
|
||||||
if (at(COLON)) {
|
if (at(COLON)) {
|
||||||
advance(); // COLON
|
advance(); // COLON
|
||||||
parseTypeRef();
|
parseTypeRef(/* partOfExpression */ false);
|
||||||
}
|
}
|
||||||
|
|
||||||
mark.done(TYPE_PARAMETER);
|
mark.done(TYPE_PARAMETER);
|
||||||
@@ -2158,26 +2173,30 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
|||||||
* : typeReference "?"
|
* : typeReference "?"
|
||||||
* ;
|
* ;
|
||||||
*/
|
*/
|
||||||
void parseTypeRef() {
|
void parseTypeRef(boolean partOfExpression) {
|
||||||
parseTypeRef(TokenSet.EMPTY);
|
parseTypeRef(TokenSet.EMPTY, partOfExpression);
|
||||||
}
|
}
|
||||||
|
|
||||||
void parseTypeRefWithoutIntersections() {
|
void parseTypeRefWithoutIntersections(boolean partOfExpression) {
|
||||||
parseTypeRef(TokenSet.EMPTY, /* allowSimpleIntersectionTypes */ false);
|
parseTypeRef(TokenSet.EMPTY, partOfExpression, /* allowSimpleIntersectionTypes */ false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void parseTypeRef(TokenSet extraRecoverySet) {
|
void parseTypeRef(TokenSet extraRecoverySet, boolean partOfExpression) {
|
||||||
parseTypeRef(extraRecoverySet, /* allowSimpleIntersectionTypes */ true);
|
parseTypeRef(extraRecoverySet, partOfExpression, /* allowSimpleIntersectionTypes */ true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void parseTypeRef(TokenSet extraRecoverySet, boolean allowSimpleIntersectionTypes) {
|
private void parseTypeRef(TokenSet extraRecoverySet, boolean partOfExpression, boolean allowSimpleIntersectionTypes) {
|
||||||
PsiBuilder.Marker typeRefMarker = parseTypeRefContents(extraRecoverySet, allowSimpleIntersectionTypes);
|
PsiBuilder.Marker typeRefMarker = parseTypeRefContents(extraRecoverySet, partOfExpression, allowSimpleIntersectionTypes);
|
||||||
typeRefMarker.done(TYPE_REFERENCE);
|
typeRefMarker.done(TYPE_REFERENCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// The extraRecoverySet is needed for the foo(bar<x, 1, y>(z)) case, to tell whether we should stop
|
// The extraRecoverySet is needed for the foo(bar<x, 1, y>(z)) case, to tell whether we should stop
|
||||||
// on expression-indicating symbols or not
|
// on expression-indicating symbols or not
|
||||||
private PsiBuilder.Marker parseTypeRefContents(TokenSet extraRecoverySet, boolean allowSimpleIntersectionTypes) {
|
private PsiBuilder.Marker parseTypeRefContents(
|
||||||
|
TokenSet extraRecoverySet,
|
||||||
|
boolean partOfExpression,
|
||||||
|
boolean allowSimpleIntersectionTypes
|
||||||
|
) {
|
||||||
PsiBuilder.Marker typeRefMarker = mark();
|
PsiBuilder.Marker typeRefMarker = mark();
|
||||||
|
|
||||||
parseTypeModifierList();
|
parseTypeModifierList();
|
||||||
@@ -2203,14 +2222,14 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
|||||||
dynamicType.done(DYNAMIC_TYPE);
|
dynamicType.done(DYNAMIC_TYPE);
|
||||||
}
|
}
|
||||||
else if (at(IDENTIFIER) || at(PACKAGE_KEYWORD) || atParenthesizedMutableForPlatformTypes(0)) {
|
else if (at(IDENTIFIER) || at(PACKAGE_KEYWORD) || atParenthesizedMutableForPlatformTypes(0)) {
|
||||||
parseUserType();
|
parseUserType(partOfExpression);
|
||||||
}
|
}
|
||||||
else if (at(LPAR)) {
|
else if (at(LPAR)) {
|
||||||
PsiBuilder.Marker functionOrParenthesizedType = mark();
|
PsiBuilder.Marker functionOrParenthesizedType = mark();
|
||||||
|
|
||||||
// This may be a function parameter list or just a parenthesized type
|
// This may be a function parameter list or just a parenthesized type
|
||||||
advance(); // LPAR
|
advance(); // LPAR
|
||||||
parseTypeRefContents(TokenSet.EMPTY, /* allowSimpleIntersectionTypes */ true).drop(); // parenthesized types, no reference element around it is needed
|
parseTypeRefContents(TokenSet.EMPTY, /* partOfExpression */ false, /* allowSimpleIntersectionTypes */ true).drop(); // parenthesized types, no reference element around it is needed
|
||||||
|
|
||||||
if (at(RPAR) && lookahead(1) != ARROW) {
|
if (at(RPAR) && lookahead(1) != ARROW) {
|
||||||
// It's a parenthesized type
|
// It's a parenthesized type
|
||||||
@@ -2252,7 +2271,7 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
|||||||
leftTypeRef.done(TYPE_REFERENCE);
|
leftTypeRef.done(TYPE_REFERENCE);
|
||||||
|
|
||||||
advance(); // &
|
advance(); // &
|
||||||
parseTypeRef(extraRecoverySet, /* allowSimpleIntersectionTypes */ true);
|
parseTypeRef(extraRecoverySet, /* allowSimpleIntersectionTypes */ false, true /* partOfExpression */);
|
||||||
|
|
||||||
intersectionType.done(INTERSECTION_TYPE);
|
intersectionType.done(INTERSECTION_TYPE);
|
||||||
wasIntersection = true;
|
wasIntersection = true;
|
||||||
@@ -2317,7 +2336,7 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
|||||||
* - (Mutable)List<Foo>!
|
* - (Mutable)List<Foo>!
|
||||||
* - Array<(out) Foo>!
|
* - Array<(out) Foo>!
|
||||||
*/
|
*/
|
||||||
private void parseUserType() {
|
private void parseUserType(boolean partOfExpression) {
|
||||||
PsiBuilder.Marker userType = mark();
|
PsiBuilder.Marker userType = mark();
|
||||||
|
|
||||||
if (at(PACKAGE_KEYWORD)) {
|
if (at(PACKAGE_KEYWORD)) {
|
||||||
@@ -2340,7 +2359,7 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
parseTypeArgumentList();
|
parseTypeArgumentList(partOfExpression);
|
||||||
|
|
||||||
recoverOnPlatformTypeSuffix();
|
recoverOnPlatformTypeSuffix();
|
||||||
|
|
||||||
@@ -2410,20 +2429,72 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
|||||||
/*
|
/*
|
||||||
* (optionalProjection type){","}
|
* (optionalProjection type){","}
|
||||||
*/
|
*/
|
||||||
private void parseTypeArgumentList() {
|
private void parseTypeArgumentList(boolean partOfExpression) {
|
||||||
if (!at(LT)) return;
|
if (!at(LT)) return;
|
||||||
|
|
||||||
PsiBuilder.Marker list = mark();
|
PsiBuilder.Marker typeArgumentList = mark();
|
||||||
|
|
||||||
tryParseTypeArgumentList(TokenSet.EMPTY);
|
TypeArgumentListKind kind = tryParseTypeArgumentList();
|
||||||
|
|
||||||
list.done(TYPE_ARGUMENT_LIST);
|
if (kind == TypeArgumentListKind.NONE && partOfExpression) {
|
||||||
|
typeArgumentList.rollbackTo();
|
||||||
|
|
||||||
|
mark().done(TYPE_ARGUMENT_LIST_LIKE_EXPRESSION);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Type argument lists that appear inside of expressions might also be comparisons:
|
||||||
|
// some(a as Int < 3, y > z)
|
||||||
|
if (kind == TypeArgumentListKind.FAULTY_TYPE_ARGUMENT_LIST && partOfExpression) {
|
||||||
|
typeArgumentList.rollbackTo();
|
||||||
|
|
||||||
|
if (myExpressionParsing.isAtConditionalExpression()) {
|
||||||
|
mark().done(TYPE_ARGUMENT_LIST_LIKE_EXPRESSION);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
typeArgumentList = mark();
|
||||||
|
|
||||||
|
tryParseTypeArgumentList();
|
||||||
|
}
|
||||||
|
|
||||||
|
typeArgumentList.done(TYPE_ARGUMENT_LIST);
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean tryParseTypeArgumentList(TokenSet extraRecoverySet) {
|
/**
|
||||||
|
* Tries to parse a section into a type argument list and reports how successful the attempt was.
|
||||||
|
* <p>
|
||||||
|
* The returned value of the method indicates to what degree the parsed section can be considered a type
|
||||||
|
* argument list.
|
||||||
|
* <p>
|
||||||
|
* {@link TypeArgumentListKind#TYPE_ARGUMENT_LIST} states the section should most likely be considered as
|
||||||
|
* a type argument list. This is the case, if any of the following conditions apply:
|
||||||
|
* <ul>
|
||||||
|
* <li> the type argument list contains no syntax errors.
|
||||||
|
* <li> the type argument list is empty
|
||||||
|
* </ul>
|
||||||
|
* <p>
|
||||||
|
* {@link TypeArgumentListKind#FAULTY_TYPE_ARGUMENT_LIST} indicates that the section may be considered as
|
||||||
|
* a type argument list. This is the case, if any of the following conditions apply:
|
||||||
|
* <ul>
|
||||||
|
* <li> the sections contains syntax errors, but ends with a '>'
|
||||||
|
* </ul>
|
||||||
|
* <p>
|
||||||
|
* {@link TypeArgumentListKind#NONE} indicates that the section must not be considered as a type argument
|
||||||
|
* list. This is the case, if none of the above cases apply.
|
||||||
|
*/
|
||||||
|
TypeArgumentListKind tryParseTypeArgumentList() {
|
||||||
|
assert _at(LT) : "caller must check that current token is LT";
|
||||||
|
|
||||||
|
PsiBuilder.Marker errorScope = mark();
|
||||||
|
|
||||||
myBuilder.disableNewlines();
|
myBuilder.disableNewlines();
|
||||||
advance(); // LT
|
advance(); // LT
|
||||||
|
|
||||||
|
// Even if the type argument list is empty, we still want to "try" to parse it in
|
||||||
|
// order to get error highlighting for the missing type
|
||||||
|
boolean empty = at(GT) || at(GTEQ);
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
PsiBuilder.Marker projection = mark();
|
PsiBuilder.Marker projection = mark();
|
||||||
|
|
||||||
@@ -2437,25 +2508,46 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
|||||||
advance(); // MUL
|
advance(); // MUL
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
parseTypeRef(extraRecoverySet);
|
parseTypeRef(TYPE_ARGUMENT_LIST_RECOVERY_SET, /* partOfExpression */ false);
|
||||||
}
|
}
|
||||||
projection.done(TYPE_PROJECTION);
|
projection.done(TYPE_PROJECTION);
|
||||||
|
|
||||||
if (!at(COMMA)) break;
|
if (!at(COMMA)) break;
|
||||||
advance(); // COMMA
|
advance(); // COMMA
|
||||||
if (at(GT)) {
|
if (at(GT) || at(GTEQ)) break;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
myBuilder.disableJoiningComplexTokens();
|
||||||
|
|
||||||
boolean atGT = at(GT);
|
boolean atGT = at(GT);
|
||||||
if (!atGT) {
|
|
||||||
error("Expecting a '>'");
|
if (atGT) {
|
||||||
}
|
|
||||||
else {
|
|
||||||
advance(); // GT
|
advance(); // GT
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
error("Expecting a '>'");
|
||||||
|
}
|
||||||
|
|
||||||
|
myBuilder.restoreJoiningComplexTokensState();
|
||||||
|
|
||||||
myBuilder.restoreNewlinesState();
|
myBuilder.restoreNewlinesState();
|
||||||
return atGT;
|
|
||||||
|
boolean success = !myBuilder.hasErrorsAfter(errorScope);
|
||||||
|
errorScope.drop();
|
||||||
|
|
||||||
|
if (success || empty) {
|
||||||
|
return TypeArgumentListKind.TYPE_ARGUMENT_LIST;
|
||||||
|
}
|
||||||
|
else if (atGT) {
|
||||||
|
return TypeArgumentListKind.FAULTY_TYPE_ARGUMENT_LIST;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return TypeArgumentListKind.NONE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum TypeArgumentListKind {
|
||||||
|
TYPE_ARGUMENT_LIST, FAULTY_TYPE_ARGUMENT_LIST, NONE,
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -2473,7 +2565,7 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
|||||||
parseValueParameterList(true, /* typeRequired = */ true, TokenSet.EMPTY);
|
parseValueParameterList(true, /* typeRequired = */ true, TokenSet.EMPTY);
|
||||||
|
|
||||||
expect(ARROW, "Expecting '->' to specify return type of a function type", TYPE_REF_FIRST);
|
expect(ARROW, "Expecting '->' to specify return type of a function type", TYPE_REF_FIRST);
|
||||||
parseTypeRef();
|
parseTypeRef(/* partOfExpression */ false);
|
||||||
|
|
||||||
return functionType;
|
return functionType;
|
||||||
}
|
}
|
||||||
@@ -2513,7 +2605,7 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
|||||||
if (!tryParseValueParameter(typeRequired)) {
|
if (!tryParseValueParameter(typeRequired)) {
|
||||||
PsiBuilder.Marker valueParameter = mark();
|
PsiBuilder.Marker valueParameter = mark();
|
||||||
parseFunctionTypeValueParameterModifierList();
|
parseFunctionTypeValueParameterModifierList();
|
||||||
parseTypeRef();
|
parseTypeRef(/* partOfExpression */ false);
|
||||||
closeDeclarationWithCommentBinders(valueParameter, VALUE_PARAMETER, false);
|
closeDeclarationWithCommentBinders(valueParameter, VALUE_PARAMETER, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2593,7 +2685,7 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
|||||||
else {
|
else {
|
||||||
noErrors = false;
|
noErrors = false;
|
||||||
}
|
}
|
||||||
parseTypeRef();
|
parseTypeRef(/* partOfExpression */ false);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
expect(IDENTIFIER, "Parameter name expected", PARAMETER_NAME_RECOVERY_SET);
|
expect(IDENTIFIER, "Parameter name expected", PARAMETER_NAME_RECOVERY_SET);
|
||||||
@@ -2608,7 +2700,7 @@ public class KotlinParsing extends AbstractKotlinParsing {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
parseTypeRef();
|
parseTypeRef(/* partOfExpression */ false);
|
||||||
}
|
}
|
||||||
else if (typeRequired) {
|
else if (typeRequired) {
|
||||||
errorWithRecovery("Parameters must have type annotation", PARAMETER_NAME_RECOVERY_SET);
|
errorWithRecovery("Parameters must have type annotation", PARAMETER_NAME_RECOVERY_SET);
|
||||||
|
|||||||
@@ -34,4 +34,6 @@ public interface SemanticWhitespaceAwarePsiBuilder extends PsiBuilder {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean isWhitespaceOrComment(@NotNull IElementType elementType);
|
boolean isWhitespaceOrComment(@NotNull IElementType elementType);
|
||||||
|
|
||||||
|
boolean hasErrorsAfter(@NotNull PsiBuilder.Marker marker);
|
||||||
}
|
}
|
||||||
|
|||||||
+5
@@ -68,4 +68,9 @@ public class SemanticWhitespaceAwarePsiBuilderAdapter extends PsiBuilderAdapter
|
|||||||
public boolean isWhitespaceOrComment(@NotNull IElementType elementType) {
|
public boolean isWhitespaceOrComment(@NotNull IElementType elementType) {
|
||||||
return myBuilder.isWhitespaceOrComment(elementType);
|
return myBuilder.isWhitespaceOrComment(elementType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasErrorsAfter(@NotNull Marker marker) {
|
||||||
|
return myBuilder.hasErrorsAfter(marker);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+6
@@ -202,4 +202,10 @@ public class SemanticWhitespaceAwarePsiBuilderImpl extends PsiBuilderAdapter imp
|
|||||||
}
|
}
|
||||||
return getJoinedTokenType(super.lookAhead(steps), 2);
|
return getJoinedTokenType(super.lookAhead(steps), 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasErrorsAfter(@NotNull Marker marker) {
|
||||||
|
assert delegateImpl != null : "PsiBuilderImpl not found";
|
||||||
|
return delegateImpl.hasErrorsAfter(marker);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
// SKIP_TXT
|
|
||||||
// ISSUE: KT-8263
|
|
||||||
|
|
||||||
fun test(x: Int, y: Int) {
|
|
||||||
if (<!CONDITION_TYPE_MISMATCH!>x < (<!SYNTAX!>if<!><!SYNTAX!><!> <!SYNTAX!>(<!><!UNRESOLVED_REFERENCE!><!SYNTAX!><!>y<!> ><!><!SYNTAX!><!> 115<!SYNTAX!>) 1 else 2))<!> {
|
|
||||||
Unit
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
// SKIP_TXT
|
// SKIP_TXT
|
||||||
// ISSUE: KT-8263
|
// ISSUE: KT-8263
|
||||||
|
|
||||||
fun test(x: Int, y: Int) {
|
fun test(x: Int, y: Int) {
|
||||||
if (<!UNRESOLVED_REFERENCE!>x<!> < (<!SYNTAX!>if<!><!SYNTAX!><!> <!SYNTAX!>(<!><!UNRESOLVED_REFERENCE!><!SYNTAX!><!>y<!> ><!SYNTAX!><!> 115<!SYNTAX!>) 1 else 2))<!> {
|
if (x < (if (y > 115) 1 else 2)) {
|
||||||
Unit
|
Unit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
|
// !LANGUAGE: +AllowTypeArgumentListLikeExpressions
|
||||||
|
// ISSUE: KT-8263
|
||||||
|
|
||||||
|
fun f(x: Int, y: Int, z: () -> Any, a: (Boolean, Boolean) -> Unit, b: (Any?) -> Unit) {
|
||||||
|
a(x < -1, (-3) > 3)
|
||||||
|
a(x < (-1), -3 > 3)
|
||||||
|
a(x < (-1), (-3) > 3)
|
||||||
|
a(x < y, -3 > 3)
|
||||||
|
a(x < y, x > 2)
|
||||||
|
|
||||||
|
b(x < if (y > (0)) y else 0)
|
||||||
|
b(x < (if (y > (0)) y else 0))
|
||||||
|
b(x < when (y > (0)) { else -> 0 })
|
||||||
|
b(x < (when (y > (0)) { else -> 0 }))
|
||||||
|
|
||||||
|
b(z() as Int < 15)
|
||||||
|
b(z() as Int < y)
|
||||||
|
b(z() is Int < true)
|
||||||
|
b(z() !is Int < true)
|
||||||
|
b(z() !is Int < true > false)
|
||||||
|
}
|
||||||
+4
@@ -0,0 +1,4 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public fun f(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int, /*2*/ z: () -> kotlin.Any, /*3*/ a: (kotlin.Boolean, kotlin.Boolean) -> kotlin.Unit, /*4*/ b: (kotlin.Any?) -> kotlin.Unit): kotlin.Unit
|
||||||
|
|
||||||
Vendored
+21
@@ -0,0 +1,21 @@
|
|||||||
|
// !LANGUAGE: -AllowTypeArgumentListLikeExpressions
|
||||||
|
// ISSUE: KT-8263
|
||||||
|
|
||||||
|
fun f(x: Int, y: Int, z: () -> Any, a: (Boolean, Boolean) -> Unit, b: (Any?) -> Unit) {
|
||||||
|
a(x < -1, (-3) > 3)
|
||||||
|
a(x < (-1), -3 > 3)
|
||||||
|
a(x < (-1), (-3) > 3)
|
||||||
|
a(x < y, -3 > 3)
|
||||||
|
a(x < y, x > 2)
|
||||||
|
|
||||||
|
b(x < if (y > (0)) y else 0)
|
||||||
|
b(x < (if (y > (0)) y else 0))
|
||||||
|
b(x < when (y > (0)) { else -> 0 })
|
||||||
|
b(x < (when (y > (0)) { else -> 0 }))
|
||||||
|
|
||||||
|
b(z() as Int < 15)
|
||||||
|
b(z() as Int < y)
|
||||||
|
b(z() is Int < true)
|
||||||
|
b(z() !is Int < true)
|
||||||
|
b(z() !is Int < true > false)
|
||||||
|
}
|
||||||
+21
@@ -0,0 +1,21 @@
|
|||||||
|
// !LANGUAGE: -AllowTypeArgumentListLikeExpressions
|
||||||
|
// ISSUE: KT-8263
|
||||||
|
|
||||||
|
fun f(x: Int, y: Int, z: () -> Any, a: (Boolean, Boolean) -> Unit, b: (Any?) -> Unit) {
|
||||||
|
a(x < -1, (-3) > 3)
|
||||||
|
a(x < (-1), -3 > 3)
|
||||||
|
a(x <!TYPE_ARGUMENT_LIST_LIKE_EXPRESSION!><<!> (-1), (-3) > 3)
|
||||||
|
a(x < y, -3 > 3)
|
||||||
|
a(x <!TYPE_ARGUMENT_LIST_LIKE_EXPRESSION!><<!> y, x > 2)
|
||||||
|
|
||||||
|
b(x < if (y > (0)) y else 0)
|
||||||
|
b(x <!TYPE_ARGUMENT_LIST_LIKE_EXPRESSION!><<!> (if (y > (0)) y else 0))
|
||||||
|
b(x < when (y > (0)) { else -> 0 })
|
||||||
|
b(x <!TYPE_ARGUMENT_LIST_LIKE_EXPRESSION!><<!> (when (y > (0)) { else -> 0 }))
|
||||||
|
|
||||||
|
b(z() as Int <!TYPE_ARGUMENT_LIST_LIKE_EXPRESSION!><<!> 15)
|
||||||
|
b(z() as Int <!TYPE_ARGUMENT_LIST_LIKE_EXPRESSION!><<!> y)
|
||||||
|
b(z() is Int <!TYPE_ARGUMENT_LIST_LIKE_EXPRESSION!><<!> true)
|
||||||
|
b(z() !is Int <!TYPE_ARGUMENT_LIST_LIKE_EXPRESSION!><<!> true)
|
||||||
|
b(z() !is Int <!TYPE_ARGUMENT_LIST_LIKE_EXPRESSION!><<!> true > false)
|
||||||
|
}
|
||||||
Vendored
+4
@@ -0,0 +1,4 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public fun f(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int, /*2*/ z: () -> kotlin.Any, /*3*/ a: (kotlin.Boolean, kotlin.Boolean) -> kotlin.Unit, /*4*/ b: (kotlin.Any?) -> kotlin.Unit): kotlin.Unit
|
||||||
|
|
||||||
+43
-39
@@ -159,37 +159,39 @@ KtFile: DoubleColon_ERR.kt
|
|||||||
REFERENCE_EXPRESSION
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('a')
|
PsiElement(IDENTIFIER)('a')
|
||||||
PsiErrorElement:Type arguments are not allowed
|
PsiErrorElement:Type arguments are not allowed
|
||||||
PsiElement(LT)('<')
|
TYPE_ARGUMENT_LIST
|
||||||
TYPE_PROJECTION
|
PsiElement(LT)('<')
|
||||||
TYPE_REFERENCE
|
TYPE_PROJECTION
|
||||||
USER_TYPE
|
TYPE_REFERENCE
|
||||||
REFERENCE_EXPRESSION
|
USER_TYPE
|
||||||
PsiElement(IDENTIFIER)('b')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(GT)('>')
|
PsiElement(IDENTIFIER)('b')
|
||||||
|
PsiElement(GT)('>')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
CALLABLE_REFERENCE_EXPRESSION
|
CALLABLE_REFERENCE_EXPRESSION
|
||||||
PsiElement(COLONCOLON)('::')
|
PsiElement(COLONCOLON)('::')
|
||||||
REFERENCE_EXPRESSION
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('a')
|
PsiElement(IDENTIFIER)('a')
|
||||||
PsiErrorElement:Type arguments are not allowed
|
PsiErrorElement:Type arguments are not allowed
|
||||||
PsiElement(LT)('<')
|
TYPE_ARGUMENT_LIST
|
||||||
TYPE_PROJECTION
|
PsiElement(LT)('<')
|
||||||
TYPE_REFERENCE
|
TYPE_PROJECTION
|
||||||
USER_TYPE
|
TYPE_REFERENCE
|
||||||
REFERENCE_EXPRESSION
|
USER_TYPE
|
||||||
PsiElement(IDENTIFIER)('b')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(COMMA)(',')
|
PsiElement(IDENTIFIER)('b')
|
||||||
TYPE_PROJECTION
|
PsiElement(COMMA)(',')
|
||||||
TYPE_REFERENCE
|
TYPE_PROJECTION
|
||||||
USER_TYPE
|
TYPE_REFERENCE
|
||||||
REFERENCE_EXPRESSION
|
USER_TYPE
|
||||||
PsiElement(IDENTIFIER)('c')
|
REFERENCE_EXPRESSION
|
||||||
TYPE_ARGUMENT_LIST
|
PsiElement(IDENTIFIER)('c')
|
||||||
PsiElement(LT)('<')
|
TYPE_ARGUMENT_LIST
|
||||||
TYPE_PROJECTION
|
PsiElement(LT)('<')
|
||||||
PsiElement(MUL)('*')
|
TYPE_PROJECTION
|
||||||
PsiElement(GT)('>')
|
PsiElement(MUL)('*')
|
||||||
PsiElement(GT)('>')
|
PsiElement(GT)('>')
|
||||||
|
PsiElement(GT)('>')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
CALLABLE_REFERENCE_EXPRESSION
|
CALLABLE_REFERENCE_EXPRESSION
|
||||||
REFERENCE_EXPRESSION
|
REFERENCE_EXPRESSION
|
||||||
@@ -198,26 +200,28 @@ KtFile: DoubleColon_ERR.kt
|
|||||||
REFERENCE_EXPRESSION
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('b')
|
PsiElement(IDENTIFIER)('b')
|
||||||
PsiErrorElement:Type arguments are not allowed
|
PsiErrorElement:Type arguments are not allowed
|
||||||
PsiElement(LT)('<')
|
TYPE_ARGUMENT_LIST
|
||||||
TYPE_PROJECTION
|
PsiElement(LT)('<')
|
||||||
TYPE_REFERENCE
|
TYPE_PROJECTION
|
||||||
USER_TYPE
|
TYPE_REFERENCE
|
||||||
REFERENCE_EXPRESSION
|
USER_TYPE
|
||||||
PsiElement(IDENTIFIER)('c')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(GT)('>')
|
PsiElement(IDENTIFIER)('c')
|
||||||
|
PsiElement(GT)('>')
|
||||||
PsiWhiteSpace('\n\n ')
|
PsiWhiteSpace('\n\n ')
|
||||||
CALLABLE_REFERENCE_EXPRESSION
|
CALLABLE_REFERENCE_EXPRESSION
|
||||||
PsiElement(COLONCOLON)('::')
|
PsiElement(COLONCOLON)('::')
|
||||||
REFERENCE_EXPRESSION
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('a')
|
PsiElement(IDENTIFIER)('a')
|
||||||
PsiErrorElement:Type arguments are not allowed
|
PsiErrorElement:Type arguments are not allowed
|
||||||
PsiElement(LT)('<')
|
TYPE_ARGUMENT_LIST
|
||||||
TYPE_PROJECTION
|
PsiElement(LT)('<')
|
||||||
TYPE_REFERENCE
|
TYPE_PROJECTION
|
||||||
USER_TYPE
|
TYPE_REFERENCE
|
||||||
REFERENCE_EXPRESSION
|
USER_TYPE
|
||||||
PsiElement(IDENTIFIER)('b')
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(GT)('>')
|
PsiElement(IDENTIFIER)('b')
|
||||||
|
PsiElement(GT)('>')
|
||||||
PsiErrorElement:This syntax is reserved for future use; to call a reference, enclose it in parentheses: (foo::bar)(args)
|
PsiErrorElement:This syntax is reserved for future use; to call a reference, enclose it in parentheses: (foo::bar)(args)
|
||||||
VALUE_ARGUMENT_LIST
|
VALUE_ARGUMENT_LIST
|
||||||
PsiElement(LPAR)('(')
|
PsiElement(LPAR)('(')
|
||||||
|
|||||||
+36
-40
@@ -299,50 +299,46 @@ KtFile: TypeExpressionAmbiguities_ERR.kt
|
|||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('c')
|
PsiElement(IDENTIFIER)('c')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
BINARY_WITH_TYPE
|
BINARY_EXPRESSION
|
||||||
REFERENCE_EXPRESSION
|
BINARY_WITH_TYPE
|
||||||
PsiElement(IDENTIFIER)('d')
|
REFERENCE_EXPRESSION
|
||||||
PsiWhiteSpace(' ')
|
PsiElement(IDENTIFIER)('d')
|
||||||
OPERATION_REFERENCE
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(as)('as')
|
OPERATION_REFERENCE
|
||||||
PsiWhiteSpace(' ')
|
PsiElement(as)('as')
|
||||||
TYPE_REFERENCE
|
PsiWhiteSpace(' ')
|
||||||
USER_TYPE
|
TYPE_REFERENCE
|
||||||
REFERENCE_EXPRESSION
|
USER_TYPE
|
||||||
PsiElement(IDENTIFIER)('Foo')
|
REFERENCE_EXPRESSION
|
||||||
PsiWhiteSpace(' ')
|
PsiElement(IDENTIFIER)('Foo')
|
||||||
TYPE_ARGUMENT_LIST
|
|
||||||
PsiElement(LT)('<')
|
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
TYPE_PROJECTION
|
TYPE_ARGUMENT_LIST_LIKE_EXPRESSION
|
||||||
TYPE_REFERENCE
|
|
||||||
USER_TYPE
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('bar')
|
|
||||||
PsiErrorElement:Expecting a '>'
|
|
||||||
<empty list>
|
<empty list>
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('bar')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
IS_EXPRESSION
|
BINARY_EXPRESSION
|
||||||
REFERENCE_EXPRESSION
|
IS_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('x')
|
REFERENCE_EXPRESSION
|
||||||
PsiWhiteSpace(' ')
|
PsiElement(IDENTIFIER)('x')
|
||||||
OPERATION_REFERENCE
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(is)('is')
|
OPERATION_REFERENCE
|
||||||
PsiWhiteSpace(' ')
|
PsiElement(is)('is')
|
||||||
TYPE_REFERENCE
|
PsiWhiteSpace(' ')
|
||||||
USER_TYPE
|
TYPE_REFERENCE
|
||||||
REFERENCE_EXPRESSION
|
USER_TYPE
|
||||||
PsiElement(IDENTIFIER)('Foo')
|
REFERENCE_EXPRESSION
|
||||||
PsiWhiteSpace(' ')
|
PsiElement(IDENTIFIER)('Foo')
|
||||||
TYPE_ARGUMENT_LIST
|
|
||||||
PsiElement(LT)('<')
|
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
TYPE_PROJECTION
|
TYPE_ARGUMENT_LIST_LIKE_EXPRESSION
|
||||||
TYPE_REFERENCE
|
|
||||||
USER_TYPE
|
|
||||||
REFERENCE_EXPRESSION
|
|
||||||
PsiElement(IDENTIFIER)('bar')
|
|
||||||
PsiErrorElement:Expecting a '>'
|
|
||||||
<empty list>
|
<empty list>
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('bar')
|
||||||
PsiWhiteSpace('\n')
|
PsiWhiteSpace('\n')
|
||||||
PsiElement(RBRACE)('}')
|
PsiElement(RBRACE)('}')
|
||||||
+36
-45
@@ -37,57 +37,48 @@ KtFile: complicateLTGT.kt
|
|||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(LPAR)('(')
|
PsiElement(LPAR)('(')
|
||||||
CONDITION
|
CONDITION
|
||||||
CALL_EXPRESSION
|
BINARY_EXPRESSION
|
||||||
REFERENCE_EXPRESSION
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('x')
|
PsiElement(IDENTIFIER)('x')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
TYPE_ARGUMENT_LIST
|
TYPE_ARGUMENT_LIST_LIKE_EXPRESSION
|
||||||
|
<empty list>
|
||||||
|
OPERATION_REFERENCE
|
||||||
PsiElement(LT)('<')
|
PsiElement(LT)('<')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
TYPE_PROJECTION
|
PARENTHESIZED
|
||||||
TYPE_REFERENCE
|
PsiElement(LPAR)('(')
|
||||||
FUNCTION_TYPE
|
IF
|
||||||
VALUE_PARAMETER_LIST
|
PsiElement(if)('if')
|
||||||
PsiElement(LPAR)('(')
|
PsiWhiteSpace(' ')
|
||||||
VALUE_PARAMETER
|
PsiElement(LPAR)('(')
|
||||||
TYPE_REFERENCE
|
CONDITION
|
||||||
PsiErrorElement:Type expected
|
BINARY_EXPRESSION
|
||||||
PsiElement(if)('if')
|
REFERENCE_EXPRESSION
|
||||||
PsiErrorElement:Expecting comma or ')'
|
PsiElement(IDENTIFIER)('y')
|
||||||
<empty list>
|
PsiWhiteSpace(' ')
|
||||||
PsiWhiteSpace(' ')
|
OPERATION_REFERENCE
|
||||||
PsiErrorElement:Expecting ')'
|
PsiElement(GT)('>')
|
||||||
PsiElement(LPAR)('(')
|
PsiWhiteSpace(' ')
|
||||||
PsiErrorElement:Expecting '->' to specify return type of a function type
|
INTEGER_CONSTANT
|
||||||
<empty list>
|
PsiElement(INTEGER_LITERAL)('115')
|
||||||
TYPE_REFERENCE
|
PsiElement(RPAR)(')')
|
||||||
USER_TYPE
|
PsiWhiteSpace(' ')
|
||||||
REFERENCE_EXPRESSION
|
THEN
|
||||||
PsiElement(IDENTIFIER)('y')
|
INTEGER_CONSTANT
|
||||||
PsiWhiteSpace(' ')
|
PsiElement(INTEGER_LITERAL)('1')
|
||||||
PsiElement(GT)('>')
|
PsiWhiteSpace(' ')
|
||||||
PsiErrorElement:Expecting ')
|
PsiElement(else)('else')
|
||||||
<empty list>
|
PsiWhiteSpace(' ')
|
||||||
|
ELSE
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('2')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
THEN
|
THEN
|
||||||
INTEGER_CONSTANT
|
|
||||||
PsiElement(INTEGER_LITERAL)('115')
|
|
||||||
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
|
|
||||||
PsiElement(RPAR)(')')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(INTEGER_LITERAL)('1')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(else)('else')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(INTEGER_LITERAL)('2')
|
|
||||||
PsiElement(RPAR)(')')
|
|
||||||
PsiElement(RPAR)(')')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
LAMBDA_EXPRESSION
|
|
||||||
FUNCTION_LITERAL
|
|
||||||
PsiElement(LBRACE)('{')
|
|
||||||
BLOCK
|
BLOCK
|
||||||
<empty list>
|
PsiElement(LBRACE)('{')
|
||||||
PsiElement(RBRACE)('}')
|
PsiElement(RBRACE)('}')
|
||||||
PsiWhiteSpace('\n')
|
PsiWhiteSpace('\n')
|
||||||
PsiElement(RBRACE)('}')
|
PsiElement(RBRACE)('}')
|
||||||
+2
@@ -41,6 +41,8 @@ KtFile: complicateLTGTE.kt
|
|||||||
REFERENCE_EXPRESSION
|
REFERENCE_EXPRESSION
|
||||||
PsiElement(IDENTIFIER)('x')
|
PsiElement(IDENTIFIER)('x')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_ARGUMENT_LIST_LIKE_EXPRESSION
|
||||||
|
<empty list>
|
||||||
OPERATION_REFERENCE
|
OPERATION_REFERENCE
|
||||||
PsiElement(LT)('<')
|
PsiElement(LT)('<')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
|
|||||||
+40
@@ -0,0 +1,40 @@
|
|||||||
|
fun f() {
|
||||||
|
a(x < 1, 2 > 3)
|
||||||
|
a(x < 0x32, (9f) > 3)
|
||||||
|
a(x < (2.0), 2 > 3)
|
||||||
|
a(x < (-1), (-3) > 3)
|
||||||
|
a(x < y > false)
|
||||||
|
|
||||||
|
a(x < "", 2 > (3))
|
||||||
|
a(x < y, false > { 3 })
|
||||||
|
a(x < (1), 2 > (3))
|
||||||
|
a(x < (1), (2) > { 3 })
|
||||||
|
a(x < (y + z), z > (3))
|
||||||
|
a(x < y, z - w > { 10 })
|
||||||
|
a(x < y++, z > { 7 })
|
||||||
|
a(x < y, -z > (1))
|
||||||
|
a(x < y + 1 > (0))
|
||||||
|
a(x < (y + 1) > (false))
|
||||||
|
a(x < (y++) > (false))
|
||||||
|
a(x < y!! > (false))
|
||||||
|
a(x < (y!!) > (false))
|
||||||
|
a(x < (if (z > (y)) 1 else 0))
|
||||||
|
a(x < (when (z > (y)) { else -> 5 }))
|
||||||
|
a(x < y && z > (0))
|
||||||
|
a(x < y || z > { 3.141 })
|
||||||
|
|
||||||
|
a(x as Int < 1)
|
||||||
|
a(x as Int < y)
|
||||||
|
a(x as Int < 3 > false)
|
||||||
|
a(x as? Int < 10)
|
||||||
|
a(x as? Int < y)
|
||||||
|
a(x as? Int < 0.3 > "false")
|
||||||
|
a(x is Int < 100L)
|
||||||
|
a(x is Int < y)
|
||||||
|
a(x is Int < true > z)
|
||||||
|
a(x !is Int < 1000.0)
|
||||||
|
a(x !is Int < y)
|
||||||
|
a(x !is Int < 0b110 > 'c')
|
||||||
|
a(x !is Int < (if (z > (y)) 1 else 0))
|
||||||
|
a(x as Int < (when (z > (y)) { else -> 5 }))
|
||||||
|
}
|
||||||
+1308
File diff suppressed because it is too large
Load Diff
Vendored
+27
@@ -0,0 +1,27 @@
|
|||||||
|
fun f() {
|
||||||
|
(x)<y, z>(0)
|
||||||
|
x[]<y, z>(0)
|
||||||
|
this<y, z>(0)
|
||||||
|
super<y, z>(0)
|
||||||
|
this<y, z>(0)
|
||||||
|
object : C{}<y, z>(0)
|
||||||
|
throw<y, z>(0)
|
||||||
|
return<y, z>(0)
|
||||||
|
continue<y, z>(0)
|
||||||
|
break<y, z>(0)
|
||||||
|
if (x < 0) { 1 } else { 1 }<y, z>(0)
|
||||||
|
when { else -> 1 }<y, z>(0)
|
||||||
|
try { 1 } finally {}<y, z>(0)
|
||||||
|
for (i in 0 until 10) {}<y, z>(0)
|
||||||
|
while (true) {}<y, z>(0)
|
||||||
|
do {} while (true)<y, z>(0)
|
||||||
|
x<y, z>(0);
|
||||||
|
{ x }<y, z>(0)
|
||||||
|
""<y, z>(0)
|
||||||
|
1<y, z>(0)
|
||||||
|
0L<y, z>(0)
|
||||||
|
3.141<y, z>(0)
|
||||||
|
2.718f<y, z>(0)
|
||||||
|
0xF7E<y, z>(0)
|
||||||
|
0b101<y, z>(0)
|
||||||
|
}
|
||||||
Vendored
+785
@@ -0,0 +1,785 @@
|
|||||||
|
KtFile: callExpressionsAnyLHSAtomicExpression.kt
|
||||||
|
PACKAGE_DIRECTIVE
|
||||||
|
<empty list>
|
||||||
|
IMPORT_LIST
|
||||||
|
<empty list>
|
||||||
|
FUN
|
||||||
|
PsiElement(fun)('fun')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(IDENTIFIER)('f')
|
||||||
|
VALUE_PARAMETER_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
PARENTHESIZED
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
ARRAY_ACCESS_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
INDICES
|
||||||
|
PsiElement(LBRACKET)('[')
|
||||||
|
PsiErrorElement:Expecting an index element
|
||||||
|
<empty list>
|
||||||
|
PsiElement(RBRACKET)(']')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
THIS_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(this)('this')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
SUPER_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(super)('super')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
THIS_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(this)('this')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
OBJECT_LITERAL
|
||||||
|
OBJECT_DECLARATION
|
||||||
|
PsiElement(object)('object')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(COLON)(':')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
SUPER_TYPE_LIST
|
||||||
|
SUPER_TYPE_ENTRY
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('C')
|
||||||
|
CLASS_BODY
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
THROW
|
||||||
|
PsiElement(throw)('throw')
|
||||||
|
PsiErrorElement:Expecting an expression
|
||||||
|
<empty list>
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
RETURN
|
||||||
|
PsiElement(return)('return')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
CONTINUE
|
||||||
|
PsiElement(continue)('continue')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
BREAK
|
||||||
|
PsiElement(break)('break')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
IF
|
||||||
|
PsiElement(if)('if')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
CONDITION
|
||||||
|
BINARY_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
THEN
|
||||||
|
BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('1')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(else)('else')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
ELSE
|
||||||
|
BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('1')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
WHEN
|
||||||
|
PsiElement(when)('when')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
WHEN_ENTRY
|
||||||
|
PsiElement(else)('else')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(ARROW)('->')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('1')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
TRY
|
||||||
|
PsiElement(try)('try')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('1')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
FINALLY
|
||||||
|
PsiElement(finally)('finally')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
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(IDENTIFIER)('until')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('10')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BODY
|
||||||
|
BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
WHILE
|
||||||
|
PsiElement(while)('while')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
CONDITION
|
||||||
|
BOOLEAN_CONSTANT
|
||||||
|
PsiElement(true)('true')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BODY
|
||||||
|
BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
DO_WHILE
|
||||||
|
PsiElement(do)('do')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BODY
|
||||||
|
BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(while)('while')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
CONDITION
|
||||||
|
BOOLEAN_CONSTANT
|
||||||
|
PsiElement(true)('true')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiElement(SEMICOLON)(';')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
LAMBDA_EXPRESSION
|
||||||
|
FUNCTION_LITERAL
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
STRING_TEMPLATE
|
||||||
|
PsiElement(OPEN_QUOTE)('"')
|
||||||
|
PsiElement(CLOSING_QUOTE)('"')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('1')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0L')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
FLOAT_CONSTANT
|
||||||
|
PsiElement(FLOAT_CONSTANT)('3.141')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
FLOAT_CONSTANT
|
||||||
|
PsiElement(FLOAT_CONSTANT)('2.718f')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0xF7E')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0b101')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
fun f() {
|
||||||
|
a(x<y>(3))
|
||||||
|
a(x<y> { "" })
|
||||||
|
a(x<y, z>(""))
|
||||||
|
a(x<y, z> { 7 })
|
||||||
|
a(x<(y), z> { 1.011f })
|
||||||
|
a(x<y, (z)>(0x5F))
|
||||||
|
a(x<(y), (z)>(0b1110))
|
||||||
|
a(x<v.x, v.y> { 7 })
|
||||||
|
a(x<v.x, (v.y)>(0))
|
||||||
|
a(x<(v.x.z), v.y>('y'))
|
||||||
|
a(x<(v), (v.x.y.z)>("""word"""))
|
||||||
|
a(Array<String>::class)
|
||||||
|
a(Array<String>?::class)
|
||||||
|
|
||||||
|
a(x as List<String>)
|
||||||
|
a(x as? List<String>)
|
||||||
|
a(x is List<String>)
|
||||||
|
a(x !is List<String>)
|
||||||
|
a(x as Int<x> > false)
|
||||||
|
a(x as Int<x, y> == z)
|
||||||
|
}
|
||||||
+664
@@ -0,0 +1,664 @@
|
|||||||
|
KtFile: callExpressionsInFunctionCall.kt
|
||||||
|
PACKAGE_DIRECTIVE
|
||||||
|
<empty list>
|
||||||
|
IMPORT_LIST
|
||||||
|
<empty list>
|
||||||
|
FUN
|
||||||
|
PsiElement(fun)('fun')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(IDENTIFIER)('f')
|
||||||
|
VALUE_PARAMETER_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('3')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
LAMBDA_ARGUMENT
|
||||||
|
LAMBDA_EXPRESSION
|
||||||
|
FUNCTION_LITERAL
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
STRING_TEMPLATE
|
||||||
|
PsiElement(OPEN_QUOTE)('"')
|
||||||
|
PsiElement(CLOSING_QUOTE)('"')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
STRING_TEMPLATE
|
||||||
|
PsiElement(OPEN_QUOTE)('"')
|
||||||
|
PsiElement(CLOSING_QUOTE)('"')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
LAMBDA_ARGUMENT
|
||||||
|
LAMBDA_EXPRESSION
|
||||||
|
FUNCTION_LITERAL
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('7')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
LAMBDA_ARGUMENT
|
||||||
|
LAMBDA_EXPRESSION
|
||||||
|
FUNCTION_LITERAL
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
FLOAT_CONSTANT
|
||||||
|
PsiElement(FLOAT_CONSTANT)('1.011f')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0x5F')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0b1110')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('v')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('v')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
LAMBDA_ARGUMENT
|
||||||
|
LAMBDA_EXPRESSION
|
||||||
|
FUNCTION_LITERAL
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('7')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('v')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
USER_TYPE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('v')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
INTEGER_CONSTANT
|
||||||
|
PsiElement(INTEGER_LITERAL)('0')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
USER_TYPE
|
||||||
|
USER_TYPE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('v')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('v')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
CHARACTER_CONSTANT
|
||||||
|
PsiElement(CHARACTER_LITERAL)(''y'')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('v')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
USER_TYPE
|
||||||
|
USER_TYPE
|
||||||
|
USER_TYPE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('v')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
STRING_TEMPLATE
|
||||||
|
PsiElement(OPEN_QUOTE)('"""')
|
||||||
|
LITERAL_STRING_TEMPLATE_ENTRY
|
||||||
|
PsiElement(REGULAR_STRING_PART)('word')
|
||||||
|
PsiElement(CLOSING_QUOTE)('"""')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
CLASS_LITERAL_EXPRESSION
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('Array')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('String')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiElement(COLONCOLON)('::')
|
||||||
|
PsiElement(class)('class')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
CLASS_LITERAL_EXPRESSION
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('Array')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('String')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiElement(QUEST)('?')
|
||||||
|
PsiElement(COLONCOLON)('::')
|
||||||
|
PsiElement(class)('class')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
BINARY_WITH_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(as)('as')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('List')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('String')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
BINARY_WITH_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(AS_SAFE)('as?')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('List')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('String')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
IS_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(is)('is')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('List')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('String')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
IS_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(NOT_IS)('!is')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('List')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('String')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
BINARY_EXPRESSION
|
||||||
|
BINARY_WITH_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(as)('as')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('Int')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BOOLEAN_CONSTANT
|
||||||
|
PsiElement(false)('false')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
BINARY_EXPRESSION
|
||||||
|
BINARY_WITH_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(as)('as')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('Int')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(COMMA)(',')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('y')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(EQEQ)('==')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('z')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
fun f() {
|
||||||
|
call<x>
|
||||||
|
call<x>()
|
||||||
|
call<x> { }
|
||||||
|
call<x>::
|
||||||
|
call<x>[]
|
||||||
|
call<x>?
|
||||||
|
call<x>?.
|
||||||
|
call<x>.
|
||||||
|
call<x>++
|
||||||
|
call<x>--
|
||||||
|
call<x>!!
|
||||||
|
|
||||||
|
a(call<x>())
|
||||||
|
a(call<x> { })
|
||||||
|
a(call<x>::)
|
||||||
|
a(call<x>[])
|
||||||
|
a(call<x>?)
|
||||||
|
a(call<x>?.)
|
||||||
|
a(call<x>.)
|
||||||
|
a(call<x>++)
|
||||||
|
a(call<x>--)
|
||||||
|
a(call<x>!!)
|
||||||
|
}
|
||||||
@@ -0,0 +1,417 @@
|
|||||||
|
KtFile: callExpressions.kt
|
||||||
|
PACKAGE_DIRECTIVE
|
||||||
|
<empty list>
|
||||||
|
IMPORT_LIST
|
||||||
|
<empty list>
|
||||||
|
FUN
|
||||||
|
PsiElement(fun)('fun')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(IDENTIFIER)('f')
|
||||||
|
VALUE_PARAMETER_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
LAMBDA_ARGUMENT
|
||||||
|
LAMBDA_EXPRESSION
|
||||||
|
FUNCTION_LITERAL
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
<empty list>
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
ARRAY_ACCESS_EXPRESSION
|
||||||
|
CALLABLE_REFERENCE_EXPRESSION
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiElement(COLONCOLON)('::')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
PsiErrorElement:Type arguments are not allowed
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
INDICES
|
||||||
|
PsiElement(LBRACKET)('[')
|
||||||
|
PsiErrorElement:Expecting an index element
|
||||||
|
<empty list>
|
||||||
|
PsiElement(RBRACKET)(']')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
|
||||||
|
PsiElement(QUEST)('?')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
POSTFIX_EXPRESSION
|
||||||
|
DOT_QUALIFIED_EXPRESSION
|
||||||
|
SAFE_ACCESS_EXPRESSION
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiElement(SAFE_ACCESS)('?.')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(PLUSPLUS)('++')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
POSTFIX_EXPRESSION
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(MINUSMINUS)('--')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
POSTFIX_EXPRESSION
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(EXCLEXCL)('!!')
|
||||||
|
PsiWhiteSpace('\n\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
LAMBDA_ARGUMENT
|
||||||
|
LAMBDA_EXPRESSION
|
||||||
|
FUNCTION_LITERAL
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
<empty list>
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
CALLABLE_REFERENCE_EXPRESSION
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiElement(COLONCOLON)('::')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiErrorElement:Expecting an identifier
|
||||||
|
<empty list>
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
ARRAY_ACCESS_EXPRESSION
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
INDICES
|
||||||
|
PsiElement(LBRACKET)('[')
|
||||||
|
PsiErrorElement:Expecting an index element
|
||||||
|
<empty list>
|
||||||
|
PsiElement(RBRACKET)(']')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiErrorElement:Expecting ')'
|
||||||
|
PsiElement(QUEST)('?')
|
||||||
|
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
SAFE_ACCESS_EXPRESSION
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiElement(SAFE_ACCESS)('?.')
|
||||||
|
PsiErrorElement:Expecting an element
|
||||||
|
<empty list>
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
DOT_QUALIFIED_EXPRESSION
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiErrorElement:Expecting an element
|
||||||
|
<empty list>
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
POSTFIX_EXPRESSION
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(PLUSPLUS)('++')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
POSTFIX_EXPRESSION
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(MINUSMINUS)('--')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
POSTFIX_EXPRESSION
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(EXCLEXCL)('!!')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
fun f() {
|
||||||
|
call<>
|
||||||
|
call<x.>
|
||||||
|
call<>()
|
||||||
|
call<x.>()
|
||||||
|
call<> { }
|
||||||
|
call<x.> { }
|
||||||
|
call<>::
|
||||||
|
call<x.>::
|
||||||
|
call<>[]
|
||||||
|
call<x.>[]
|
||||||
|
call<>?
|
||||||
|
call<x.>?
|
||||||
|
call<>?.
|
||||||
|
call<x.>?.
|
||||||
|
call<>.
|
||||||
|
call<x.>.
|
||||||
|
call<>++
|
||||||
|
call<x.>++
|
||||||
|
call<>--
|
||||||
|
call<x.>--
|
||||||
|
call<>!!
|
||||||
|
call<x.>!!
|
||||||
|
|
||||||
|
a(call<>())
|
||||||
|
a(call<x.>())
|
||||||
|
a(call<> { })
|
||||||
|
a(call<x.> { })
|
||||||
|
a(call<>::)
|
||||||
|
a(call<x.>::)
|
||||||
|
a(call<>[])
|
||||||
|
a(call<x.>[])
|
||||||
|
a(call<>?)
|
||||||
|
a(call<x.>?)
|
||||||
|
a(call<>?.)
|
||||||
|
a(call<x.>?.)
|
||||||
|
a(call<>.)
|
||||||
|
a(call<x.>.)
|
||||||
|
a(call<>++)
|
||||||
|
a(call<x.>++)
|
||||||
|
a(call<>--)
|
||||||
|
a(call<x.>--)
|
||||||
|
a(call<>!!)
|
||||||
|
a(call<x.>!!)
|
||||||
|
}
|
||||||
@@ -0,0 +1,800 @@
|
|||||||
|
KtFile: callExpressions_ERR.kt
|
||||||
|
PACKAGE_DIRECTIVE
|
||||||
|
<empty list>
|
||||||
|
IMPORT_LIST
|
||||||
|
<empty list>
|
||||||
|
FUN
|
||||||
|
PsiElement(fun)('fun')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(IDENTIFIER)('f')
|
||||||
|
VALUE_PARAMETER_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
PsiErrorElement:Type expected
|
||||||
|
<empty list>
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
BINARY_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
DOT_QUALIFIED_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiErrorElement:Expecting an element
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
PsiErrorElement:Type expected
|
||||||
|
<empty list>
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
BINARY_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
DOT_QUALIFIED_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
PsiErrorElement:Expecting an element
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
PsiErrorElement:Type expected
|
||||||
|
<empty list>
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
LAMBDA_ARGUMENT
|
||||||
|
LAMBDA_EXPRESSION
|
||||||
|
FUNCTION_LITERAL
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
<empty list>
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
BINARY_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
DOT_QUALIFIED_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
PsiErrorElement:Expecting an element
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
LAMBDA_ARGUMENT
|
||||||
|
LAMBDA_EXPRESSION
|
||||||
|
FUNCTION_LITERAL
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
<empty list>
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
BINARY_EXPRESSION
|
||||||
|
CALLABLE_REFERENCE_EXPRESSION
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
PsiErrorElement:Type expected
|
||||||
|
<empty list>
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiElement(COLONCOLON)('::')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
ARRAY_ACCESS_EXPRESSION
|
||||||
|
CALLABLE_REFERENCE_EXPRESSION
|
||||||
|
DOT_QUALIFIED_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiErrorElement:Expecting an element
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiElement(COLONCOLON)('::')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
PsiErrorElement:Type arguments are not allowed
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
PsiErrorElement:Type expected
|
||||||
|
<empty list>
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
INDICES
|
||||||
|
PsiElement(LBRACKET)('[')
|
||||||
|
PsiErrorElement:Expecting an index element
|
||||||
|
<empty list>
|
||||||
|
PsiElement(RBRACKET)(']')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
BINARY_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
ARRAY_ACCESS_EXPRESSION
|
||||||
|
DOT_QUALIFIED_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiErrorElement:Expecting an element
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
INDICES
|
||||||
|
PsiElement(LBRACKET)('[')
|
||||||
|
PsiErrorElement:Expecting an index element
|
||||||
|
<empty list>
|
||||||
|
PsiElement(RBRACKET)(']')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
PsiErrorElement:Type expected
|
||||||
|
<empty list>
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
|
||||||
|
PsiElement(QUEST)('?')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
BINARY_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
DOT_QUALIFIED_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiErrorElement:Expecting an element
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
|
||||||
|
PsiElement(QUEST)('?')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
BINARY_EXPRESSION
|
||||||
|
BINARY_EXPRESSION
|
||||||
|
SAFE_ACCESS_EXPRESSION
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
PsiErrorElement:Type expected
|
||||||
|
<empty list>
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiElement(SAFE_ACCESS)('?.')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
DOT_QUALIFIED_EXPRESSION
|
||||||
|
SAFE_ACCESS_EXPRESSION
|
||||||
|
DOT_QUALIFIED_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiErrorElement:Expecting an element
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiElement(SAFE_ACCESS)('?.')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
PsiErrorElement:Type expected
|
||||||
|
<empty list>
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
POSTFIX_EXPRESSION
|
||||||
|
DOT_QUALIFIED_EXPRESSION
|
||||||
|
DOT_QUALIFIED_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiErrorElement:Expecting an element
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
PsiErrorElement:Type expected
|
||||||
|
<empty list>
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(PLUSPLUS)('++')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
BINARY_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
POSTFIX_EXPRESSION
|
||||||
|
DOT_QUALIFIED_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiErrorElement:Expecting an element
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(PLUSPLUS)('++')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
POSTFIX_EXPRESSION
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
PsiErrorElement:Type expected
|
||||||
|
<empty list>
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(MINUSMINUS)('--')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
BINARY_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
POSTFIX_EXPRESSION
|
||||||
|
DOT_QUALIFIED_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiErrorElement:Expecting an element
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(MINUSMINUS)('--')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
POSTFIX_EXPRESSION
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
PsiErrorElement:Type expected
|
||||||
|
<empty list>
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(EXCLEXCL)('!!')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
BINARY_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
POSTFIX_EXPRESSION
|
||||||
|
DOT_QUALIFIED_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiErrorElement:Expecting an element
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(EXCLEXCL)('!!')
|
||||||
|
PsiWhiteSpace('\n\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
PsiErrorElement:Type expected
|
||||||
|
<empty list>
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
BINARY_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
DOT_QUALIFIED_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
PsiErrorElement:Expecting an element
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
PsiErrorElement:Type expected
|
||||||
|
<empty list>
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
LAMBDA_ARGUMENT
|
||||||
|
LAMBDA_EXPRESSION
|
||||||
|
FUNCTION_LITERAL
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
<empty list>
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
BINARY_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
DOT_QUALIFIED_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
PsiErrorElement:Expecting an element
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
LAMBDA_ARGUMENT
|
||||||
|
LAMBDA_EXPRESSION
|
||||||
|
FUNCTION_LITERAL
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
<empty list>
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
CALLABLE_REFERENCE_EXPRESSION
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
PsiErrorElement:Type expected
|
||||||
|
<empty list>
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiElement(COLONCOLON)('::')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiErrorElement:Expecting an identifier
|
||||||
|
<empty list>
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
BINARY_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
CALLABLE_REFERENCE_EXPRESSION
|
||||||
|
DOT_QUALIFIED_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiErrorElement:Expecting an element
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiElement(COLONCOLON)('::')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiErrorElement:Expecting an identifier
|
||||||
|
<empty list>
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
ARRAY_ACCESS_EXPRESSION
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
PsiErrorElement:Type expected
|
||||||
|
<empty list>
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
INDICES
|
||||||
|
PsiElement(LBRACKET)('[')
|
||||||
|
PsiErrorElement:Expecting an index element
|
||||||
|
<empty list>
|
||||||
|
PsiElement(RBRACKET)(']')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
BINARY_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
ARRAY_ACCESS_EXPRESSION
|
||||||
|
DOT_QUALIFIED_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiErrorElement:Expecting an element
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
INDICES
|
||||||
|
PsiElement(LBRACKET)('[')
|
||||||
|
PsiErrorElement:Expecting an index element
|
||||||
|
<empty list>
|
||||||
|
PsiElement(RBRACKET)(']')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
PsiErrorElement:Type expected
|
||||||
|
<empty list>
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiErrorElement:Expecting ')'
|
||||||
|
PsiElement(QUEST)('?')
|
||||||
|
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
BINARY_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
DOT_QUALIFIED_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiErrorElement:Expecting an element
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiErrorElement:Expecting ')'
|
||||||
|
PsiElement(QUEST)('?')
|
||||||
|
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
SAFE_ACCESS_EXPRESSION
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
PsiErrorElement:Type expected
|
||||||
|
<empty list>
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiElement(SAFE_ACCESS)('?.')
|
||||||
|
PsiErrorElement:Expecting an element
|
||||||
|
<empty list>
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
BINARY_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
SAFE_ACCESS_EXPRESSION
|
||||||
|
DOT_QUALIFIED_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiErrorElement:Expecting an element
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiElement(SAFE_ACCESS)('?.')
|
||||||
|
PsiErrorElement:Expecting an element
|
||||||
|
<empty list>
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
DOT_QUALIFIED_EXPRESSION
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
PsiErrorElement:Type expected
|
||||||
|
<empty list>
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiErrorElement:Expecting an element
|
||||||
|
<empty list>
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
BINARY_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
DOT_QUALIFIED_EXPRESSION
|
||||||
|
DOT_QUALIFIED_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiErrorElement:Expecting an element
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiErrorElement:Expecting an element
|
||||||
|
<empty list>
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
POSTFIX_EXPRESSION
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
PsiErrorElement:Type expected
|
||||||
|
<empty list>
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(PLUSPLUS)('++')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
BINARY_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
POSTFIX_EXPRESSION
|
||||||
|
DOT_QUALIFIED_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiErrorElement:Expecting an element
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(PLUSPLUS)('++')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
POSTFIX_EXPRESSION
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
PsiErrorElement:Type expected
|
||||||
|
<empty list>
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(MINUSMINUS)('--')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
BINARY_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
POSTFIX_EXPRESSION
|
||||||
|
DOT_QUALIFIED_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiErrorElement:Expecting an element
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(MINUSMINUS)('--')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
POSTFIX_EXPRESSION
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
TYPE_ARGUMENT_LIST
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
TYPE_PROJECTION
|
||||||
|
TYPE_REFERENCE
|
||||||
|
PsiErrorElement:Type expected
|
||||||
|
<empty list>
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(EXCLEXCL)('!!')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
CALL_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('a')
|
||||||
|
VALUE_ARGUMENT_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
VALUE_ARGUMENT
|
||||||
|
BINARY_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('call')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(LT)('<')
|
||||||
|
POSTFIX_EXPRESSION
|
||||||
|
DOT_QUALIFIED_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('x')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
PsiErrorElement:Expecting an element
|
||||||
|
PsiElement(GT)('>')
|
||||||
|
OPERATION_REFERENCE
|
||||||
|
PsiElement(EXCLEXCL)('!!')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
Generated
+22
@@ -32239,6 +32239,28 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
@TestMetadata("compiler/testData/diagnostics/tests/typeArguments")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
public class TypeArguments {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInTypeArguments() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/typeArguments"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("allowTypeArgumentListLikeExpressions.kt")
|
||||||
|
public void testAllowTypeArgumentListLikeExpressions() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/typeArguments/allowTypeArgumentListLikeExpressions.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("forbidTypeArgumentListLikeExpressions.kt")
|
||||||
|
public void testForbidTypeArgumentListLikeExpressions() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/typeArguments/forbidTypeArgumentListLikeExpressions.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Nested
|
@Nested
|
||||||
@TestMetadata("compiler/testData/diagnostics/tests/typeParameters")
|
@TestMetadata("compiler/testData/diagnostics/tests/typeParameters")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
|||||||
@@ -2908,6 +2908,70 @@ public class ParsingTestGenerated extends AbstractParsingTest {
|
|||||||
runTest("compiler/testData/psi/stringTemplates/StringTemplateWithTryWithoutBlockInShortEntry.kt");
|
runTest("compiler/testData/psi/stringTemplates/StringTemplateWithTryWithoutBlockInShortEntry.kt");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/psi/typeArgumentList")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class TypeArgumentList extends AbstractParsingTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doParsingTest, this, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInTypeArgumentList() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/psi/typeArgumentList"), Pattern.compile("^(.*)\\.kts?$"), null, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/psi/typeArgumentList/correctness")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class Correctness extends AbstractParsingTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doParsingTest, this, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInCorrectness() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/psi/typeArgumentList/correctness"), Pattern.compile("^(.*)\\.kts?$"), null, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("binaryExpressionsInFunctionCall.kt")
|
||||||
|
public void testBinaryExpressionsInFunctionCall() throws Exception {
|
||||||
|
runTest("compiler/testData/psi/typeArgumentList/correctness/binaryExpressionsInFunctionCall.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("callExpressionsAnyLHSAtomicExpression.kt")
|
||||||
|
public void testCallExpressionsAnyLHSAtomicExpression() throws Exception {
|
||||||
|
runTest("compiler/testData/psi/typeArgumentList/correctness/callExpressionsAnyLHSAtomicExpression.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("callExpressionsInFunctionCall.kt")
|
||||||
|
public void testCallExpressionsInFunctionCall() throws Exception {
|
||||||
|
runTest("compiler/testData/psi/typeArgumentList/correctness/callExpressionsInFunctionCall.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/psi/typeArgumentList/recovery")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class Recovery extends AbstractParsingTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doParsingTest, this, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInRecovery() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/psi/typeArgumentList/recovery"), Pattern.compile("^(.*)\\.kts?$"), null, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("callExpressions.kt")
|
||||||
|
public void testCallExpressions() throws Exception {
|
||||||
|
runTest("compiler/testData/psi/typeArgumentList/recovery/callExpressions.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("callExpressions_ERR.kt")
|
||||||
|
public void testCallExpressions_ERR() throws Exception {
|
||||||
|
runTest("compiler/testData/psi/typeArgumentList/recovery/callExpressions_ERR.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/parseCodeFragment/expression")
|
@TestMetadata("compiler/testData/parseCodeFragment/expression")
|
||||||
|
|||||||
@@ -265,6 +265,7 @@ enum class LanguageFeature(
|
|||||||
DataObjects(KOTLIN_1_8), // KT-4107
|
DataObjects(KOTLIN_1_8), // KT-4107
|
||||||
LightweightLambdas(KOTLIN_1_8, defaultState = State.DISABLED),
|
LightweightLambdas(KOTLIN_1_8, defaultState = State.DISABLED),
|
||||||
AllowExpressionAfterTypeReferenceWithoutSpacing(KOTLIN_1_8, kind = BUG_FIX), // KT-35811
|
AllowExpressionAfterTypeReferenceWithoutSpacing(KOTLIN_1_8, kind = BUG_FIX), // KT-35811
|
||||||
|
AllowTypeArgumentListLikeExpressions(KOTLIN_1_8, kind = BUG_FIX), // KT-8263
|
||||||
|
|
||||||
// 1.9
|
// 1.9
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user