diff --git a/idea/resources/META-INF/jvm.xml b/idea/resources/META-INF/jvm.xml index 99a974c682f..5005ee32789 100644 --- a/idea/resources/META-INF/jvm.xml +++ b/idea/resources/META-INF/jvm.xml @@ -183,7 +183,7 @@ , resolvesTo = Annotation) - ULiteralExpression (value = "sv1") - ULiteralExpression (value = "sv2") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "sv1") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "sv2") UMethod (name = B2) UClass (name = AnnotationArray) UAnnotationMethod (name = value) @@ -33,8 +35,10 @@ UFile (package = ) UCallExpression (kind = UastCallKind(name='array_initializer'), argCount = 2)) UIdentifier (Identifier (arrayOf)) USimpleNameReferenceExpression (identifier = arrayOf, resolvesTo = null) - ULiteralExpression (value = "sar1") - ULiteralExpression (value = "sar2") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "sar1") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "sar2") UMethod (name = C) UClass (name = C2) UAnnotation (fqName = AnnotationArray) @@ -44,6 +48,8 @@ UFile (package = ) USimpleNameReferenceExpression (identifier = , resolvesTo = Annotation) UCallExpression (kind = UastCallKind(name='array_initializer'), argCount = 2)) UIdentifier (Identifier ([)) - ULiteralExpression (value = "[sar]1") - ULiteralExpression (value = "[sar]2") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "[sar]1") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "[sar]2") UMethod (name = C2) diff --git a/plugins/uast-kotlin/testData/AnnotationParameters.log.txt b/plugins/uast-kotlin/testData/AnnotationParameters.log.txt index fe14237f6a7..2493c83b6d1 100644 --- a/plugins/uast-kotlin/testData/AnnotationParameters.log.txt +++ b/plugins/uast-kotlin/testData/AnnotationParameters.log.txt @@ -17,7 +17,8 @@ UFile (package = ) UAnnotation (fqName = WithDefaultValue) UAnnotation (fqName = SuppressLint) UNamedExpression (name = value) - ULiteralExpression (value = "Lorem") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "Lorem") UBlockExpression UReturnExpression ULiteralExpression (value = 5) @@ -30,9 +31,12 @@ UFile (package = ) UAnnotation (fqName = SuppressLint) UNamedExpression (name = value) UCallExpression (kind = UastCallKind(name='array_initializer'), argCount = 3)) - ULiteralExpression (value = "Lorem") - ULiteralExpression (value = "Ipsum") - ULiteralExpression (value = "Dolor") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "Lorem") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "Ipsum") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "Dolor") UBlockExpression UReturnExpression USimpleNameReferenceExpression (identifier = Unit) @@ -52,9 +56,12 @@ UFile (package = ) UNamedExpression (name = strs) UCallExpression (kind = UastCallKind(name='array_initializer'), argCount = 3)) UIdentifier (Identifier ([)) - ULiteralExpression (value = "a") - ULiteralExpression (value = "b") - ULiteralExpression (value = "c") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "a") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "b") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "c") UBlockExpression UReturnExpression ULiteralExpression (value = 3) diff --git a/plugins/uast-kotlin/testData/Assertion.values.txt b/plugins/uast-kotlin/testData/Assertion.values.txt index db956afc60a..0e5aac01119 100644 --- a/plugins/uast-kotlin/testData/Assertion.values.txt +++ b/plugins/uast-kotlin/testData/Assertion.values.txt @@ -4,7 +4,8 @@ UFile (package = ) [public final class AssertionKt {...] UBlockExpression [{...}] = Nothing UDeclarationsExpression [var s: java.lang.String = "Not Null"] = Undetermined ULocalVariable (name = s) [var s: java.lang.String = "Not Null"] - ULiteralExpression (value = "Not Null") ["Not Null"] = "Not Null" + UPolyadicExpression (operator = +) ["Not Null"] = "Not Null" + ULiteralExpression (value = "Not Null") ["Not Null"] = "Not Null" UReturnExpression [return s!!] = Nothing UPostfixExpression (operator = !!) [s!!] = (var s = "Not Null") USimpleNameReferenceExpression (identifier = s) [s] = (var s = "Not Null") diff --git a/plugins/uast-kotlin/testData/ClassAnnotation.altlog.txt b/plugins/uast-kotlin/testData/ClassAnnotation.altlog.txt index 5153489ad5d..7c48bbb3827 100644 --- a/plugins/uast-kotlin/testData/ClassAnnotation.altlog.txt +++ b/plugins/uast-kotlin/testData/ClassAnnotation.altlog.txt @@ -21,7 +21,7 @@ [1]:[UTypeReferenceExpression (name = MyAnnotation)] [1]:[USimpleNameReferenceExpression (identifier = MyAnnotation)] [1]:[UIdentifier (Identifier (MyAnnotation))] - [1]:[ULiteralExpression (value = "class")] + [1]:[UPolyadicExpression (operator = +)] [1]:[ULiteralExpression (value = "class")] [1]:[UIdentifier (Identifier (B))] [1]:[UExpressionList (class_body)] @@ -31,7 +31,7 @@ [1]:[UTypeReferenceExpression (name = MyAnnotation)] [1]:[USimpleNameReferenceExpression (identifier = MyAnnotation)] [1]:[UIdentifier (Identifier (MyAnnotation))] - [1]:[ULiteralExpression (value = "inB class")] + [1]:[UPolyadicExpression (operator = +)] [1]:[ULiteralExpression (value = "inB class")] [1]:[UIdentifier (Identifier (InB))] [1]:[UExpressionList (class_body)] @@ -41,7 +41,7 @@ [1]:[UTypeReferenceExpression (name = MyAnnotation)] [1]:[USimpleNameReferenceExpression (identifier = MyAnnotation)] [1]:[UIdentifier (Identifier (MyAnnotation))] - [1]:[ULiteralExpression (value = "companion")] + [1]:[UPolyadicExpression (operator = +)] [1]:[ULiteralExpression (value = "companion")] [1]:[UIdentifier (Identifier (object))] [1]:[UExpressionList (class_body)] @@ -51,6 +51,6 @@ [1]:[UTypeReferenceExpression (name = MyAnnotation)] [1]:[USimpleNameReferenceExpression (identifier = MyAnnotation)] [1]:[UIdentifier (Identifier (MyAnnotation))] - [1]:[ULiteralExpression (value = "object")] + [1]:[UPolyadicExpression (operator = +)] [1]:[ULiteralExpression (value = "object")] [1]:[UIdentifier (Identifier (Obj))] diff --git a/plugins/uast-kotlin/testData/ClassAnnotation.log.txt b/plugins/uast-kotlin/testData/ClassAnnotation.log.txt index fce8469ccd1..045ca3e82d7 100644 --- a/plugins/uast-kotlin/testData/ClassAnnotation.log.txt +++ b/plugins/uast-kotlin/testData/ClassAnnotation.log.txt @@ -7,24 +7,28 @@ UFile (package = ) UClass (name = B) UAnnotation (fqName = MyAnnotation) UNamedExpression (name = text) - ULiteralExpression (value = "class") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "class") UField (name = Companion) UAnnotation (fqName = null) UMethod (name = B) UClass (name = InB) UAnnotation (fqName = MyAnnotation) UNamedExpression (name = text) - ULiteralExpression (value = "inB class") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "inB class") UMethod (name = InB) UClass (name = Companion) UAnnotation (fqName = MyAnnotation) UNamedExpression (name = text) - ULiteralExpression (value = "companion") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "companion") UMethod (name = Companion) UClass (name = Obj) UAnnotation (fqName = MyAnnotation) UNamedExpression (name = text) - ULiteralExpression (value = "object") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "object") UField (name = INSTANCE) UAnnotation (fqName = null) UMethod (name = Obj) diff --git a/plugins/uast-kotlin/testData/ConstructorDelegate.log-ide.txt b/plugins/uast-kotlin/testData/ConstructorDelegate.log-ide.txt index 2d91310ba21..d710b60f30f 100644 --- a/plugins/uast-kotlin/testData/ConstructorDelegate.log-ide.txt +++ b/plugins/uast-kotlin/testData/ConstructorDelegate.log-ide.txt @@ -33,7 +33,8 @@ UFile (package = ) ULiteralExpression (value = 10) UExpressionList (super_delegation) UTypeReferenceExpression (name = java.lang.CharSequence) - ULiteralExpression (value = "abc") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "abc") UMethod (name = Derived) UParameter (name = b) UAnnotation (fqName = org.jetbrains.annotations.NotNull) diff --git a/plugins/uast-kotlin/testData/ConstructorDelegate.log.txt b/plugins/uast-kotlin/testData/ConstructorDelegate.log.txt index 8bf1fc9d014..c52ff446a8e 100644 --- a/plugins/uast-kotlin/testData/ConstructorDelegate.log.txt +++ b/plugins/uast-kotlin/testData/ConstructorDelegate.log.txt @@ -33,7 +33,8 @@ UFile (package = ) ULiteralExpression (value = 10) UExpressionList (super_delegation) UTypeReferenceExpression (name = java.lang.CharSequence) - ULiteralExpression (value = "abc") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "abc") UMethod (name = Derived) UParameter (name = b) UAnnotation (fqName = org.jetbrains.annotations.NotNull) diff --git a/plugins/uast-kotlin/testData/DefaultImpls.log.txt b/plugins/uast-kotlin/testData/DefaultImpls.log.txt index 571591722f8..55b91423be2 100644 --- a/plugins/uast-kotlin/testData/DefaultImpls.log.txt +++ b/plugins/uast-kotlin/testData/DefaultImpls.log.txt @@ -3,6 +3,7 @@ UFile (package = ) UMethod (name = bar) UBlockExpression UReturnExpression - ULiteralExpression (value = "Hello!") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "Hello!") UClass (name = Baz) UMethod (name = Baz) diff --git a/plugins/uast-kotlin/testData/DeprecatedHidden.log.txt b/plugins/uast-kotlin/testData/DeprecatedHidden.log.txt index 201285b464b..d53ee9c9825 100644 --- a/plugins/uast-kotlin/testData/DeprecatedHidden.log.txt +++ b/plugins/uast-kotlin/testData/DeprecatedHidden.log.txt @@ -10,5 +10,6 @@ UFile (package = test.pkg) USimpleNameReferenceExpression (identifier = DeprecationLevel) USimpleNameReferenceExpression (identifier = HIDDEN) UNamedExpression (name = message) - ULiteralExpression (value = "nothing") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "nothing") UBlockExpression diff --git a/plugins/uast-kotlin/testData/DestructuringDeclaration.log.txt b/plugins/uast-kotlin/testData/DestructuringDeclaration.log.txt index 288d88dd8e1..a9ae113df8c 100644 --- a/plugins/uast-kotlin/testData/DestructuringDeclaration.log.txt +++ b/plugins/uast-kotlin/testData/DestructuringDeclaration.log.txt @@ -8,7 +8,8 @@ UFile (package = ) ULocalVariable (name = var268d41a5) UAnnotation (fqName = null) UBinaryExpression (operator = ) - ULiteralExpression (value = "foo") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "foo") ULiteralExpression (value = 1) ULocalVariable (name = a) UAnnotation (fqName = null) @@ -29,7 +30,8 @@ UFile (package = ) UAnnotation (fqName = null) UAnnotation (fqName = kotlin.Suppress) UNamedExpression (name = names) - ULiteralExpression (value = "UNCHECKED_CAST") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "UNCHECKED_CAST") UBinaryExpressionWithType USimpleNameReferenceExpression (identifier = data) UTypeReferenceExpression (name = kotlin.Pair) diff --git a/plugins/uast-kotlin/testData/Elvis.log.txt b/plugins/uast-kotlin/testData/Elvis.log.txt index ed8d2b3f964..98996672068 100644 --- a/plugins/uast-kotlin/testData/Elvis.log.txt +++ b/plugins/uast-kotlin/testData/Elvis.log.txt @@ -24,7 +24,8 @@ UFile (package = ) UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1)) UIdentifier (Identifier (foo)) USimpleNameReferenceExpression (identifier = foo, resolvesTo = null) - ULiteralExpression (value = "Lorem ipsum") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "Lorem ipsum") UIfExpression UBinaryExpression (operator = !=) USimpleNameReferenceExpression (identifier = varc4aef569) @@ -33,7 +34,8 @@ UFile (package = ) UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1)) UIdentifier (Identifier (foo)) USimpleNameReferenceExpression (identifier = foo, resolvesTo = null) - ULiteralExpression (value = "dolor sit amet") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "dolor sit amet") UIfExpression UBinaryExpression (operator = !=) USimpleNameReferenceExpression (identifier = var243c51a0) diff --git a/plugins/uast-kotlin/testData/EnumValueMembers.log-ide.txt b/plugins/uast-kotlin/testData/EnumValueMembers.log-ide.txt index bd07a46ab5d..03dcfa075fa 100644 --- a/plugins/uast-kotlin/testData/EnumValueMembers.log-ide.txt +++ b/plugins/uast-kotlin/testData/EnumValueMembers.log-ide.txt @@ -5,12 +5,14 @@ UFile (package = ) UEnumConstant (name = SHEET) UAnnotation (fqName = null) USimpleNameReferenceExpression (identifier = Style) - ULiteralExpression (value = "foo") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "foo") UClass (name = SHEET) UMethod (name = getExitAnimation) UBlockExpression UReturnExpression - ULiteralExpression (value = "bar") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "bar") UMethod (name = SHEET) UMethod (name = getExitAnimation) UMethod (name = getValue) diff --git a/plugins/uast-kotlin/testData/EnumValueMembers.log.txt b/plugins/uast-kotlin/testData/EnumValueMembers.log.txt index 5c76f6d87a9..70a629a4251 100644 --- a/plugins/uast-kotlin/testData/EnumValueMembers.log.txt +++ b/plugins/uast-kotlin/testData/EnumValueMembers.log.txt @@ -3,12 +3,14 @@ UFile (package = ) UEnumConstant (name = SHEET) UAnnotation (fqName = null) USimpleNameReferenceExpression (identifier = Style) - ULiteralExpression (value = "foo") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "foo") UClass (name = null) UMethod (name = getExitAnimation) UBlockExpression UReturnExpression - ULiteralExpression (value = "bar") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "bar") UMethod (name = SHEET) UField (name = value) UAnnotation (fqName = org.jetbrains.annotations.NotNull) diff --git a/plugins/uast-kotlin/testData/EnumValuesConstructors.log-ide.txt b/plugins/uast-kotlin/testData/EnumValuesConstructors.log-ide.txt index 130f197f532..40dcfc29152 100644 --- a/plugins/uast-kotlin/testData/EnumValuesConstructors.log-ide.txt +++ b/plugins/uast-kotlin/testData/EnumValuesConstructors.log-ide.txt @@ -5,15 +5,18 @@ UFile (package = ) UEnumConstant (name = SYSTEM) UAnnotation (fqName = null) USimpleNameReferenceExpression (identifier = Style) - ULiteralExpression (value = "system") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "system") UEnumConstant (name = USER) UAnnotation (fqName = null) USimpleNameReferenceExpression (identifier = Style) - ULiteralExpression (value = "user") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "user") UEnumConstant (name = INTERNAL) UAnnotation (fqName = null) USimpleNameReferenceExpression (identifier = Style) - ULiteralExpression (value = "internal") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "internal") UEnumConstant (name = UNKNOWN) UAnnotation (fqName = null) USimpleNameReferenceExpression (identifier = Style) diff --git a/plugins/uast-kotlin/testData/EnumValuesConstructors.log.txt b/plugins/uast-kotlin/testData/EnumValuesConstructors.log.txt index 71229cd080b..15e48087df0 100644 --- a/plugins/uast-kotlin/testData/EnumValuesConstructors.log.txt +++ b/plugins/uast-kotlin/testData/EnumValuesConstructors.log.txt @@ -3,15 +3,18 @@ UFile (package = ) UEnumConstant (name = SYSTEM) UAnnotation (fqName = null) USimpleNameReferenceExpression (identifier = Style) - ULiteralExpression (value = "system") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "system") UEnumConstant (name = USER) UAnnotation (fqName = null) USimpleNameReferenceExpression (identifier = Style) - ULiteralExpression (value = "user") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "user") UEnumConstant (name = INTERNAL) UAnnotation (fqName = null) USimpleNameReferenceExpression (identifier = Style) - ULiteralExpression (value = "internal") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "internal") UEnumConstant (name = UNKNOWN) UAnnotation (fqName = null) USimpleNameReferenceExpression (identifier = Style) diff --git a/plugins/uast-kotlin/testData/IfStatement.log.txt b/plugins/uast-kotlin/testData/IfStatement.log.txt index fdce860179d..c2e75ac1ed0 100644 --- a/plugins/uast-kotlin/testData/IfStatement.log.txt +++ b/plugins/uast-kotlin/testData/IfStatement.log.txt @@ -6,7 +6,9 @@ UFile (package = ) ULocalVariable (name = x) UIfExpression UBinaryExpression (operator = !=) - ULiteralExpression (value = "abc") - ULiteralExpression (value = "def") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "abc") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "def") ULiteralExpression (value = 1) ULiteralExpression (value = 0) diff --git a/plugins/uast-kotlin/testData/LambdaReturn.log.txt b/plugins/uast-kotlin/testData/LambdaReturn.log.txt index 39d0e1e7366..29accedb9c5 100644 --- a/plugins/uast-kotlin/testData/LambdaReturn.log.txt +++ b/plugins/uast-kotlin/testData/LambdaReturn.log.txt @@ -60,15 +60,18 @@ UFile (package = org.jetbrains.uast.kotlin) USimpleNameReferenceExpression (identifier = a) ULiteralExpression (value = 5) UReturnExpression - ULiteralExpression (value = "5") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "5") UIfExpression UBinaryExpression (operator = >) USimpleNameReferenceExpression (identifier = a) ULiteralExpression (value = 0) UReturnExpression - ULiteralExpression (value = "1") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "1") UReturnExpression - ULiteralExpression (value = "2") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "2") UDeclarationsExpression ULocalVariable (name = lam5) ULambdaExpression @@ -77,7 +80,8 @@ UFile (package = org.jetbrains.uast.kotlin) UBlockExpression UReturnExpression UBinaryExpression (operator = +) - ULiteralExpression (value = "a") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "a") USimpleNameReferenceExpression (identifier = a) UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1)) UIdentifier (Identifier (bar)) diff --git a/plugins/uast-kotlin/testData/LocalVariableWithAnnotation.log.txt b/plugins/uast-kotlin/testData/LocalVariableWithAnnotation.log.txt index 0576c834e75..0d80a5a877c 100644 --- a/plugins/uast-kotlin/testData/LocalVariableWithAnnotation.log.txt +++ b/plugins/uast-kotlin/testData/LocalVariableWithAnnotation.log.txt @@ -5,5 +5,6 @@ UFile (package = ) UDeclarationsExpression ULocalVariable (name = bar) UAnnotation (fqName = TestAnnotation) - ULiteralExpression (value = "lorem ipsum") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "lorem ipsum") UClass (name = TestAnnotation) diff --git a/plugins/uast-kotlin/testData/ParametersDisorder.log-ide.txt b/plugins/uast-kotlin/testData/ParametersDisorder.log-ide.txt index 41b9a91c725..c31359514ce 100644 --- a/plugins/uast-kotlin/testData/ParametersDisorder.log-ide.txt +++ b/plugins/uast-kotlin/testData/ParametersDisorder.log-ide.txt @@ -12,7 +12,8 @@ UFile (package = ) ULiteralExpression (value = 1) UParameter (name = d) UAnnotation (fqName = org.jetbrains.annotations.NotNull) - ULiteralExpression (value = "aaa") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "aaa") UBlockExpression UMethod (name = withReceiver) UParameter (name = $this$withReceiver) @@ -32,9 +33,11 @@ UFile (package = ) UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1)) UIdentifier (Identifier (withDefault)) USimpleNameReferenceExpression (identifier = withDefault, resolvesTo = null) - ULiteralExpression (value = "bbb") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "bbb") UQualifiedReferenceExpression - ULiteralExpression (value = "abc") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "abc") UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2)) UIdentifier (Identifier (withReceiver)) USimpleNameReferenceExpression (identifier = withReceiver, resolvesTo = null) @@ -50,8 +53,10 @@ UFile (package = ) UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2)) UIdentifier (Identifier (unresolvedMethod)) USimpleNameReferenceExpression (identifier = , resolvesTo = null) - ULiteralExpression (value = "param1") - ULiteralExpression (value = "param2") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "param1") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "param2") UQualifiedReferenceExpression UQualifiedReferenceExpression UQualifiedReferenceExpression @@ -61,7 +66,8 @@ UFile (package = ) UCallExpression (kind = UastCallKind(name='method_call'), argCount = 4)) UIdentifier (Identifier (format)) USimpleNameReferenceExpression (identifier = format, resolvesTo = null) - ULiteralExpression (value = "%i %i %i") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "%i %i %i") ULiteralExpression (value = 1) ULiteralExpression (value = 2) ULiteralExpression (value = 3) @@ -74,7 +80,8 @@ UFile (package = ) UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2)) UIdentifier (Identifier (format)) USimpleNameReferenceExpression (identifier = format, resolvesTo = null) - ULiteralExpression (value = "%i %i %i") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "%i %i %i") UCallExpression (kind = UastCallKind(name='method_call'), argCount = 3)) UIdentifier (Identifier (arrayOf)) USimpleNameReferenceExpression (identifier = arrayOf, resolvesTo = null) @@ -90,7 +97,8 @@ UFile (package = ) UCallExpression (kind = UastCallKind(name='method_call'), argCount = 3)) UIdentifier (Identifier (format)) USimpleNameReferenceExpression (identifier = format, resolvesTo = null) - ULiteralExpression (value = "%i %i %i") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "%i %i %i") UCallExpression (kind = UastCallKind(name='method_call'), argCount = 3)) UIdentifier (Identifier (arrayOf)) USimpleNameReferenceExpression (identifier = arrayOf, resolvesTo = null) @@ -112,10 +120,11 @@ UFile (package = ) UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2)) UIdentifier (Identifier (format)) USimpleNameReferenceExpression (identifier = format, resolvesTo = null) - ULiteralExpression (value = "%i %i %i") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "%i %i %i") UQualifiedReferenceExpression UQualifiedReferenceExpression - ULiteralExpression (value = "") + UPolyadicExpression (value = "") UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1)) UIdentifier (Identifier (chunked)) USimpleNameReferenceExpression (identifier = chunked, resolvesTo = null) @@ -132,7 +141,8 @@ UFile (package = ) ULambdaExpression UBlockExpression UQualifiedReferenceExpression - ULiteralExpression (value = "def") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "def") UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2)) UIdentifier (Identifier (with2Receivers)) USimpleNameReferenceExpression (identifier = with2Receivers, resolvesTo = null) @@ -142,7 +152,8 @@ UFile (package = ) UBlockExpression UObjectLiteralExpression ULiteralExpression (value = 1) - ULiteralExpression (value = "foo") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "foo") UClass (name = null) UMethod (name = ) UClass (name = A) diff --git a/plugins/uast-kotlin/testData/ParametersDisorder.log.txt b/plugins/uast-kotlin/testData/ParametersDisorder.log.txt index e8a37796eef..890b37dc6d8 100644 --- a/plugins/uast-kotlin/testData/ParametersDisorder.log.txt +++ b/plugins/uast-kotlin/testData/ParametersDisorder.log.txt @@ -12,7 +12,8 @@ UFile (package = ) ULiteralExpression (value = 1) UParameter (name = d) UAnnotation (fqName = org.jetbrains.annotations.NotNull) - ULiteralExpression (value = "aaa") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "aaa") UBlockExpression UMethod (name = withReceiver) UParameter (name = $this$withReceiver) @@ -32,9 +33,11 @@ UFile (package = ) UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1)) UIdentifier (Identifier (withDefault)) USimpleNameReferenceExpression (identifier = withDefault, resolvesTo = null) - ULiteralExpression (value = "bbb") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "bbb") UQualifiedReferenceExpression - ULiteralExpression (value = "abc") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "abc") UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2)) UIdentifier (Identifier (withReceiver)) USimpleNameReferenceExpression (identifier = withReceiver, resolvesTo = null) @@ -50,8 +53,10 @@ UFile (package = ) UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2)) UIdentifier (Identifier (unresolvedMethod)) USimpleNameReferenceExpression (identifier = , resolvesTo = null) - ULiteralExpression (value = "param1") - ULiteralExpression (value = "param2") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "param1") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "param2") UQualifiedReferenceExpression UQualifiedReferenceExpression UQualifiedReferenceExpression @@ -61,7 +66,8 @@ UFile (package = ) UCallExpression (kind = UastCallKind(name='method_call'), argCount = 4)) UIdentifier (Identifier (format)) USimpleNameReferenceExpression (identifier = format, resolvesTo = null) - ULiteralExpression (value = "%i %i %i") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "%i %i %i") ULiteralExpression (value = 1) ULiteralExpression (value = 2) ULiteralExpression (value = 3) @@ -74,7 +80,8 @@ UFile (package = ) UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2)) UIdentifier (Identifier (format)) USimpleNameReferenceExpression (identifier = format, resolvesTo = null) - ULiteralExpression (value = "%i %i %i") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "%i %i %i") UCallExpression (kind = UastCallKind(name='method_call'), argCount = 3)) UIdentifier (Identifier (arrayOf)) USimpleNameReferenceExpression (identifier = arrayOf, resolvesTo = null) @@ -90,7 +97,8 @@ UFile (package = ) UCallExpression (kind = UastCallKind(name='method_call'), argCount = 3)) UIdentifier (Identifier (format)) USimpleNameReferenceExpression (identifier = format, resolvesTo = null) - ULiteralExpression (value = "%i %i %i") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "%i %i %i") UCallExpression (kind = UastCallKind(name='method_call'), argCount = 3)) UIdentifier (Identifier (arrayOf)) USimpleNameReferenceExpression (identifier = arrayOf, resolvesTo = null) @@ -112,10 +120,11 @@ UFile (package = ) UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2)) UIdentifier (Identifier (format)) USimpleNameReferenceExpression (identifier = format, resolvesTo = null) - ULiteralExpression (value = "%i %i %i") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "%i %i %i") UQualifiedReferenceExpression UQualifiedReferenceExpression - ULiteralExpression (value = "") + UPolyadicExpression (value = "") UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1)) UIdentifier (Identifier (chunked)) USimpleNameReferenceExpression (identifier = chunked, resolvesTo = null) @@ -132,7 +141,8 @@ UFile (package = ) ULambdaExpression UBlockExpression UQualifiedReferenceExpression - ULiteralExpression (value = "def") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "def") UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2)) UIdentifier (Identifier (with2Receivers)) USimpleNameReferenceExpression (identifier = with2Receivers, resolvesTo = null) @@ -142,7 +152,8 @@ UFile (package = ) UBlockExpression UObjectLiteralExpression ULiteralExpression (value = 1) - ULiteralExpression (value = "foo") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "foo") UClass (name = null) UMethod (name = ParametersDisorderKt$objectLiteral$1) UClass (name = A) diff --git a/plugins/uast-kotlin/testData/PropertyDelegate.log.txt b/plugins/uast-kotlin/testData/PropertyDelegate.log.txt index 42d7e5aa6fe..4b51c13ea04 100644 --- a/plugins/uast-kotlin/testData/PropertyDelegate.log.txt +++ b/plugins/uast-kotlin/testData/PropertyDelegate.log.txt @@ -8,7 +8,8 @@ UFile (package = ) ULambdaExpression UBlockExpression UReturnExpression - ULiteralExpression (value = "/sdcard") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "/sdcard") UField (name = annotatedDelegate$delegate) UAnnotation (fqName = org.jetbrains.annotations.NotNull) UAnnotation (fqName = kotlin.Suppress) @@ -32,5 +33,6 @@ UFile (package = ) ULambdaExpression UBlockExpression UReturnExpression - ULiteralExpression (value = "/sdcard") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "/sdcard") UMethod (name = getAnnotatedDelegate) diff --git a/plugins/uast-kotlin/testData/PropertyInitializer.log.txt b/plugins/uast-kotlin/testData/PropertyInitializer.log.txt index 0445696ef71..6275b88baae 100644 --- a/plugins/uast-kotlin/testData/PropertyInitializer.log.txt +++ b/plugins/uast-kotlin/testData/PropertyInitializer.log.txt @@ -2,7 +2,8 @@ UFile (package = ) UClass (name = TestPropertyInitializer) UField (name = withSetter) UAnnotation (fqName = org.jetbrains.annotations.NotNull) - ULiteralExpression (value = "/sdcard") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "/sdcard") UMethod (name = getWithSetter) UBlockExpression UReturnExpression diff --git a/plugins/uast-kotlin/testData/PropertyInitializerWithoutSetter.log-ide.txt b/plugins/uast-kotlin/testData/PropertyInitializerWithoutSetter.log-ide.txt index 7eaac7d90ec..393ccf749c7 100644 --- a/plugins/uast-kotlin/testData/PropertyInitializerWithoutSetter.log-ide.txt +++ b/plugins/uast-kotlin/testData/PropertyInitializerWithoutSetter.log-ide.txt @@ -2,11 +2,12 @@ UFile (package = ) UClass (name = PropertyInitializerWithoutSetterKt) UField (name = withoutSetter) UAnnotation (fqName = org.jetbrains.annotations.NotNull) - ULiteralExpression (value = "/sdcard") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "/sdcard") UMethod (name = getWithoutSetter) UBlockExpression UReturnExpression USimpleNameReferenceExpression (identifier = field) UMethod (name = setWithoutSetter) UParameter (name = withoutSetter) - UAnnotation (fqName = org.jetbrains.annotations.NotNull) \ No newline at end of file + UAnnotation (fqName = org.jetbrains.annotations.NotNull) diff --git a/plugins/uast-kotlin/testData/PropertyInitializerWithoutSetter.log.txt b/plugins/uast-kotlin/testData/PropertyInitializerWithoutSetter.log.txt index 2617618a649..ee33807a98e 100644 --- a/plugins/uast-kotlin/testData/PropertyInitializerWithoutSetter.log.txt +++ b/plugins/uast-kotlin/testData/PropertyInitializerWithoutSetter.log.txt @@ -2,7 +2,8 @@ UFile (package = ) UClass (name = PropertyInitializerWithoutSetterKt) UField (name = withoutSetter) UAnnotation (fqName = org.jetbrains.annotations.NotNull) - ULiteralExpression (value = "/sdcard") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "/sdcard") UMethod (name = getWithoutSetter) UBlockExpression UReturnExpression diff --git a/plugins/uast-kotlin/testData/Simple.log.txt b/plugins/uast-kotlin/testData/Simple.log.txt index f352eb5b902..ae1a89bc75c 100644 --- a/plugins/uast-kotlin/testData/Simple.log.txt +++ b/plugins/uast-kotlin/testData/Simple.log.txt @@ -2,12 +2,14 @@ UFile (package = ) UClass (name = Simple) UField (name = property) UAnnotation (fqName = org.jetbrains.annotations.NotNull) - ULiteralExpression (value = "Mary") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "Mary") UMethod (name = method) UBlockExpression UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1)) UIdentifier (Identifier (println)) USimpleNameReferenceExpression (identifier = println, resolvesTo = null) - ULiteralExpression (value = "Hello, world!") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "Hello, world!") UMethod (name = getProperty) UMethod (name = Simple) diff --git a/plugins/uast-kotlin/testData/Simple.values.txt b/plugins/uast-kotlin/testData/Simple.values.txt index 24a7ff0f4aa..4c83c6a9bb6 100644 --- a/plugins/uast-kotlin/testData/Simple.values.txt +++ b/plugins/uast-kotlin/testData/Simple.values.txt @@ -2,12 +2,14 @@ UFile (package = ) [public final class Simple {...] UClass (name = Simple) [public final class Simple {...}] UField (name = property) [@org.jetbrains.annotations.NotNull private final var property: java.lang.String = "Mary"] UAnnotation (fqName = org.jetbrains.annotations.NotNull) [@org.jetbrains.annotations.NotNull] - ULiteralExpression (value = "Mary") ["Mary"] = "Mary" + UPolyadicExpression (operator = +) ["Mary"] = "Mary" + ULiteralExpression (value = "Mary") ["Mary"] = "Mary" UMethod (name = method) [public final fun method() : void {...}] UBlockExpression [{...}] = external println("Hello, world!")("Hello, world!") UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1)) [println("Hello, world!")] = external println("Hello, world!")("Hello, world!") UIdentifier (Identifier (println)) [UIdentifier (Identifier (println))] USimpleNameReferenceExpression (identifier = println, resolvesTo = null) [println] = external println("Hello, world!")("Hello, world!") - ULiteralExpression (value = "Hello, world!") ["Hello, world!"] = "Hello, world!" + UPolyadicExpression (operator = +) ["Hello, world!"] = "Hello, world!" + ULiteralExpression (value = "Hello, world!") ["Hello, world!"] = "Hello, world!" UMethod (name = getProperty) [public final fun getProperty() : java.lang.String = UastEmptyExpression] UMethod (name = Simple) [public fun Simple() = UastEmptyExpression] diff --git a/plugins/uast-kotlin/testData/SimpleScript.log.txt b/plugins/uast-kotlin/testData/SimpleScript.log.txt index af6b6f03ba0..4efd0d1119e 100644 --- a/plugins/uast-kotlin/testData/SimpleScript.log.txt +++ b/plugins/uast-kotlin/testData/SimpleScript.log.txt @@ -22,7 +22,8 @@ UFile (package = ) UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1)) UIdentifier (Identifier (println)) USimpleNameReferenceExpression (identifier = println, resolvesTo = null) - ULiteralExpression (value = "Hello World!") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "Hello World!") UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1)) UIdentifier (Identifier (getBarOrNull)) USimpleNameReferenceExpression (identifier = getBarOrNull, resolvesTo = null) @@ -30,7 +31,8 @@ UFile (package = ) UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1)) UIdentifier (Identifier (println)) USimpleNameReferenceExpression (identifier = println, resolvesTo = null) - ULiteralExpression (value = "Goodbye World!") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "Goodbye World!") UClass (name = Bar) UField (name = b) UAnnotation (fqName = org.jetbrains.annotations.NotNull) diff --git a/plugins/uast-kotlin/testData/StringTemplate.log.txt b/plugins/uast-kotlin/testData/StringTemplate.log.txt index 1f25dbd51a5..548702812cc 100644 --- a/plugins/uast-kotlin/testData/StringTemplate.log.txt +++ b/plugins/uast-kotlin/testData/StringTemplate.log.txt @@ -2,13 +2,16 @@ UFile (package = ) UClass (name = StringTemplateKt) UField (name = foo) UAnnotation (fqName = org.jetbrains.annotations.NotNull) - ULiteralExpression (value = "lorem") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "lorem") UField (name = bar) UAnnotation (fqName = org.jetbrains.annotations.NotNull) - ULiteralExpression (value = "ipsum") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "ipsum") UField (name = baz) UAnnotation (fqName = org.jetbrains.annotations.NotNull) - ULiteralExpression (value = "dolor") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "dolor") UField (name = foobarbaz) UAnnotation (fqName = org.jetbrains.annotations.NotNull) UPolyadicExpression (operator = +) diff --git a/plugins/uast-kotlin/testData/StringTemplate.types.txt b/plugins/uast-kotlin/testData/StringTemplate.types.txt index 01a7d9cdde5..14c966253b3 100644 --- a/plugins/uast-kotlin/testData/StringTemplate.types.txt +++ b/plugins/uast-kotlin/testData/StringTemplate.types.txt @@ -2,13 +2,16 @@ UFile (package = ) [public final class StringTemplateKt {...] UClass (name = StringTemplateKt) [public final class StringTemplateKt {...}] UField (name = foo) [@org.jetbrains.annotations.NotNull private static final var foo: java.lang.String = "lorem"] UAnnotation (fqName = org.jetbrains.annotations.NotNull) [@org.jetbrains.annotations.NotNull] - ULiteralExpression (value = "lorem") ["lorem"] : PsiType:String + UPolyadicExpression (operator = +) ["lorem"] : PsiType:String + ULiteralExpression (value = "lorem") ["lorem"] : PsiType:String UField (name = bar) [@org.jetbrains.annotations.NotNull private static final var bar: java.lang.String = "ipsum"] UAnnotation (fqName = org.jetbrains.annotations.NotNull) [@org.jetbrains.annotations.NotNull] - ULiteralExpression (value = "ipsum") ["ipsum"] : PsiType:String + UPolyadicExpression (operator = +) ["ipsum"] : PsiType:String + ULiteralExpression (value = "ipsum") ["ipsum"] : PsiType:String UField (name = baz) [@org.jetbrains.annotations.NotNull private static final var baz: java.lang.String = "dolor"] UAnnotation (fqName = org.jetbrains.annotations.NotNull) [@org.jetbrains.annotations.NotNull] - ULiteralExpression (value = "dolor") ["dolor"] : PsiType:String + UPolyadicExpression (operator = +) ["dolor"] : PsiType:String + ULiteralExpression (value = "dolor") ["dolor"] : PsiType:String UField (name = foobarbaz) [@org.jetbrains.annotations.NotNull private static final var foobarbaz: java.lang.String = foo + " " + bar + " " + baz] UAnnotation (fqName = org.jetbrains.annotations.NotNull) [@org.jetbrains.annotations.NotNull] UPolyadicExpression (operator = +) [foo + " " + bar + " " + baz] : PsiType:String diff --git a/plugins/uast-kotlin/testData/StringTemplateComplex.log.txt b/plugins/uast-kotlin/testData/StringTemplateComplex.log.txt index 57cb9a77c1e..70bc02526cb 100644 --- a/plugins/uast-kotlin/testData/StringTemplateComplex.log.txt +++ b/plugins/uast-kotlin/testData/StringTemplateComplex.log.txt @@ -2,20 +2,27 @@ UFile (package = ) UClass (name = StringTemplateComplexKt) UField (name = muchRecur) UAnnotation (fqName = org.jetbrains.annotations.NotNull) - ULiteralExpression (value = "abc") + UPolyadicExpression (operator = +) + UPolyadicExpression (operator = +) + UPolyadicExpression (operator = +) + UPolyadicExpression (operator = +) + ULiteralExpression (value = "abc") UField (name = case4) UAnnotation (fqName = org.jetbrains.annotations.NotNull) UPolyadicExpression (operator = +) ULiteralExpression (value = "a ") - ULiteralExpression (value = "literal") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "literal") ULiteralExpression (value = " z") UField (name = case5) UAnnotation (fqName = org.jetbrains.annotations.NotNull) UPolyadicExpression (operator = +) ULiteralExpression (value = "a ") - ULiteralExpression (value = "literal") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "literal") ULiteralExpression (value = " ") - ULiteralExpression (value = "literal") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "literal") ULiteralExpression (value = " z") UField (name = literalInLiteral) UAnnotation (fqName = org.jetbrains.annotations.NotNull) @@ -49,18 +56,21 @@ UFile (package = ) ULiteralExpression (value = 0) UBlockExpression UReturnExpression - USimpleNameReferenceExpression (identifier = i) + UPolyadicExpression (operator = +) + USimpleNameReferenceExpression (identifier = i) UMethod (name = foo) UBlockExpression UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1)) UIdentifier (Identifier (println)) USimpleNameReferenceExpression (identifier = println, resolvesTo = null) - USimpleNameReferenceExpression (identifier = baz) + UPolyadicExpression (operator = +) + USimpleNameReferenceExpression (identifier = baz) UDeclarationsExpression ULocalVariable (name = template1) - UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0)) - UIdentifier (Identifier (simpleForTemplate)) - USimpleNameReferenceExpression (identifier = simpleForTemplate, resolvesTo = null) + UPolyadicExpression (operator = +) + UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0)) + UIdentifier (Identifier (simpleForTemplate)) + USimpleNameReferenceExpression (identifier = simpleForTemplate, resolvesTo = null) UDeclarationsExpression ULocalVariable (name = template2) UPolyadicExpression (operator = +) diff --git a/plugins/uast-kotlin/testData/StringTemplateComplex.types.txt b/plugins/uast-kotlin/testData/StringTemplateComplex.types.txt index 646606ebb2e..5e1914e0d2f 100644 --- a/plugins/uast-kotlin/testData/StringTemplateComplex.types.txt +++ b/plugins/uast-kotlin/testData/StringTemplateComplex.types.txt @@ -2,20 +2,27 @@ UFile (package = ) [public final class StringTemplateComplexKt {...] UClass (name = StringTemplateComplexKt) [public final class StringTemplateComplexKt {...}] UField (name = muchRecur) [@org.jetbrains.annotations.NotNull private static final var muchRecur: java.lang.String = "abc"] UAnnotation (fqName = org.jetbrains.annotations.NotNull) [@org.jetbrains.annotations.NotNull] - ULiteralExpression (value = "abc") ["abc"] : PsiType:String + UPolyadicExpression (operator = +) ["abc"] : PsiType:String + UPolyadicExpression (operator = +) ["abc"] : PsiType:String + UPolyadicExpression (operator = +) ["abc"] : PsiType:String + UPolyadicExpression (operator = +) ["abc"] : PsiType:String + ULiteralExpression (value = "abc") ["abc"] : PsiType:String UField (name = case4) [@org.jetbrains.annotations.NotNull private static final var case4: java.lang.String = "a " + "literal" + " z"] UAnnotation (fqName = org.jetbrains.annotations.NotNull) [@org.jetbrains.annotations.NotNull] UPolyadicExpression (operator = +) ["a " + "literal" + " z"] : PsiType:String ULiteralExpression (value = "a ") ["a "] : PsiType:String - ULiteralExpression (value = "literal") ["literal"] : PsiType:String + UPolyadicExpression (operator = +) ["literal"] : PsiType:String + ULiteralExpression (value = "literal") ["literal"] : PsiType:String ULiteralExpression (value = " z") [" z"] : PsiType:String UField (name = case5) [@org.jetbrains.annotations.NotNull private static final var case5: java.lang.String = "a " + "literal" + " " + "literal" + " z"] UAnnotation (fqName = org.jetbrains.annotations.NotNull) [@org.jetbrains.annotations.NotNull] UPolyadicExpression (operator = +) ["a " + "literal" + " " + "literal" + " z"] : PsiType:String ULiteralExpression (value = "a ") ["a "] : PsiType:String - ULiteralExpression (value = "literal") ["literal"] : PsiType:String + UPolyadicExpression (operator = +) ["literal"] : PsiType:String + ULiteralExpression (value = "literal") ["literal"] : PsiType:String ULiteralExpression (value = " ") [" "] : PsiType:String - ULiteralExpression (value = "literal") ["literal"] : PsiType:String + UPolyadicExpression (operator = +) ["literal"] : PsiType:String + ULiteralExpression (value = "literal") ["literal"] : PsiType:String ULiteralExpression (value = " z") [" z"] : PsiType:String UField (name = literalInLiteral) [@org.jetbrains.annotations.NotNull private static final var literalInLiteral: java.lang.String = "a " + "literal" + case4 + " z"] UAnnotation (fqName = org.jetbrains.annotations.NotNull) [@org.jetbrains.annotations.NotNull] @@ -49,18 +56,21 @@ UFile (package = ) [public final class StringTemplateComplexKt {...] ULiteralExpression (value = 0) [0] : PsiType:int UBlockExpression [{...}] UReturnExpression [return i] - USimpleNameReferenceExpression (identifier = i) [i] : PsiType:int + UPolyadicExpression (operator = +) [i] : PsiType:String + USimpleNameReferenceExpression (identifier = i) [i] : PsiType:int UMethod (name = foo) [public static final fun foo() : void {...}] UBlockExpression [{...}] : PsiType:void UCallExpression (kind = UastCallKind(name='method_call'), argCount = 1)) [println(baz)] : PsiType:void UIdentifier (Identifier (println)) [UIdentifier (Identifier (println))] USimpleNameReferenceExpression (identifier = println, resolvesTo = null) [println] : PsiType:void - USimpleNameReferenceExpression (identifier = baz) [baz] + UPolyadicExpression (operator = +) [baz] : PsiType:String + USimpleNameReferenceExpression (identifier = baz) [baz] UDeclarationsExpression [var template1: java.lang.String = simpleForTemplate()] ULocalVariable (name = template1) [var template1: java.lang.String = simpleForTemplate()] - UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0)) [simpleForTemplate()] : PsiType:String - UIdentifier (Identifier (simpleForTemplate)) [UIdentifier (Identifier (simpleForTemplate))] - USimpleNameReferenceExpression (identifier = simpleForTemplate, resolvesTo = null) [simpleForTemplate] : PsiType:String + UPolyadicExpression (operator = +) [simpleForTemplate()] : PsiType:String + UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0)) [simpleForTemplate()] : PsiType:String + UIdentifier (Identifier (simpleForTemplate)) [UIdentifier (Identifier (simpleForTemplate))] + USimpleNameReferenceExpression (identifier = simpleForTemplate, resolvesTo = null) [simpleForTemplate] : PsiType:String UDeclarationsExpression [var template2: java.lang.String = "." + simpleForTemplate()] ULocalVariable (name = template2) [var template2: java.lang.String = "." + simpleForTemplate()] UPolyadicExpression (operator = +) ["." + simpleForTemplate()] : PsiType:String diff --git a/plugins/uast-kotlin/testData/SuperCalls.log-ide.txt b/plugins/uast-kotlin/testData/SuperCalls.log-ide.txt index e55664a2f9a..3924d4b727b 100644 --- a/plugins/uast-kotlin/testData/SuperCalls.log-ide.txt +++ b/plugins/uast-kotlin/testData/SuperCalls.log-ide.txt @@ -3,7 +3,8 @@ UFile (package = ) UField (name = anon) UAnnotation (fqName = org.jetbrains.annotations.NotNull) UObjectLiteralExpression - ULiteralExpression (value = "textForAnon") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "textForAnon") UClass (name = null) UMethod (name = bar) UBlockExpression @@ -11,7 +12,8 @@ UFile (package = ) UIdentifier (Identifier (cons)) USimpleNameReferenceExpression (identifier = cons, resolvesTo = null) UObjectLiteralExpression - ULiteralExpression (value = "inner literal") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "inner literal") UClass (name = null) UMethod (name = ) UMethod (name = ) @@ -21,7 +23,8 @@ UFile (package = ) UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 1)) UIdentifier (Identifier (A)) USimpleNameReferenceExpression (identifier = , resolvesTo = A) - ULiteralExpression (value = "inner class") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "inner class") UMethod (name = getAnon) UMethod (name = cons) UParameter (name = a) @@ -97,4 +100,5 @@ UFile (package = ) UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 1)) UIdentifier (Identifier (A)) USimpleNameReferenceExpression (identifier = , resolvesTo = A) - ULiteralExpression (value = "text") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "text") diff --git a/plugins/uast-kotlin/testData/SuperCalls.log.txt b/plugins/uast-kotlin/testData/SuperCalls.log.txt index 5cdd4558f78..7f449519c10 100644 --- a/plugins/uast-kotlin/testData/SuperCalls.log.txt +++ b/plugins/uast-kotlin/testData/SuperCalls.log.txt @@ -3,7 +3,8 @@ UFile (package = ) UField (name = anon) UAnnotation (fqName = org.jetbrains.annotations.NotNull) UObjectLiteralExpression - ULiteralExpression (value = "textForAnon") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "textForAnon") UClass (name = null) UMethod (name = bar) UBlockExpression @@ -11,7 +12,8 @@ UFile (package = ) UIdentifier (Identifier (cons)) USimpleNameReferenceExpression (identifier = cons, resolvesTo = null) UObjectLiteralExpression - ULiteralExpression (value = "inner literal") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "inner literal") UClass (name = null) UMethod (name = SuperCallsKt$anon$1$bar$1) UMethod (name = SuperCallsKt$anon$1) @@ -21,7 +23,8 @@ UFile (package = ) UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 1)) UIdentifier (Identifier (A)) USimpleNameReferenceExpression (identifier = , resolvesTo = A) - ULiteralExpression (value = "inner class") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "inner class") UMethod (name = getAnon) UMethod (name = cons) UParameter (name = a) @@ -97,4 +100,5 @@ UFile (package = ) UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 1)) UIdentifier (Identifier (A)) USimpleNameReferenceExpression (identifier = , resolvesTo = A) - ULiteralExpression (value = "text") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "text") diff --git a/plugins/uast-kotlin/testData/TypeReferences.log.txt b/plugins/uast-kotlin/testData/TypeReferences.log.txt index 6173abf45b4..2fff6b7146f 100644 --- a/plugins/uast-kotlin/testData/TypeReferences.log.txt +++ b/plugins/uast-kotlin/testData/TypeReferences.log.txt @@ -6,10 +6,12 @@ UFile (package = ) UBlockExpression UDeclarationsExpression ULocalVariable (name = varWithType) - ULiteralExpression (value = "Not Null") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "Not Null") UDeclarationsExpression ULocalVariable (name = varWithoutType) - ULiteralExpression (value = "lorem ipsum") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "lorem ipsum") UDeclarationsExpression ULocalVariable (name = result) UBinaryExpression (operator = +) diff --git a/plugins/uast-kotlin/testData/UnexpectedContainerException.log-ide.txt b/plugins/uast-kotlin/testData/UnexpectedContainerException.log-ide.txt index 29df09cd201..370f70a78ff 100644 --- a/plugins/uast-kotlin/testData/UnexpectedContainerException.log-ide.txt +++ b/plugins/uast-kotlin/testData/UnexpectedContainerException.log-ide.txt @@ -36,5 +36,5 @@ UFile (package = ) UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 1)) UIdentifier (Identifier (UnsupportedOperationException)) USimpleNameReferenceExpression (identifier = , resolvesTo = UnsupportedOperationException) - ULiteralExpression (value = "") + UPolyadicExpression (value = "") UMethod (name = ) diff --git a/plugins/uast-kotlin/testData/UnexpectedContainerException.log.txt b/plugins/uast-kotlin/testData/UnexpectedContainerException.log.txt index d8b0fa29d03..57c397a0009 100644 --- a/plugins/uast-kotlin/testData/UnexpectedContainerException.log.txt +++ b/plugins/uast-kotlin/testData/UnexpectedContainerException.log.txt @@ -36,5 +36,5 @@ UFile (package = ) UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 1)) UIdentifier (Identifier (UnsupportedOperationException)) USimpleNameReferenceExpression (identifier = , resolvesTo = UnsupportedOperationException) - ULiteralExpression (value = "") + UPolyadicExpression (value = "") UMethod (name = Model$1$1) diff --git a/plugins/uast-kotlin/testData/UnexpectedContainerException.types.txt b/plugins/uast-kotlin/testData/UnexpectedContainerException.types.txt index 9b22766399f..2e498cbe727 100644 --- a/plugins/uast-kotlin/testData/UnexpectedContainerException.types.txt +++ b/plugins/uast-kotlin/testData/UnexpectedContainerException.types.txt @@ -36,5 +36,5 @@ UFile (package = ) [public abstract interface Callback {...] UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 1)) [("")] : PsiType:UnsupportedOperationException UIdentifier (Identifier (UnsupportedOperationException)) [UIdentifier (Identifier (UnsupportedOperationException))] USimpleNameReferenceExpression (identifier = , resolvesTo = UnsupportedOperationException) [] : PsiType:UnsupportedOperationException - ULiteralExpression (value = "") [""] : PsiType:String + UPolyadicExpression (value = "") [""] : PsiType:String UMethod (name = Model$1$1) [fun Model$1$1() = UastEmptyExpression] diff --git a/plugins/uast-kotlin/testData/WhenAndDestructing.log.txt b/plugins/uast-kotlin/testData/WhenAndDestructing.log.txt index cd9124b0aab..b62fb8cccba 100644 --- a/plugins/uast-kotlin/testData/WhenAndDestructing.log.txt +++ b/plugins/uast-kotlin/testData/WhenAndDestructing.log.txt @@ -9,16 +9,20 @@ UFile (package = ) UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2)) UIdentifier (Identifier (listOf)) USimpleNameReferenceExpression (identifier = listOf, resolvesTo = null) - ULiteralExpression (value = "1") - ULiteralExpression (value = "2") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "1") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "2") USwitchExpression USimpleNameReferenceExpression (identifier = string) UExpressionList (when) USwitchClauseExpressionWithBody - ULiteralExpression (value = "aaaa") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "aaaa") UExpressionList (when_entry) UReturnExpression - ULiteralExpression (value = "bindingContext") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "bindingContext") UBreakExpression (label = null) USwitchClauseExpressionWithBody UExpressionList (when_entry) diff --git a/plugins/uast-kotlin/testData/WhenIs.log.txt b/plugins/uast-kotlin/testData/WhenIs.log.txt index 0941dd1c738..0ce880d5d62 100644 --- a/plugins/uast-kotlin/testData/WhenIs.log.txt +++ b/plugins/uast-kotlin/testData/WhenIs.log.txt @@ -20,5 +20,6 @@ UFile (package = ) USimpleNameReferenceExpression (identifier = it) UTypeReferenceExpression (name = java.lang.String) UExpressionList (when_entry) - ULiteralExpression (value = "") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "") UBreakExpression (label = null) diff --git a/plugins/uast-kotlin/testData/WhenStringLiteral.log.txt b/plugins/uast-kotlin/testData/WhenStringLiteral.log.txt index e689d23089e..5773cba2846 100644 --- a/plugins/uast-kotlin/testData/WhenStringLiteral.log.txt +++ b/plugins/uast-kotlin/testData/WhenStringLiteral.log.txt @@ -11,13 +11,16 @@ UFile (package = ) USimpleNameReferenceExpression (identifier = a) UExpressionList (when) USwitchClauseExpressionWithBody - ULiteralExpression (value = "abc") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "abc") UExpressionList (when_entry) ULiteralExpression (value = 1) UBreakExpression (label = null) USwitchClauseExpressionWithBody - ULiteralExpression (value = "def") - ULiteralExpression (value = "ghi") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "def") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "ghi") UExpressionList (when_entry) ULiteralExpression (value = 2) UBreakExpression (label = null) @@ -29,5 +32,7 @@ UFile (package = ) UMethod (name = getB) UMethod (name = ) UBlockExpression - ULiteralExpression (value = "abc1") - ULiteralExpression (value = "def1") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "abc1") + UPolyadicExpression (operator = +) + ULiteralExpression (value = "def1")