Uast, Lint: Update and fix tests
This commit is contained in:
+1
-1
@@ -82,7 +82,7 @@ public class CipherGetInstanceDetector extends Detector implements UastScanner {
|
||||
UExpression expression = argumentList.get(0);
|
||||
if (expression instanceof ULiteralExpression) {
|
||||
ULiteralExpression argument = (ULiteralExpression)expression;
|
||||
String parameter = argument.asString();
|
||||
String parameter = argument.renderString();
|
||||
checkParameter(context, node, argument, parameter, false);
|
||||
} else if (expression instanceof UResolvable) {
|
||||
UDeclaration declaration = ((UResolvable)expression).resolve(context);
|
||||
|
||||
+14
-8
@@ -211,16 +211,22 @@ public class JavaPerformanceDetector extends Detector implements UastScanner {
|
||||
}
|
||||
|
||||
if (mCheckValueOf) {
|
||||
UType type = UastErrorType.INSTANCE;
|
||||
if (typeName == null) {
|
||||
typeName = classReference.getIdentifier();
|
||||
UDeclaration resolvedDeclaration = classReference.resolve(mContext);
|
||||
if (resolvedDeclaration instanceof UClass) {
|
||||
type = ((UClass) resolvedDeclaration).getDefaultType();
|
||||
typeName = type.getName();
|
||||
}
|
||||
}
|
||||
if ((typeName.equals(INTEGER)
|
||||
|| typeName.equals(BOOLEAN)
|
||||
|| typeName.equals(FLOAT)
|
||||
|| typeName.equals(CHARACTER)
|
||||
|| typeName.equals(LONG)
|
||||
|| typeName.equals(DOUBLE)
|
||||
|| typeName.equals(BYTE))
|
||||
if ((type.isInt()
|
||||
|| type.isBoolean()
|
||||
|| type.isFloat()
|
||||
|| type.isChar()
|
||||
|| type.isLong()
|
||||
|| type.isDouble()
|
||||
|| type.isShort()
|
||||
|| type.isByte())
|
||||
&& node.getValueArgumentCount() == 1) {
|
||||
String argument = node.getValueArguments().get(0).renderString();
|
||||
mContext.report(USE_VALUE_OF, node, mContext.getLocation(node), getUseValueOfErrorMessage(
|
||||
|
||||
@@ -37,7 +37,7 @@ interface UDeclaration : UElement, UNamed {
|
||||
*/
|
||||
open fun matchesNameWithContaining(containingClassFqName: String, name: String): Boolean {
|
||||
if (!matchesName(name)) return false
|
||||
val containingClass = parent as? UClass ?: return false
|
||||
val containingClass = this.getContainingClass() ?: return false
|
||||
return containingClass.matchesFqName(containingClassFqName)
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,8 @@ interface ULiteralExpression : UExpression {
|
||||
/**
|
||||
* Returns true if the literal is a `null`-literal, false otherwise.
|
||||
*/
|
||||
val isNull: Boolean
|
||||
open val isNull: Boolean
|
||||
get() = value == null
|
||||
|
||||
/**
|
||||
* Returns true if the literal is a [String] literal, false otherwise.
|
||||
@@ -44,24 +45,23 @@ interface ULiteralExpression : UExpression {
|
||||
val isBoolean: Boolean
|
||||
get() = evaluate() is Boolean
|
||||
|
||||
/**
|
||||
* Returns the string representation of the literal expression.
|
||||
*
|
||||
* @return the string representation, or "null" if the literal is a "null"-literal.
|
||||
*/
|
||||
fun asString(): String {
|
||||
val value = value
|
||||
return if (value == null)
|
||||
"null"
|
||||
else
|
||||
value.toString()
|
||||
}
|
||||
|
||||
override fun accept(visitor: UastVisitor) {
|
||||
visitor.visitLiteralExpression(this)
|
||||
visitor.afterVisitLiteralExpression(this)
|
||||
}
|
||||
|
||||
override fun logString() = "ULiteralExpression (${asString()})"
|
||||
override fun renderString() = if (value is String) "\"$value\"" else asString()
|
||||
override fun renderString(): String {
|
||||
val value = value
|
||||
return when (value) {
|
||||
null -> "null"
|
||||
is Char -> "'$value'"
|
||||
is String -> '"' + value.replace("\\", "\\\\")
|
||||
.replace("\r", "\\r").replace("\n", "\\n")
|
||||
.replace("\t", "\\t").replace("\b", "\\b")
|
||||
.replace("\"", "\\\"") + '"'
|
||||
else -> value.toString()
|
||||
}
|
||||
}
|
||||
|
||||
override fun logString() = "ULiteralExpression (${renderString()})"
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
package org.jetbrains.uast.java
|
||||
|
||||
import com.intellij.psi.PsiField
|
||||
import com.intellij.psi.PsiLocalVariable
|
||||
import com.intellij.psi.PsiVariable
|
||||
import org.jetbrains.uast.*
|
||||
import org.jetbrains.uast.psi.PsiElementBacked
|
||||
@@ -34,6 +35,7 @@ class JavaUVariable(
|
||||
|
||||
override val kind = when (psi) {
|
||||
is PsiField -> UastVariableKind.MEMBER
|
||||
is PsiLocalVariable -> UastVariableKind.LOCAL_VARIABLE
|
||||
else -> UastVariableKind.LOCAL_VARIABLE
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package org.jetbrains.uast.java
|
||||
|
||||
import com.intellij.psi.PsiKeyword
|
||||
import com.intellij.psi.PsiLiteralExpression
|
||||
import org.jetbrains.uast.UElement
|
||||
import org.jetbrains.uast.ULiteralExpression
|
||||
@@ -25,10 +24,6 @@ class JavaULiteralExpression(
|
||||
override val psi: PsiLiteralExpression,
|
||||
override val parent: UElement
|
||||
) : JavaAbstractUElement(), ULiteralExpression, PsiElementBacked, JavaUElementWithType {
|
||||
override fun asString() = psi.text
|
||||
override fun evaluate() = psi.value
|
||||
override val value by lz { evaluate() }
|
||||
|
||||
override val isNull: Boolean
|
||||
get() = asString() == PsiKeyword.NULL
|
||||
}
|
||||
@@ -28,7 +28,7 @@ class JavaUPostfixExpression(
|
||||
) : JavaAbstractUElement(), UPostfixExpression, PsiElementBacked, JavaUElementWithType, JavaEvaluatableUElement {
|
||||
override val operand by lz { JavaConverter.convertOrEmpty(psi.operand, this) }
|
||||
|
||||
override val operator = when (psi.operationSign) {
|
||||
override val operator = when (psi.operationTokenType) {
|
||||
JavaTokenType.PLUSPLUS -> UastPostfixOperator.INC
|
||||
JavaTokenType.MINUSMINUS -> UastPostfixOperator.DEC
|
||||
else -> UastPostfixOperator.UNKNOWN
|
||||
|
||||
@@ -28,7 +28,7 @@ class JavaUPrefixExpression(
|
||||
) : JavaAbstractUElement(), UPrefixExpression, PsiElementBacked, JavaUElementWithType, JavaEvaluatableUElement {
|
||||
override val operand by lz { JavaConverter.convertOrEmpty(psi.operand, this) }
|
||||
|
||||
override val operator = when (psi.operationSign) {
|
||||
override val operator = when (psi.operationTokenType) {
|
||||
JavaTokenType.PLUS -> UastPrefixOperator.UNARY_PLUS
|
||||
JavaTokenType.MINUS -> UastPrefixOperator.UNARY_MINUS
|
||||
JavaTokenType.PLUSPLUS -> UastPrefixOperator.INC
|
||||
|
||||
@@ -52,6 +52,7 @@ internal fun PsiModifierListOwner.getVisibility(): UastVisibility {
|
||||
if (hasModifierProperty(PsiModifier.PUBLIC)) return UastVisibility.PUBLIC
|
||||
if (hasModifierProperty(PsiModifier.PROTECTED)) return UastVisibility.PROTECTED
|
||||
if (hasModifierProperty(PsiModifier.PRIVATE)) return UastVisibility.PRIVATE
|
||||
if (this is PsiLocalVariable) return UastVisibility.LOCAL
|
||||
return JavaUastVisibilities.PACKAGE_LOCAL
|
||||
}
|
||||
|
||||
|
||||
+8
-6
@@ -1,4 +1,4 @@
|
||||
UFile (package = null)
|
||||
UFile (package = )
|
||||
UClass (_Dummy_, kind = class)
|
||||
UClass (ControlStructures, kind = class)
|
||||
UFunction (main, kind = function, paramCount = 1)
|
||||
@@ -10,8 +10,8 @@ UFile (package = null)
|
||||
USimpleReferenceExpression (length)
|
||||
ULiteralExpression (0)
|
||||
UBlockExpression
|
||||
USpecialExpressionList (return)
|
||||
|
||||
UReturnExpression
|
||||
<no element>
|
||||
EmptyExpression
|
||||
UDeclarationsExpression
|
||||
UVariable (mode, kind = local)
|
||||
@@ -23,7 +23,9 @@ UFile (package = null)
|
||||
ULiteralExpression (1)
|
||||
ULiteralExpression ("singleArg")
|
||||
ULiteralExpression ("multiArgs")
|
||||
UForEachExpression (arg)
|
||||
UForEachExpression
|
||||
UVariable (arg, kind = parameter)
|
||||
<no initializer>
|
||||
USimpleReferenceExpression (args)
|
||||
UBlockExpression
|
||||
UQualifiedExpression
|
||||
@@ -79,7 +81,7 @@ UFile (package = null)
|
||||
USimpleReferenceExpression (i)
|
||||
UPostfixExpression (++)
|
||||
USimpleReferenceExpression (i)
|
||||
UAssignmentExpression (=)
|
||||
UBinaryExpression (=)
|
||||
USimpleReferenceExpression (i)
|
||||
ULiteralExpression (0)
|
||||
UDoWhileExpression
|
||||
@@ -96,6 +98,6 @@ UFile (package = null)
|
||||
UFunctionCallExpression (UastCallKind(name='function_call'), argCount = 1)
|
||||
USimpleReferenceExpression (println)
|
||||
USimpleReferenceExpression (i)
|
||||
UAssignmentExpression (+=)
|
||||
UBinaryExpression (+=)
|
||||
USimpleReferenceExpression (i)
|
||||
ULiteralExpression (1)
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
UFile (package = null)
|
||||
UFile (package = )
|
||||
UClass (_Dummy_, kind = class)
|
||||
UClass (Lambda, kind = class)
|
||||
UFunction (example, kind = function, paramCount = 0)
|
||||
@@ -27,4 +27,4 @@ UFile (package = null)
|
||||
USimpleReferenceExpression (arg)
|
||||
UClass (Job, kind = interface)
|
||||
UFunction (doJob, kind = function, paramCount = 1)
|
||||
EmptyExpression
|
||||
<no element>
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
UFile (package = null)
|
||||
UFile (package = )
|
||||
UClass (_Dummy_, kind = class)
|
||||
UClass (NestedClasses, kind = class)
|
||||
UClass (Nested, kind = class)
|
||||
|
||||
+5
-5
@@ -1,22 +1,22 @@
|
||||
UFile (package = null)
|
||||
UFile (package = )
|
||||
UClass (_Dummy_, kind = class)
|
||||
UClass (Simple, kind = class)
|
||||
UVariable (name, kind = member)
|
||||
EmptyExpression
|
||||
UFunction (<init>, kind = CONSTRUCTOR, paramCount = 1)
|
||||
UFunction (<init>, kind = constructor, paramCount = 1)
|
||||
UBlockExpression
|
||||
UAssignmentExpression (=)
|
||||
UBinaryExpression (=)
|
||||
UQualifiedExpression
|
||||
UThisExpression
|
||||
USimpleReferenceExpression (name)
|
||||
USimpleReferenceExpression (name)
|
||||
UFunction (getName, kind = function, paramCount = 0)
|
||||
UBlockExpression
|
||||
USpecialExpressionList (return)
|
||||
UReturnExpression
|
||||
USimpleReferenceExpression (name)
|
||||
UFunction (setName, kind = function, paramCount = 1)
|
||||
UBlockExpression
|
||||
UAssignmentExpression (=)
|
||||
UBinaryExpression (=)
|
||||
UQualifiedExpression
|
||||
UThisExpression
|
||||
USimpleReferenceExpression (name)
|
||||
|
||||
+27
-31
@@ -1,28 +1,27 @@
|
||||
UFile (package = null)
|
||||
UFile (package = )
|
||||
UClass (_Dummy_, kind = class)
|
||||
UClass (SpecialExpressions, kind = class)
|
||||
UFunction (test, kind = function, paramCount = 0)
|
||||
UBlockExpression
|
||||
USpecialExpressionList (assert)
|
||||
UFunctionCallExpression (UastCallKind(name='assert'), argCount = 1)
|
||||
<no element>
|
||||
UBinaryExpression (>)
|
||||
ULiteralExpression (5)
|
||||
ULiteralExpression (3)
|
||||
EmptyExpression
|
||||
USpecialExpressionList (assert)
|
||||
UFunctionCallExpression (UastCallKind(name='assert'), argCount = 2)
|
||||
<no element>
|
||||
UBinaryExpression (>)
|
||||
ULiteralExpression (5)
|
||||
ULiteralExpression (3)
|
||||
ULiteralExpression ("Message")
|
||||
USpecialExpressionList (synchronized)
|
||||
UThisExpression
|
||||
UBlockExpression
|
||||
UBlockExpression
|
||||
UQualifiedExpression
|
||||
UQualifiedExpression
|
||||
UQualifiedExpression
|
||||
USimpleReferenceExpression (System)
|
||||
USimpleReferenceExpression (out)
|
||||
UFunctionCallExpression (UastCallKind(name='function_call'), argCount = 1)
|
||||
USimpleReferenceExpression (println)
|
||||
ULiteralExpression ("A")
|
||||
USimpleReferenceExpression (System)
|
||||
USimpleReferenceExpression (out)
|
||||
UFunctionCallExpression (UastCallKind(name='function_call'), argCount = 1)
|
||||
USimpleReferenceExpression (println)
|
||||
ULiteralExpression ("A")
|
||||
UDeclarationsExpression
|
||||
UVariable (a, kind = local)
|
||||
ULiteralExpression (5)
|
||||
@@ -40,8 +39,7 @@ UFile (package = null)
|
||||
USimpleReferenceExpression (a)
|
||||
ULiteralExpression (3)
|
||||
UBlockExpression
|
||||
USpecialExpressionList (break)
|
||||
|
||||
UBreakExpression (<no label>)
|
||||
EmptyExpression
|
||||
UIfExpression
|
||||
UBinaryExpression (===)
|
||||
@@ -50,8 +48,7 @@ UFile (package = null)
|
||||
ULiteralExpression (5)
|
||||
ULiteralExpression (0)
|
||||
UBlockExpression
|
||||
USpecialExpressionList (continue)
|
||||
|
||||
UContinueExpression (<no label>)
|
||||
EmptyExpression
|
||||
UPostfixExpression (--)
|
||||
USimpleReferenceExpression (a)
|
||||
@@ -71,26 +68,25 @@ UFile (package = null)
|
||||
USwitchExpression
|
||||
USimpleReferenceExpression (a)
|
||||
UBlockExpression
|
||||
UExpressionSwitchClauseExpression
|
||||
USwitchClauseExpression
|
||||
ULiteralExpression (1)
|
||||
UBlockExpression
|
||||
UAssignmentExpression (=)
|
||||
UBinaryExpression (=)
|
||||
USimpleReferenceExpression (x)
|
||||
ULiteralExpression ("1")
|
||||
USpecialExpressionList (break)
|
||||
|
||||
UExpressionSwitchClauseExpression
|
||||
UBreakExpression (<no label>)
|
||||
USwitchClauseExpression
|
||||
ULiteralExpression (3)
|
||||
UAssignmentExpression (=)
|
||||
UBinaryExpression (=)
|
||||
USimpleReferenceExpression (x)
|
||||
ULiteralExpression ("3")
|
||||
UExpressionSwitchClauseExpression
|
||||
USwitchClauseExpression
|
||||
ULiteralExpression (4)
|
||||
UAssignmentExpression (=)
|
||||
UBinaryExpression (=)
|
||||
USimpleReferenceExpression (x)
|
||||
ULiteralExpression ("4")
|
||||
UDefaultSwitchClause
|
||||
UAssignmentExpression (=)
|
||||
DefaultUSwitchClauseExpression
|
||||
UBinaryExpression (=)
|
||||
USimpleReferenceExpression (x)
|
||||
ULiteralExpression ("")
|
||||
UIfExpression
|
||||
@@ -105,7 +101,7 @@ UFile (package = null)
|
||||
USimpleReferenceExpression (equals)
|
||||
ULiteralExpression ("1")
|
||||
UBlockExpression
|
||||
USpecialExpressionList (throw)
|
||||
UThrowExpression
|
||||
UFunctionCallExpression (UastCallKind(name='constructor_call'), argCount = 1)
|
||||
<no element>
|
||||
ULiteralExpression ("Err")
|
||||
@@ -119,12 +115,12 @@ UFile (package = null)
|
||||
ULiteralExpression (1000) UCatchClause
|
||||
UBlockExpression
|
||||
UBlockExpression
|
||||
UAssignmentExpression (=)
|
||||
UBinaryExpression (=)
|
||||
USimpleReferenceExpression (a)
|
||||
ULiteralExpression (3)
|
||||
UBlockExpression
|
||||
UAssignmentExpression (=)
|
||||
UBinaryExpression (=)
|
||||
USimpleReferenceExpression (a)
|
||||
ULiteralExpression (5)
|
||||
USpecialExpressionList (return)
|
||||
UReturnExpression
|
||||
ULiteralExpression (true)
|
||||
+6
-7
@@ -1,20 +1,20 @@
|
||||
default class _Dummy_ {
|
||||
default class ControlStructures {
|
||||
public fun main(args: String[]): void {
|
||||
package_local class _Dummy_ {
|
||||
package_local class ControlStructures {
|
||||
public static fun main(args: String[]): void {
|
||||
if (args.length === 0) {
|
||||
return
|
||||
}
|
||||
|
||||
var mode: String = (args.length === 1) ? ("singleArg") : ("multiArgs")
|
||||
local var mode: String = (args.length === 1) ? ("singleArg") : ("multiArgs")
|
||||
for (arg : args) {
|
||||
System.out.println(arg)
|
||||
}
|
||||
|
||||
for (var i: int = 0; i < args.length; ++i) {
|
||||
for (local var i: int = 0; i < args.length; ++i) {
|
||||
System.out.println(i + ": " + args[i])
|
||||
}
|
||||
|
||||
var i: int = 0
|
||||
local var i: int = 0
|
||||
while (i < args.length) {
|
||||
System.out.println("Index " + i)
|
||||
i++
|
||||
@@ -28,6 +28,5 @@ default class _Dummy_ {
|
||||
while (i < args.length)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+7
-7
@@ -1,17 +1,17 @@
|
||||
default class _Dummy_ {
|
||||
default class Lambda {
|
||||
default fun example(): void {
|
||||
package_local class _Dummy_ {
|
||||
package_local class Lambda {
|
||||
package_local fun example(): void {
|
||||
doJob({ arg: String ->
|
||||
arg + arg
|
||||
}, "Mary")
|
||||
}
|
||||
|
||||
default fun doJob(job: Job, arg: String): void {
|
||||
package_local fun doJob(job: Job, arg: String): void {
|
||||
System.out.println(job.doJob(arg))
|
||||
}
|
||||
|
||||
}
|
||||
default abstract static interface Job {
|
||||
public fun doJob(arg: String): String = EmptyExpression
|
||||
|
||||
package_local abstract static interface Job {
|
||||
public abstract fun doJob(arg: String): String
|
||||
}
|
||||
}
|
||||
+6
-7
@@ -1,14 +1,13 @@
|
||||
default class _Dummy_ {
|
||||
default class NestedClasses {
|
||||
package_local class _Dummy_ {
|
||||
package_local class NestedClasses {
|
||||
public static class Nested {
|
||||
default fun func1(): void {
|
||||
package_local fun func1(): void {
|
||||
}
|
||||
|
||||
}
|
||||
public class Inner {
|
||||
default fun func2(): void {
|
||||
}
|
||||
|
||||
public class Inner {
|
||||
package_local fun func2(): void {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+3
-4
@@ -1,6 +1,6 @@
|
||||
default class _Dummy_ {
|
||||
default class Simple {
|
||||
var name: String
|
||||
package_local class _Dummy_ {
|
||||
package_local class Simple {
|
||||
private var name: String
|
||||
|
||||
public fun <init>(name: String) {
|
||||
this.name = name
|
||||
@@ -13,6 +13,5 @@ default class _Dummy_ {
|
||||
public fun setName(name: String): void {
|
||||
this.name = name
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+10
-14
@@ -1,15 +1,15 @@
|
||||
default class _Dummy_ {
|
||||
default class SpecialExpressions {
|
||||
default fun test(): boolean {
|
||||
assert 5 > 3 : EmptyExpression
|
||||
assert 5 > 3 : "Message"
|
||||
synchronized this : {
|
||||
package_local class _Dummy_ {
|
||||
package_local class SpecialExpressions {
|
||||
package_local fun test(): boolean {
|
||||
<assert>(5 > 3)
|
||||
<assert>(5 > 3, "Message")
|
||||
{
|
||||
System.out.println("A")
|
||||
}
|
||||
|
||||
var a: int = 5
|
||||
var b: int = 7
|
||||
var c: int
|
||||
local var a: int = 5
|
||||
local var b: int = 7
|
||||
local var c: int
|
||||
while (a > 0) {
|
||||
if (a === 3) {
|
||||
break
|
||||
@@ -24,7 +24,7 @@ default class _Dummy_ {
|
||||
|
||||
this.test()
|
||||
super.hashCode()
|
||||
var x: String
|
||||
local var x: String
|
||||
switch (a)
|
||||
{
|
||||
1 ->
|
||||
@@ -49,20 +49,16 @@ default class _Dummy_ {
|
||||
try {
|
||||
Thread.sleep(1000)
|
||||
}
|
||||
|
||||
catch (e) {
|
||||
}
|
||||
|
||||
finally {
|
||||
a = 3
|
||||
}
|
||||
|
||||
{
|
||||
a = 5
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -117,7 +117,7 @@ internal object KotlinConverter : UastConverter {
|
||||
|
||||
is KtStringTemplateExpression -> {
|
||||
if (expression.entries.isEmpty())
|
||||
KotlinStringULiteralExpression(expression, parent)
|
||||
KotlinStringULiteralExpression(expression, parent, "")
|
||||
else if (expression.entries.size == 1)
|
||||
convert(expression.entries[0], parent)
|
||||
else
|
||||
|
||||
-2
@@ -39,8 +39,6 @@ class KotlinStringULiteralExpression(
|
||||
override val parent: UElement,
|
||||
val text: String? = null
|
||||
) : KotlinAbstractUElement(), ULiteralExpression, PsiElementBacked, KotlinUElementWithType{
|
||||
override val isNull = false
|
||||
|
||||
override val value: String
|
||||
get() = text ?: StringUtil.unescapeStringCharacters(psi.text)
|
||||
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ class PropertyAsCallAndroidUastVisitorExtension : UastVisitorExtension {
|
||||
else
|
||||
null
|
||||
|
||||
val callExpression: UCallExpression = object : UCallExpression, PsiElementBacked, SynthetizedUElement {
|
||||
val callExpression: UCallExpression = object : UCallExpression, PsiElementBacked, SynthesizedUElement {
|
||||
override val parent = element.parent
|
||||
override val psi = ktElement
|
||||
|
||||
|
||||
+2
-1
@@ -49,7 +49,8 @@ internal fun KtModifierListOwner.hasModifier(modifier: UastModifier): Boolean {
|
||||
if (this is KtClassOrObject && !hasModifier(KtTokens.INNER_KEYWORD)) {
|
||||
return true
|
||||
}
|
||||
if (this is KtDeclaration && parent is KtObjectDeclaration) {
|
||||
if (this is KtDeclaration && (parent is KtObjectDeclaration ||
|
||||
parent is KtClassBody && parent?.parent is KtObjectDeclaration)) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
||||
+5
-5
@@ -51,17 +51,17 @@ abstract class AbstractKotlinUastStructureTest : KotlinLightCodeInsightFixtureTe
|
||||
private fun genTree(node: UElement): String {
|
||||
val builder = StringBuilder()
|
||||
val visitor = object : AbstractUastVisitor() {
|
||||
private tailrec fun getParentCount(node: UElement): Int {
|
||||
val parent = node.parent ?: return 0
|
||||
return getParentCount(parent)
|
||||
private tailrec fun height(node: UElement, current: Int): Int {
|
||||
val parent = node.parent ?: return current
|
||||
return height(parent, current + 1)
|
||||
}
|
||||
|
||||
override fun visitElement(node: UElement): Boolean {
|
||||
builder.appendln(" ".repeat(getParentCount(node)) + node.javaClass.name)
|
||||
builder.appendln(" ".repeat(height(node, 0)) + node.javaClass.simpleName)
|
||||
return super.visitElement(node)
|
||||
}
|
||||
}
|
||||
visitor.visitElement(node)
|
||||
node.accept(visitor)
|
||||
return builder.toString()
|
||||
}
|
||||
|
||||
|
||||
+111
-98
@@ -4,104 +4,117 @@ class ControlStructures {
|
||||
fun nullFun(): String? = null
|
||||
|
||||
fun test(): Boolean {
|
||||
""
|
||||
// " "
|
||||
// "Z Z"
|
||||
//
|
||||
// val qwe = 2
|
||||
// " $qwe "
|
||||
// "5\n 2"
|
||||
// "\t\t\t"
|
||||
" "
|
||||
"Z"
|
||||
"Z Z"
|
||||
|
||||
// if (5 > 3) {
|
||||
// println("5 > 3")
|
||||
// }
|
||||
//
|
||||
// for (c in "ABC") {
|
||||
// println(c)
|
||||
// }
|
||||
//
|
||||
// for (c: Char in "DEF") {
|
||||
// println(c.toByte())
|
||||
// }
|
||||
//
|
||||
// var i = 5
|
||||
// while (i > 0) {
|
||||
// i--
|
||||
// if (i == 3) break
|
||||
// if (i == 2) {
|
||||
// continue
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// "" is String
|
||||
// ("" as Any) as String?
|
||||
//
|
||||
// super.equals(this)
|
||||
// this.equals(this)
|
||||
//
|
||||
// this@ControlStructures.equals(this)
|
||||
//
|
||||
// ControlStructures::test
|
||||
// ControlStructures::prop
|
||||
// ControlStructures::class.java
|
||||
//
|
||||
// outer@ for (outerVal in 1..2) {
|
||||
// inner@ for (innerVal in 3..4) {
|
||||
// continue@outer
|
||||
// }
|
||||
// break@outer
|
||||
// }
|
||||
//
|
||||
// nullFun()?.let { println(it) }
|
||||
//
|
||||
// i = 5
|
||||
// do {
|
||||
// i -= 1
|
||||
// } while (i > 0)
|
||||
//
|
||||
// "ABC".forEach { println(it.toString()[0]) }
|
||||
//
|
||||
// "ABC".zip("DEF").forEach { println(it.first + " " + it.second) }
|
||||
//
|
||||
// val arr = arrayOf("A", "B", "C")
|
||||
// println(arr[2])
|
||||
//
|
||||
// val (a, b) = "ABC".zip("DEF")
|
||||
//
|
||||
// val value = if (5 > 3) "a" else "b"
|
||||
// val list = listOf("A")
|
||||
// val list2 = listOf("A")
|
||||
//
|
||||
// val type = when (value) {
|
||||
// in list -> "inlist"
|
||||
// !in list2 -> "notinlist2"
|
||||
// is String -> "string"
|
||||
// is CharSequence -> "cs"
|
||||
// else -> "unknown"
|
||||
// }
|
||||
//
|
||||
// val x = when {
|
||||
// value == "b" -> "B"
|
||||
// 5 % 2 == 0 -> {
|
||||
// println("A")
|
||||
// "Q"
|
||||
// }
|
||||
// false -> "!"
|
||||
// else -> "A"
|
||||
// }
|
||||
//
|
||||
// try {
|
||||
// 5 + 1
|
||||
// throw Exception()
|
||||
// } catch (e: Exception) {
|
||||
// e.printStackTrace()
|
||||
// } catch (thr: Throwable) {
|
||||
// System.out.println("error!")
|
||||
// } finally {
|
||||
// System.out.println("finally")
|
||||
// }
|
||||
//
|
||||
// return false
|
||||
'c'
|
||||
5
|
||||
5.0
|
||||
5.0f
|
||||
-5
|
||||
+5
|
||||
0.0
|
||||
-0.0
|
||||
1E10
|
||||
1E-10
|
||||
|
||||
val qwe = 2
|
||||
" $qwe "
|
||||
"a\"b"
|
||||
"a'b\r\n"
|
||||
"5\n 2"
|
||||
"\t\t\t"
|
||||
|
||||
if (5 > 3) {
|
||||
println("5 > 3")
|
||||
}
|
||||
|
||||
for (c in "ABC") {
|
||||
println(c)
|
||||
}
|
||||
|
||||
for (c: Char in "DEF") {
|
||||
println(c.toByte())
|
||||
}
|
||||
|
||||
var i = 5
|
||||
while (i > 0) {
|
||||
i--
|
||||
if (i == 3) break
|
||||
if (i == 2) {
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
"" is String
|
||||
("" as Any) as String?
|
||||
|
||||
super.equals(this)
|
||||
this.equals(this)
|
||||
|
||||
this@ControlStructures.equals(this)
|
||||
|
||||
ControlStructures::test
|
||||
ControlStructures::prop
|
||||
ControlStructures::class.java
|
||||
|
||||
outer@ for (outerVal in 1..2) {
|
||||
inner@ for (innerVal in 3..4) {
|
||||
continue@outer
|
||||
}
|
||||
break@outer
|
||||
}
|
||||
|
||||
nullFun()?.let { println(it) }
|
||||
|
||||
i = 5
|
||||
do {
|
||||
i -= 1
|
||||
} while (i > 0)
|
||||
|
||||
"ABC".forEach { println(it.toString()[0]) }
|
||||
|
||||
"ABC".zip("DEF").forEach { println(it.first + " " + it.second) }
|
||||
|
||||
val arr = arrayOf("A", "B", "C")
|
||||
println(arr[2])
|
||||
|
||||
val (a, b) = "ABC".zip("DEF")
|
||||
|
||||
val value = if (5 > 3) "a" else "b"
|
||||
val list = listOf("A")
|
||||
val list2 = listOf("A")
|
||||
|
||||
val type = when (value) {
|
||||
in list -> "inlist"
|
||||
!in list2 -> "notinlist2"
|
||||
is String -> "string"
|
||||
is CharSequence -> "cs"
|
||||
else -> "unknown"
|
||||
}
|
||||
|
||||
val x = when {
|
||||
value == "b" -> "B"
|
||||
5 % 2 == 0 -> {
|
||||
println("A")
|
||||
"Q"
|
||||
}
|
||||
false -> "!"
|
||||
else -> "A"
|
||||
}
|
||||
|
||||
try {
|
||||
5 + 1
|
||||
throw Exception()
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
} catch (thr: Throwable) {
|
||||
System.out.println("error!")
|
||||
} finally {
|
||||
System.out.println("finally")
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
}
|
||||
+195
-34
@@ -1,9 +1,57 @@
|
||||
UFile (package = null)
|
||||
UFile (package = )
|
||||
UClass (ControlStructures, kind = class)
|
||||
UFunction (<init>, kind = CONSTRUCTOR, paramCount = 0)
|
||||
EmptyExpression
|
||||
UFunction (<init>, kind = constructor, paramCount = 0)
|
||||
<no element>
|
||||
UVariable (prop, kind = member)
|
||||
ULiteralExpression (3)
|
||||
UFunction (nullFun, kind = function, paramCount = 0)
|
||||
ULiteralExpression (null)
|
||||
UFunction (test, kind = function, paramCount = 0)
|
||||
UBlockExpression
|
||||
ULiteralExpression (" ")
|
||||
ULiteralExpression ("Z")
|
||||
ULiteralExpression ("Z Z")
|
||||
ULiteralExpression ('c')
|
||||
ULiteralExpression (5)
|
||||
ULiteralExpression (5.0)
|
||||
ULiteralExpression (5.0)
|
||||
UPrefixExpression (-)
|
||||
ULiteralExpression (5)
|
||||
UPrefixExpression (+)
|
||||
ULiteralExpression (5)
|
||||
ULiteralExpression (0.0)
|
||||
UPrefixExpression (-)
|
||||
ULiteralExpression (0.0)
|
||||
ULiteralExpression (1.0E10)
|
||||
ULiteralExpression (1.0E-10)
|
||||
UDeclarationsExpression
|
||||
UVariable (qwe, kind = local)
|
||||
ULiteralExpression (2)
|
||||
UBinaryExpression (+)
|
||||
UBinaryExpression (+)
|
||||
ULiteralExpression (" ")
|
||||
USimpleReferenceExpression (qwe)
|
||||
ULiteralExpression (" ")
|
||||
UBinaryExpression (+)
|
||||
UBinaryExpression (+)
|
||||
ULiteralExpression ("a")
|
||||
ULiteralExpression ("\"")
|
||||
ULiteralExpression ("b")
|
||||
UBinaryExpression (+)
|
||||
UBinaryExpression (+)
|
||||
ULiteralExpression ("a'b")
|
||||
ULiteralExpression ("\r")
|
||||
ULiteralExpression ("\n")
|
||||
UBinaryExpression (+)
|
||||
UBinaryExpression (+)
|
||||
ULiteralExpression ("5")
|
||||
ULiteralExpression ("\n")
|
||||
ULiteralExpression (" 2")
|
||||
UBinaryExpression (+)
|
||||
UBinaryExpression (+)
|
||||
ULiteralExpression ("\t")
|
||||
ULiteralExpression ("\t")
|
||||
ULiteralExpression ("\t")
|
||||
UIfExpression
|
||||
UBinaryExpression (>)
|
||||
ULiteralExpression (5)
|
||||
@@ -13,13 +61,17 @@ UFile (package = null)
|
||||
USimpleReferenceExpression (println)
|
||||
ULiteralExpression ("5 > 3")
|
||||
<no element>
|
||||
UForEachExpression (c)
|
||||
UForEachExpression
|
||||
UVariable (c, kind = parameter)
|
||||
<no initializer>
|
||||
ULiteralExpression ("ABC")
|
||||
UBlockExpression
|
||||
UFunctionCallExpression (UastCallKind(name='function_call'), argCount = 1)
|
||||
USimpleReferenceExpression (println)
|
||||
USimpleReferenceExpression (c)
|
||||
UForEachExpression (c)
|
||||
UForEachExpression
|
||||
UVariable (c, kind = parameter)
|
||||
<no initializer>
|
||||
ULiteralExpression ("DEF")
|
||||
UBlockExpression
|
||||
UFunctionCallExpression (UastCallKind(name='function_call'), argCount = 1)
|
||||
@@ -43,17 +95,71 @@ UFile (package = null)
|
||||
UBinaryExpression (==)
|
||||
USimpleReferenceExpression (i)
|
||||
ULiteralExpression (3)
|
||||
USpecialExpressionList (break)
|
||||
|
||||
UBreakExpression (<no label>)
|
||||
<no element>
|
||||
UIfExpression
|
||||
UBinaryExpression (==)
|
||||
USimpleReferenceExpression (i)
|
||||
ULiteralExpression (2)
|
||||
UBlockExpression
|
||||
USpecialExpressionList (continue)
|
||||
|
||||
UContinueExpression (<no label>)
|
||||
<no element>
|
||||
UBinaryExpressionWithType (null, !is)
|
||||
ULiteralExpression ("")
|
||||
UBinaryExpressionWithType (null, as)
|
||||
UParenthesizedExpression
|
||||
UBinaryExpressionWithType (null, as)
|
||||
ULiteralExpression ("")
|
||||
UQualifiedExpression
|
||||
USuperExpression
|
||||
UFunctionCallExpression (UastCallKind(name='function_call'), argCount = 1)
|
||||
USimpleReferenceExpression (equals)
|
||||
UThisExpression
|
||||
UQualifiedExpression
|
||||
UThisExpression
|
||||
UFunctionCallExpression (UastCallKind(name='function_call'), argCount = 1)
|
||||
USimpleReferenceExpression (equals)
|
||||
UThisExpression
|
||||
UQualifiedExpression
|
||||
UThisExpression
|
||||
UFunctionCallExpression (UastCallKind(name='function_call'), argCount = 1)
|
||||
USimpleReferenceExpression (equals)
|
||||
UThisExpression
|
||||
UCallableReferenceExpression
|
||||
UCallableReferenceExpression
|
||||
UQualifiedExpression
|
||||
UClassLiteralExpression
|
||||
USimpleReferenceExpression (java)
|
||||
ULabeledExpression (outer)
|
||||
UForEachExpression
|
||||
UVariable (outerVal, kind = parameter)
|
||||
<no initializer>
|
||||
UBinaryExpression (..)
|
||||
ULiteralExpression (1)
|
||||
ULiteralExpression (2)
|
||||
UBlockExpression
|
||||
ULabeledExpression (inner)
|
||||
UForEachExpression
|
||||
UVariable (innerVal, kind = parameter)
|
||||
<no initializer>
|
||||
UBinaryExpression (..)
|
||||
ULiteralExpression (3)
|
||||
ULiteralExpression (4)
|
||||
UBlockExpression
|
||||
UContinueExpression (outer)
|
||||
UBreakExpression (outer)
|
||||
UQualifiedExpression
|
||||
UFunctionCallExpression (UastCallKind(name='function_call'), argCount = 0)
|
||||
USimpleReferenceExpression (nullFun)
|
||||
|
||||
UFunctionCallExpression (UastCallKind(name='function_call'), argCount = 1)
|
||||
USimpleReferenceExpression (let)
|
||||
ULambdaExpression
|
||||
|
||||
UBlockExpression
|
||||
UFunctionCallExpression (UastCallKind(name='function_call'), argCount = 1)
|
||||
USimpleReferenceExpression (println)
|
||||
USimpleReferenceExpression (it)
|
||||
UBinaryExpression (=)
|
||||
USimpleReferenceExpression (i)
|
||||
ULiteralExpression (5)
|
||||
@@ -103,6 +209,18 @@ UFile (package = null)
|
||||
UQualifiedExpression
|
||||
USimpleReferenceExpression (it)
|
||||
USimpleReferenceExpression (second)
|
||||
UDeclarationsExpression
|
||||
UVariable (arr, kind = local)
|
||||
UFunctionCallExpression (UastCallKind(name='function_call'), argCount = 3)
|
||||
USimpleReferenceExpression (arrayOf)
|
||||
ULiteralExpression ("A")
|
||||
ULiteralExpression ("B")
|
||||
ULiteralExpression ("C")
|
||||
UFunctionCallExpression (UastCallKind(name='function_call'), argCount = 1)
|
||||
USimpleReferenceExpression (println)
|
||||
UArrayAccessExpression
|
||||
USimpleReferenceExpression (arr)
|
||||
ULiteralExpression (2)
|
||||
UDeclarationsExpression
|
||||
UVariable (var1496943053, kind = local)
|
||||
UQualifiedExpression
|
||||
@@ -145,58 +263,101 @@ UFile (package = null)
|
||||
USwitchExpression
|
||||
USimpleReferenceExpression (value)
|
||||
USpecialExpressionList (when)
|
||||
KotlinUSwitchEntry
|
||||
USwitchClauseExpressionWithBody
|
||||
UBinaryExpression (in)
|
||||
USimpleReferenceExpression (it)
|
||||
USimpleReferenceExpression (list)
|
||||
USpecialExpressionList (when_entry)
|
||||
ULiteralExpression ("inlist")
|
||||
USpecialExpressionList (break)
|
||||
|
||||
KotlinUSwitchEntry
|
||||
UBreakExpression (<no label>)
|
||||
USwitchClauseExpressionWithBody
|
||||
UBinaryExpression (in)
|
||||
USimpleReferenceExpression (it)
|
||||
USimpleReferenceExpression (list2)
|
||||
USpecialExpressionList (when_entry)
|
||||
ULiteralExpression ("notinlist2")
|
||||
USpecialExpressionList (break)
|
||||
|
||||
KotlinUSwitchEntry
|
||||
UBreakExpression (<no label>)
|
||||
USwitchClauseExpressionWithBody
|
||||
UBinaryExpressionWithType (null, is)
|
||||
USimpleReferenceExpression (it)
|
||||
USpecialExpressionList (when_entry)
|
||||
ULiteralExpression ("string")
|
||||
USpecialExpressionList (break)
|
||||
|
||||
KotlinUSwitchEntry
|
||||
UBreakExpression (<no label>)
|
||||
USwitchClauseExpressionWithBody
|
||||
UBinaryExpressionWithType (null, is)
|
||||
USimpleReferenceExpression (it)
|
||||
USpecialExpressionList (when_entry)
|
||||
ULiteralExpression ("cs")
|
||||
USpecialExpressionList (break)
|
||||
UBreakExpression (<no label>)
|
||||
USwitchClauseExpressionWithBody
|
||||
|
||||
KotlinUSwitchEntry
|
||||
USpecialExpressionList (when_entry)
|
||||
ULiteralExpression ("unknown")
|
||||
USpecialExpressionList (break)
|
||||
|
||||
UBreakExpression (<no label>)
|
||||
UDeclarationsExpression
|
||||
UVariable (x, kind = local)
|
||||
USwitchExpression
|
||||
<no element>
|
||||
USpecialExpressionList (when)
|
||||
KotlinUSwitchEntry
|
||||
USwitchClauseExpressionWithBody
|
||||
UBinaryExpression (==)
|
||||
USimpleReferenceExpression (value)
|
||||
ULiteralExpression ("b")
|
||||
USpecialExpressionList (when_entry)
|
||||
ULiteralExpression ("B")
|
||||
USpecialExpressionList (break)
|
||||
|
||||
KotlinUSwitchEntry
|
||||
UBreakExpression (<no label>)
|
||||
USwitchClauseExpressionWithBody
|
||||
UBinaryExpression (==)
|
||||
UBinaryExpression (%)
|
||||
ULiteralExpression (5)
|
||||
ULiteralExpression (2)
|
||||
ULiteralExpression (0)
|
||||
USpecialExpressionList (when_entry)
|
||||
UFunctionCallExpression (UastCallKind(name='function_call'), argCount = 1)
|
||||
USimpleReferenceExpression (println)
|
||||
ULiteralExpression ("A")
|
||||
ULiteralExpression ("Q")
|
||||
USpecialExpressionList (break)
|
||||
|
||||
KotlinUSwitchEntry
|
||||
UBreakExpression (<no label>)
|
||||
USwitchClauseExpressionWithBody
|
||||
ULiteralExpression (false)
|
||||
USpecialExpressionList (when_entry)
|
||||
ULiteralExpression ("!")
|
||||
USpecialExpressionList (break)
|
||||
UBreakExpression (<no label>)
|
||||
USwitchClauseExpressionWithBody
|
||||
|
||||
KotlinUSwitchEntry
|
||||
USpecialExpressionList (when_entry)
|
||||
ULiteralExpression ("A")
|
||||
USpecialExpressionList (break)
|
||||
UBreakExpression (<no label>)
|
||||
UTryExpression
|
||||
UBlockExpression
|
||||
UBinaryExpression (+)
|
||||
ULiteralExpression (5)
|
||||
ULiteralExpression (1)
|
||||
UThrowExpression
|
||||
UFunctionCallExpression (UastCallKind(name='constructor_call'), argCount = 0)
|
||||
USimpleReferenceExpression (Exception)
|
||||
UCatchClause
|
||||
UBlockExpression
|
||||
UQualifiedExpression
|
||||
USimpleReferenceExpression (e)
|
||||
UFunctionCallExpression (UastCallKind(name='function_call'), argCount = 0)
|
||||
USimpleReferenceExpression (printStackTrace)
|
||||
|
||||
USpecialExpressionList (return)
|
||||
UCatchClause
|
||||
UBlockExpression
|
||||
UQualifiedExpression
|
||||
UQualifiedExpression
|
||||
USimpleReferenceExpression (System)
|
||||
USimpleReferenceExpression (out)
|
||||
UFunctionCallExpression (UastCallKind(name='function_call'), argCount = 1)
|
||||
USimpleReferenceExpression (println)
|
||||
ULiteralExpression ("error!") UBlockExpression
|
||||
UQualifiedExpression
|
||||
UQualifiedExpression
|
||||
USimpleReferenceExpression (System)
|
||||
USimpleReferenceExpression (out)
|
||||
UFunctionCallExpression (UastCallKind(name='function_call'), argCount = 1)
|
||||
USimpleReferenceExpression (println)
|
||||
ULiteralExpression ("finally")
|
||||
UReturnExpression
|
||||
ULiteralExpression (false)
|
||||
+5
-5
@@ -1,7 +1,7 @@
|
||||
UFile (package = )
|
||||
UClass (Declarations, kind = class)
|
||||
UFunction (<init>, kind = constructor, paramCount = 0)
|
||||
EmptyExpression
|
||||
<no element>
|
||||
UVariable (a, kind = member)
|
||||
ULiteralExpression ("a")
|
||||
UVariable (b, kind = member)
|
||||
@@ -10,22 +10,22 @@ UFile (package = )
|
||||
EmptyExpression
|
||||
UClass (NestedClass, kind = class)
|
||||
UFunction (<init>, kind = constructor, paramCount = 0)
|
||||
EmptyExpression
|
||||
<no element>
|
||||
UVariable (b, kind = member)
|
||||
ULiteralExpression ("b")
|
||||
UClass (InnerClass, kind = class)
|
||||
UFunction (<init>, kind = constructor, paramCount = 0)
|
||||
EmptyExpression
|
||||
<no element>
|
||||
UVariable (c, kind = member)
|
||||
USimpleReferenceExpression (a)
|
||||
UClass (Companion, kind = companion object)
|
||||
UFunction (<init>, kind = constructor, paramCount = 0)
|
||||
EmptyExpression
|
||||
<no element>
|
||||
UVariable (CONST_VAL, kind = member)
|
||||
ULiteralExpression (1)
|
||||
UClass (A, kind = companion object)
|
||||
UFunction (<init>, kind = constructor, paramCount = 0)
|
||||
EmptyExpression
|
||||
<no element>
|
||||
UFunction (b, kind = function, paramCount = 0)
|
||||
ULiteralExpression (true)
|
||||
UFunction (func, kind = function, paramCount = 2)
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
UFile (package = )
|
||||
UClass (Simple, kind = class)
|
||||
UFunction (<init>, kind = constructor, paramCount = 0)
|
||||
EmptyExpression
|
||||
<no element>
|
||||
UVariable (a, kind = member)
|
||||
UBinaryExpression (+)
|
||||
UBinaryExpression (+)
|
||||
@@ -21,5 +21,5 @@ UFile (package = )
|
||||
UFunctionCallExpression (UastCallKind(name='function_call'), argCount = 1)
|
||||
USimpleReferenceExpression (println)
|
||||
UBinaryExpression (/)
|
||||
ULiteralExpression (5.0f)
|
||||
ULiteralExpression (5.0)
|
||||
ULiteralExpression (2)
|
||||
+80
-15
@@ -1,6 +1,31 @@
|
||||
public static class ControlStructures {
|
||||
public fun <init>() = EmptyExpression
|
||||
public fun <init>()
|
||||
|
||||
public immutable var prop: Int = 3
|
||||
|
||||
public fun nullFun(): String? = null
|
||||
|
||||
public fun test(): Boolean {
|
||||
" "
|
||||
"Z"
|
||||
"Z Z"
|
||||
'c'
|
||||
5
|
||||
5.0
|
||||
5.0
|
||||
-5
|
||||
+5
|
||||
0.0
|
||||
-0.0
|
||||
1.0E10
|
||||
1.0E-10
|
||||
public immutable var qwe: Int = 2
|
||||
|
||||
" " + qwe + " "
|
||||
"a" + "\"" + "b"
|
||||
"a'b" + "\r" + "\n"
|
||||
"5" + "\n" + " 2"
|
||||
"\t" + "\t" + "\t"
|
||||
if (5 > 3) {
|
||||
println("5 > 3")
|
||||
}
|
||||
@@ -13,7 +38,8 @@ public static class ControlStructures {
|
||||
println(c.toByte())
|
||||
}
|
||||
|
||||
var i: Int = 5
|
||||
public var i: Int = 5
|
||||
|
||||
while (i > 0) {
|
||||
i--
|
||||
if (i == 3) break
|
||||
@@ -23,6 +49,25 @@ public static class ControlStructures {
|
||||
|
||||
}
|
||||
|
||||
"" !is String
|
||||
("" as Any) as String?
|
||||
super.equals(this)
|
||||
this.equals(this)
|
||||
this.equals(this)
|
||||
ControlStructures::test
|
||||
ControlStructures::prop
|
||||
ControlStructures::class.java
|
||||
outer@ for (outerVal : 1 .. 2) {
|
||||
inner@ for (innerVal : 3 .. 4) {
|
||||
continue@outer
|
||||
}
|
||||
|
||||
break@outer
|
||||
}
|
||||
|
||||
nullFun()?.let({
|
||||
println(it)
|
||||
})
|
||||
i = 5
|
||||
do {
|
||||
i -= 1
|
||||
@@ -35,13 +80,19 @@ public static class ControlStructures {
|
||||
"ABC".zip("DEF").forEach({
|
||||
println(it.first + " " + it.second)
|
||||
})
|
||||
var var1496943053: <error> = "ABC".zip("DEF")
|
||||
var a: Pair<Char, Char> = var1496943053.component1()
|
||||
var b: Pair<Char, Char> = var1496943053.component2()
|
||||
var value: String = if (5 > 3) "a" else "b"
|
||||
var list: List<String> = listOf("A")
|
||||
var list2: List<String> = listOf("A")
|
||||
var type: String = switch (value) {
|
||||
public immutable var arr: Array<String> = arrayOf("A", "B", "C")
|
||||
|
||||
println(arr[2])
|
||||
local var var1496943053: <error> = "ABC".zip("DEF")
|
||||
local immutable var a: Pair<Char, Char> = var1496943053.component1()
|
||||
local immutable var b: Pair<Char, Char> = var1496943053.component2()
|
||||
public immutable var value: String = if (5 > 3) "a" else "b"
|
||||
|
||||
public immutable var list: List<String> = listOf("A")
|
||||
|
||||
public immutable var list2: List<String> = listOf("A")
|
||||
|
||||
public immutable var type: String = switch (value) {
|
||||
it in list -> {
|
||||
"inlist"
|
||||
break
|
||||
@@ -52,24 +103,25 @@ public static class ControlStructures {
|
||||
break
|
||||
}
|
||||
|
||||
(it) is null -> {
|
||||
it is String -> {
|
||||
"string"
|
||||
break
|
||||
}
|
||||
|
||||
(it) is null -> {
|
||||
it is CharSequence -> {
|
||||
"cs"
|
||||
break
|
||||
}
|
||||
|
||||
else -> {
|
||||
-> {
|
||||
"unknown"
|
||||
break
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var x: String = switch {
|
||||
|
||||
public immutable var x: String = switch {
|
||||
value == "b" -> {
|
||||
"B"
|
||||
break
|
||||
@@ -86,14 +138,27 @@ public static class ControlStructures {
|
||||
break
|
||||
}
|
||||
|
||||
else -> {
|
||||
-> {
|
||||
"A"
|
||||
break
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
5 + 1
|
||||
throw <init>()
|
||||
}
|
||||
catch (e) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
catch (e) {
|
||||
System.out.println("error!")
|
||||
}
|
||||
finally {
|
||||
System.out.println("finally")
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
public static class Declarations {
|
||||
public fun <init>() = EmptyExpression
|
||||
public fun <init>()
|
||||
|
||||
public immutable var a: String = "a"
|
||||
|
||||
@@ -13,25 +13,25 @@ public static class Declarations {
|
||||
public immutable var c: String
|
||||
|
||||
public static class NestedClass {
|
||||
public fun <init>() = EmptyExpression
|
||||
public fun <init>()
|
||||
|
||||
public immutable var b: String = "b"
|
||||
}
|
||||
|
||||
public class InnerClass {
|
||||
public fun <init>() = EmptyExpression
|
||||
public fun <init>()
|
||||
|
||||
public immutable var c: CharSequence = a
|
||||
}
|
||||
|
||||
public static companion object Companion {
|
||||
public fun <init>() = EmptyExpression
|
||||
public fun <init>()
|
||||
|
||||
public immutable var CONST_VAL: Int = 1
|
||||
}
|
||||
|
||||
public static companion object A {
|
||||
public fun <init>() = EmptyExpression
|
||||
public fun <init>()
|
||||
|
||||
public fun b(): Boolean = true
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,11 +1,11 @@
|
||||
public static class Simple {
|
||||
public fun <init>() = EmptyExpression
|
||||
public fun <init>()
|
||||
|
||||
public immutable var a: String = "text" + "other" + "text"
|
||||
|
||||
public immutable var b: List<String> = listOf("A")
|
||||
|
||||
public fun test(): Unit {
|
||||
System.out.println(5.0f / 2)
|
||||
System.out.println(5.0 / 2)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,448 @@
|
||||
KotlinUFile
|
||||
KotlinUClass
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinDefaultPrimaryConstructorUFunction
|
||||
KotlinDumbUElement
|
||||
KotlinUVariable
|
||||
KotlinDumbUElement
|
||||
KotlinULiteralExpression
|
||||
KotlinUType
|
||||
KotlinUFunction
|
||||
KotlinDumbUElement
|
||||
KotlinULiteralExpression
|
||||
KotlinUType
|
||||
KotlinUFunction
|
||||
KotlinDumbUElement
|
||||
KotlinUBlockExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinUPrefixExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinUPrefixExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinUPrefixExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinULiteralExpression
|
||||
SimpleUDeclarationsExpression
|
||||
KotlinUVariable
|
||||
KotlinDumbUElement
|
||||
KotlinULiteralExpression
|
||||
KotlinUType
|
||||
KotlinStringTemplateUBinaryExpression
|
||||
KotlinStringTemplateUBinaryExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinStringTemplateUBinaryExpression
|
||||
KotlinStringTemplateUBinaryExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinStringTemplateUBinaryExpression
|
||||
KotlinStringTemplateUBinaryExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinStringTemplateUBinaryExpression
|
||||
KotlinStringTemplateUBinaryExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinStringTemplateUBinaryExpression
|
||||
KotlinStringTemplateUBinaryExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinUIfExpression
|
||||
KotlinUBinaryExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinUBlockExpression
|
||||
KotlinUFunctionCallExpression
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinClassViaConstructorUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinUForEachExpression
|
||||
KotlinParameterUVariable
|
||||
KotlinDumbUElement
|
||||
KotlinUType
|
||||
KotlinStringULiteralExpression
|
||||
KotlinUBlockExpression
|
||||
KotlinUFunctionCallExpression
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinClassViaConstructorUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinUForEachExpression
|
||||
KotlinParameterUVariable
|
||||
KotlinDumbUElement
|
||||
KotlinUType
|
||||
KotlinStringULiteralExpression
|
||||
KotlinUBlockExpression
|
||||
KotlinUFunctionCallExpression
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinClassViaConstructorUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinUQualifiedExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinUFunctionCallExpression
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinClassViaConstructorUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
SimpleUDeclarationsExpression
|
||||
KotlinUVariable
|
||||
KotlinDumbUElement
|
||||
KotlinULiteralExpression
|
||||
KotlinUType
|
||||
KotlinUWhileExpression
|
||||
KotlinUBinaryExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinUBlockExpression
|
||||
KotlinUPostfixExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinUIfExpression
|
||||
KotlinUBinaryExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinUBreakExpression
|
||||
KotlinUIfExpression
|
||||
KotlinUBinaryExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinUBlockExpression
|
||||
KotlinUContinueExpression
|
||||
KotlinUTypeCheckExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinUType
|
||||
KotlinUBinaryExpressionWithType
|
||||
KotlinUParenthesizedExpression
|
||||
KotlinUBinaryExpressionWithType
|
||||
KotlinStringULiteralExpression
|
||||
KotlinUType
|
||||
KotlinUType
|
||||
KotlinUQualifiedExpression
|
||||
KotlinUSuperExpression
|
||||
KotlinUFunctionCallExpression
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinClassViaConstructorUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinUThisExpression
|
||||
KotlinUQualifiedExpression
|
||||
KotlinUThisExpression
|
||||
KotlinUFunctionCallExpression
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinClassViaConstructorUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinUThisExpression
|
||||
KotlinUQualifiedExpression
|
||||
KotlinUThisExpression
|
||||
KotlinUFunctionCallExpression
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinClassViaConstructorUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinUThisExpression
|
||||
KotlinUCallableReferenceExpression
|
||||
KotlinUType
|
||||
KotlinUCallableReferenceExpression
|
||||
KotlinUType
|
||||
KotlinUQualifiedExpression
|
||||
KotlinUClassLiteralExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinULabeledExpression
|
||||
KotlinUForEachExpression
|
||||
KotlinParameterUVariable
|
||||
KotlinDumbUElement
|
||||
KotlinUType
|
||||
KotlinUBinaryExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinUBlockExpression
|
||||
KotlinULabeledExpression
|
||||
KotlinUForEachExpression
|
||||
KotlinParameterUVariable
|
||||
KotlinDumbUElement
|
||||
KotlinUType
|
||||
KotlinUBinaryExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinUBlockExpression
|
||||
KotlinUContinueExpression
|
||||
KotlinUBreakExpression
|
||||
KotlinUSafeQualifiedExpression
|
||||
KotlinUFunctionCallExpression
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinClassViaConstructorUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinUFunctionCallExpression
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinClassViaConstructorUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinULambdaExpression
|
||||
KotlinUBlockExpression
|
||||
KotlinUFunctionCallExpression
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinClassViaConstructorUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinUBinaryExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinUDoWhileExpression
|
||||
KotlinUBinaryExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinUBlockExpression
|
||||
KotlinUBinaryExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinUQualifiedExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinUFunctionCallExpression
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinClassViaConstructorUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinULambdaExpression
|
||||
KotlinUBlockExpression
|
||||
KotlinUFunctionCallExpression
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinClassViaConstructorUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinUArrayAccessExpression
|
||||
KotlinUQualifiedExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinUFunctionCallExpression
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinClassViaConstructorUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinUQualifiedExpression
|
||||
KotlinUQualifiedExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinUFunctionCallExpression
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinClassViaConstructorUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinUFunctionCallExpression
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinClassViaConstructorUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinULambdaExpression
|
||||
KotlinUBlockExpression
|
||||
KotlinUFunctionCallExpression
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinClassViaConstructorUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinUBinaryExpression
|
||||
KotlinUBinaryExpression
|
||||
KotlinUQualifiedExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinUQualifiedExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
SimpleUDeclarationsExpression
|
||||
KotlinUVariable
|
||||
KotlinDumbUElement
|
||||
KotlinUFunctionCallExpression
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinClassViaConstructorUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinUType
|
||||
KotlinUFunctionCallExpression
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinClassViaConstructorUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinUArrayAccessExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinUDeclarationsExpression
|
||||
KotlinDestructuringUVariable
|
||||
KotlinUQualifiedExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinUFunctionCallExpression
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinClassViaConstructorUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinStringULiteralExpression
|
||||
UastErrorType
|
||||
KotlinDestructuredUVariable
|
||||
KotlinDumbUElement
|
||||
KotlinUComponentQualifiedExpression
|
||||
KotlinStringUSimpleReferenceExpression
|
||||
KotlinUComponentFunctionCallExpression
|
||||
KotlinStringUSimpleReferenceExpression
|
||||
KotlinUType
|
||||
KotlinDestructuredUVariable
|
||||
KotlinDumbUElement
|
||||
KotlinUComponentQualifiedExpression
|
||||
KotlinStringUSimpleReferenceExpression
|
||||
KotlinUComponentFunctionCallExpression
|
||||
KotlinStringUSimpleReferenceExpression
|
||||
KotlinUType
|
||||
SimpleUDeclarationsExpression
|
||||
KotlinUVariable
|
||||
KotlinDumbUElement
|
||||
KotlinUIfExpression
|
||||
KotlinUBinaryExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinUType
|
||||
SimpleUDeclarationsExpression
|
||||
KotlinUVariable
|
||||
KotlinDumbUElement
|
||||
KotlinUFunctionCallExpression
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinClassViaConstructorUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinUType
|
||||
SimpleUDeclarationsExpression
|
||||
KotlinUVariable
|
||||
KotlinDumbUElement
|
||||
KotlinUFunctionCallExpression
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinClassViaConstructorUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinUType
|
||||
SimpleUDeclarationsExpression
|
||||
KotlinUVariable
|
||||
KotlinDumbUElement
|
||||
KotlinUSwitchExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
|
||||
KotlinUSwitchEntry
|
||||
KotlinCustomUBinaryExpression
|
||||
KotlinStringUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
|
||||
KotlinStringULiteralExpression
|
||||
$special$$inlined$apply$lambda$1
|
||||
KotlinUSwitchEntry
|
||||
KotlinCustomUBinaryExpression
|
||||
KotlinStringUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
|
||||
KotlinStringULiteralExpression
|
||||
$special$$inlined$apply$lambda$1
|
||||
KotlinUSwitchEntry
|
||||
KotlinCustomUBinaryExpressionWithType
|
||||
KotlinStringUSimpleReferenceExpression
|
||||
KotlinUType
|
||||
|
||||
KotlinStringULiteralExpression
|
||||
$special$$inlined$apply$lambda$1
|
||||
KotlinUSwitchEntry
|
||||
KotlinCustomUBinaryExpressionWithType
|
||||
KotlinStringUSimpleReferenceExpression
|
||||
KotlinUType
|
||||
|
||||
KotlinStringULiteralExpression
|
||||
$special$$inlined$apply$lambda$1
|
||||
KotlinUSwitchEntry
|
||||
|
||||
KotlinStringULiteralExpression
|
||||
$special$$inlined$apply$lambda$1
|
||||
KotlinUType
|
||||
SimpleUDeclarationsExpression
|
||||
KotlinUVariable
|
||||
KotlinDumbUElement
|
||||
KotlinUSwitchExpression
|
||||
|
||||
KotlinUSwitchEntry
|
||||
KotlinUBinaryExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinStringULiteralExpression
|
||||
|
||||
KotlinStringULiteralExpression
|
||||
$special$$inlined$apply$lambda$1
|
||||
KotlinUSwitchEntry
|
||||
KotlinUBinaryExpression
|
||||
KotlinUBinaryExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinULiteralExpression
|
||||
|
||||
KotlinUFunctionCallExpression
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinClassViaConstructorUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinStringULiteralExpression
|
||||
$special$$inlined$apply$lambda$1
|
||||
KotlinUSwitchEntry
|
||||
KotlinULiteralExpression
|
||||
|
||||
KotlinStringULiteralExpression
|
||||
$special$$inlined$apply$lambda$1
|
||||
KotlinUSwitchEntry
|
||||
|
||||
KotlinStringULiteralExpression
|
||||
$special$$inlined$apply$lambda$1
|
||||
KotlinUType
|
||||
KotlinUTryExpression
|
||||
KotlinUBlockExpression
|
||||
KotlinUBinaryExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinUThrowExpression
|
||||
KotlinUFunctionCallExpression
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinClassViaConstructorUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinUCatchClause
|
||||
KotlinUBlockExpression
|
||||
KotlinUQualifiedExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinUFunctionCallExpression
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinClassViaConstructorUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinParameterUVariable
|
||||
KotlinDumbUElement
|
||||
KotlinUType
|
||||
KotlinUType
|
||||
KotlinUCatchClause
|
||||
KotlinUBlockExpression
|
||||
KotlinUQualifiedExpression
|
||||
KotlinUQualifiedExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinUFunctionCallExpression
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinClassViaConstructorUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinParameterUVariable
|
||||
KotlinDumbUElement
|
||||
KotlinUType
|
||||
KotlinUType
|
||||
KotlinUBlockExpression
|
||||
KotlinUQualifiedExpression
|
||||
KotlinUQualifiedExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinUFunctionCallExpression
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinClassViaConstructorUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinUReturnExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinUType
|
||||
@@ -0,0 +1,67 @@
|
||||
KotlinUFile
|
||||
KotlinUClass
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinDefaultPrimaryConstructorUFunction
|
||||
KotlinDumbUElement
|
||||
KotlinUVariable
|
||||
KotlinDumbUElement
|
||||
KotlinStringULiteralExpression
|
||||
KotlinUType
|
||||
KotlinUVariable
|
||||
KotlinDumbUElement
|
||||
EmptyUExpression
|
||||
KotlinUType
|
||||
KotlinUVariable
|
||||
KotlinDumbUElement
|
||||
EmptyUExpression
|
||||
KotlinUType
|
||||
KotlinUClass
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinDefaultPrimaryConstructorUFunction
|
||||
KotlinDumbUElement
|
||||
KotlinUVariable
|
||||
KotlinDumbUElement
|
||||
KotlinStringULiteralExpression
|
||||
KotlinUType
|
||||
KotlinUClass
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinDefaultPrimaryConstructorUFunction
|
||||
KotlinDumbUElement
|
||||
KotlinUVariable
|
||||
KotlinDumbUElement
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinUType
|
||||
KotlinUClass
|
||||
KotlinDefaultPrimaryConstructorUFunction
|
||||
KotlinDumbUElement
|
||||
KotlinUVariable
|
||||
KotlinDumbUElement
|
||||
KotlinULiteralExpression
|
||||
KotlinUType
|
||||
KotlinUClass
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinDefaultPrimaryConstructorUFunction
|
||||
KotlinDumbUElement
|
||||
KotlinUFunction
|
||||
KotlinDumbUElement
|
||||
KotlinULiteralExpression
|
||||
KotlinUType
|
||||
KotlinUFunction
|
||||
KotlinDumbUElement
|
||||
KotlinParameterUVariable
|
||||
KotlinDumbUElement
|
||||
KotlinUType
|
||||
KotlinParameterUVariable
|
||||
KotlinDumbUElement
|
||||
KotlinUType
|
||||
KotlinUBlockExpression
|
||||
KotlinUReturnExpression
|
||||
KotlinUBinaryExpression
|
||||
KotlinUParenthesizedExpression
|
||||
KotlinUBinaryExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinUQualifiedExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinUType
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
KotlinUFile
|
||||
KotlinUClass
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinDefaultPrimaryConstructorUFunction
|
||||
KotlinDumbUElement
|
||||
KotlinUVariable
|
||||
KotlinDumbUElement
|
||||
KotlinUBinaryExpression
|
||||
KotlinUBinaryExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinUType
|
||||
KotlinUVariable
|
||||
KotlinDumbUElement
|
||||
KotlinUFunctionCallExpression
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinClassViaConstructorUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinStringULiteralExpression
|
||||
KotlinUType
|
||||
KotlinUFunction
|
||||
KotlinDumbUElement
|
||||
KotlinUBlockExpression
|
||||
KotlinUQualifiedExpression
|
||||
KotlinUQualifiedExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinUFunctionCallExpression
|
||||
KotlinNameUSimpleReferenceExpression
|
||||
KotlinClassViaConstructorUSimpleReferenceExpression
|
||||
KotlinUSimpleReferenceExpression
|
||||
KotlinUBinaryExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinULiteralExpression
|
||||
KotlinUType
|
||||
Reference in New Issue
Block a user