From bb92044a1569c6744257927ff3bd27d79ee2ae2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Thu, 9 May 2019 16:35:47 +0200 Subject: [PATCH 1/8] Add ability to test an AST dump as cheap regression test --- .../lang/java/ast/AbstractJavaTreeDumpTest.kt | 22 + .../pmd/lang/java/ast/AstTreeDumpTests.kt | 24 + .../pmd/lang/java/ast/testdata/Bug1429.java | 22 + .../pmd/lang/java/ast/testdata/Bug1429.txt | 94 +++ .../java/ast/testdata/ParserCornerCases.java | 224 +++++++ .../java/ast/testdata/ParserCornerCases.txt | 606 ++++++++++++++++++ pmd-lang-test/pom.xml | 2 +- .../pmd/lang/ast/test/AstMatcherDslAdapter.kt | 7 +- .../pmd/lang/ast/test/BaseTreeDumpTest.kt | 80 +++ .../pmd/lang/ast/test/NodePrinters.kt | 83 +++ pom.xml | 3 + 11 files changed, 1165 insertions(+), 2 deletions(-) create mode 100644 pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/ast/AbstractJavaTreeDumpTest.kt create mode 100644 pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/ast/AstTreeDumpTests.kt create mode 100644 pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/Bug1429.java create mode 100644 pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/Bug1429.txt create mode 100644 pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/ParserCornerCases.java create mode 100644 pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/ParserCornerCases.txt create mode 100644 pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/BaseTreeDumpTest.kt create mode 100644 pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/NodePrinters.kt diff --git a/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/ast/AbstractJavaTreeDumpTest.kt b/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/ast/AbstractJavaTreeDumpTest.kt new file mode 100644 index 0000000000..ab7823f02d --- /dev/null +++ b/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/ast/AbstractJavaTreeDumpTest.kt @@ -0,0 +1,22 @@ +/* + * BSD-style license; for more info see http://pmd.sourceforge.net/license.html + */ + +package net.sourceforge.pmd.lang.java.ast + +import com.github.oowekyala.treeutils.printers.SimpleTreePrinter +import net.sourceforge.pmd.lang.ast.Node +import net.sourceforge.pmd.lang.ast.test.BaseTreeDumpTest +import net.sourceforge.pmd.lang.ast.test.RelevantAttributePrinter +import net.sourceforge.pmd.lang.java.JavaParsingHelper + +abstract class AbstractJavaTreeDumpTest : BaseTreeDumpTest( + printer = RelevantAttributePrinter(SimpleTreePrinter.AsciiStrings), + pathToFixtures = "testdata", + extension = ".java" +) { + override fun parseFile(fileText: String): Node = + JavaParsingHelper.WITH_PROCESSING.parse(fileText) + +} + diff --git a/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/ast/AstTreeDumpTests.kt b/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/ast/AstTreeDumpTests.kt new file mode 100644 index 0000000000..cc824437f5 --- /dev/null +++ b/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/ast/AstTreeDumpTests.kt @@ -0,0 +1,24 @@ +/* + * BSD-style license; for more info see http://pmd.sourceforge.net/license.html + */ + +package net.sourceforge.pmd.lang.java.ast + +import org.junit.Test + +/** + * Compare a dump of a file against a saved baseline. + * + * @author Clément Fournier + */ +class AstTreeDumpTests : AbstractJavaTreeDumpTest() { + + + @Test + fun testCornerCases() = doTest("ParserCornerCases") + + @Test + fun testComplicatedLambda() = doTest("Bug1429") + + +} diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/Bug1429.java b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/Bug1429.java new file mode 100644 index 0000000000..2f61b06e26 --- /dev/null +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/Bug1429.java @@ -0,0 +1,22 @@ +/* + * BSD-style license; for more info see http://pmd.sourceforge.net/license.html + */ + +public class Bug1429 { + public Set getAttributeTuples() { + return (Set) (this.attributes == null ? Collections. emptySet() : new HashSet( + CollectionUtils.collect(this.attributes.keySet(), new Transformer() { + @Override + public Object transform(final Object obj) { + final String key = (String) obj; + final String value = HGXLIFFTypeConfiguration.this.attributes.get(key); + + String result = key; + if (StringUtils.isNotEmpty(value)) { + result = result.concat(":").concat(value); + } + return result; + } + }))); + } +} diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/Bug1429.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/Bug1429.txt new file mode 100644 index 0000000000..3e88e2adaa --- /dev/null +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/Bug1429.txt @@ -0,0 +1,94 @@ ++-- CompilationUnit[@PackageName = "", @declarationsAreInDefaultPackage = true] + +-- TypeDeclaration[] + +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "Bug1429", @Default = false, @Final = false, @Image = "Bug1429", @Interface = false, @Local = false, @Modifiers = 1, @Native = false, @Nested = null, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @SimpleName = "Bug1429", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] + +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] + +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD] + +-- MethodDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "getAttributeTuples", @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "getAttributeTuples", @Modifiers = 1, @Name = "getAttributeTuples", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = true, @Transient = false, @Varargs = false, @Void = false, @Volatile = false] + +-- ResultType[@Void = false, @returnsArray = false] + | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Set", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Set", @TypeImage = "Set"] + | +-- TypeArguments[@Diamond = false] + | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] + +-- FormalParameters[@ParameterCount = 0] + +-- Block[@containsComment = false] + +-- ReturnStatement[] + +-- CastExpression[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false] + +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Set", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Set", @TypeImage = "Set"] + | +-- TypeArguments[@Diamond = false] + | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] + +-- ConditionalExpression[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 1, @Parenthesized = true] + +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] + | +-- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @FieldName = "attributes", @Image = "attributes", @ParenthesisDepth = 0, @Parenthesized = false] + | | +-- ThisExpression[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false] + | +-- NullLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = false, @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @IntLiteral = false, @LongLiteral = false, @NullLiteral = true, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = false] + +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "emptySet", @MethodName = "emptySet", @ParenthesisDepth = 0, @Parenthesized = false] + | +-- AmbiguousName[@ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = false, @CompileTimeConstant = false, @Expression = true, @Image = "Collections", @Name = "Collections", @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = false, @ReferenceType = true, @Segments = null, @TypeImage = "Collections"] + | +-- TypeArguments[@Diamond = false] + | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] + | +-- ArgumentList[@ArgumentCount = 0] + +-- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] + +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "HashSet", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "HashSet", @TypeImage = "HashSet"] + | +-- TypeArguments[@Diamond = false] + | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] + +-- ArgumentList[@ArgumentCount = 1] + +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "collect", @MethodName = "collect", @ParenthesisDepth = 0, @Parenthesized = false] + +-- AmbiguousName[@ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = false, @CompileTimeConstant = false, @Expression = true, @Image = "CollectionUtils", @Name = "CollectionUtils", @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = false, @ReferenceType = true, @Segments = null, @TypeImage = "CollectionUtils"] + +-- ArgumentList[@ArgumentCount = 2] + +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "keySet", @MethodName = "keySet", @ParenthesisDepth = 0, @Parenthesized = false] + | +-- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @FieldName = "attributes", @Image = "attributes", @ParenthesisDepth = 0, @Parenthesized = false] + | | +-- ThisExpression[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false] + | +-- ArgumentList[@ArgumentCount = 0] + +-- ConstructorCall[@AnonymousClass = true, @CompileTimeConstant = false, @DiamondTypeArgs = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] + +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Transformer", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Transformer", @TypeImage = "Transformer"] + +-- ArgumentList[@ArgumentCount = 0] + +-- AnonymousClassDeclaration[] + +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] + +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD] + +-- MethodDeclaration[@Abstract = false, @Arity = 1, @Default = false, @Final = false, @Image = "transform", @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "transform", @Modifiers = 1, @Name = "transform", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = true, @Transient = false, @Varargs = false, @Void = false, @Volatile = false] + +-- MarkerAnnotation[@AnnotationName = "Override", @Image = "Override", @SimpleName = "Override"] + +-- ResultType[@Void = false, @returnsArray = false] + | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Object", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Object", @TypeImage = "Object"] + +-- FormalParameters[@ParameterCount = 1] + | +-- FormalParameter[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = true, @Modifiers = 32, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false] + | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Object", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Object", @TypeImage = "Object"] + | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @FormalParameter = true, @Image = "obj", @LambdaParameter = false, @LocalVariable = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "obj"] + +-- Block[@containsComment = false] + +-- LocalVariableDeclaration[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = true, @Modifiers = 32, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @VariableName = "key", @Volatile = false] + | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] + | +-- VariableDeclarator[@Initializer = true, @Name = "key"] + | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @FormalParameter = false, @Image = "key", @LambdaParameter = false, @LocalVariable = true, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "key"] + | +-- CastExpression[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false] + | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] + | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "obj", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "obj"] + +-- LocalVariableDeclaration[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = true, @Modifiers = 32, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @VariableName = "value", @Volatile = false] + | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] + | +-- VariableDeclarator[@Initializer = true, @Name = "value"] + | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @FormalParameter = false, @Image = "value", @LambdaParameter = false, @LocalVariable = true, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "value"] + | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "get", @MethodName = "get", @ParenthesisDepth = 0, @Parenthesized = false] + | +-- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @FieldName = "attributes", @Image = "attributes", @ParenthesisDepth = 0, @Parenthesized = false] + | | +-- ThisExpression[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false] + | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "HGXLIFFTypeConfiguration", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "HGXLIFFTypeConfiguration", @TypeImage = "HGXLIFFTypeConfiguration"] + | +-- ArgumentList[@ArgumentCount = 1] + | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "key", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "key"] + +-- LocalVariableDeclaration[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @VariableName = "result", @Volatile = false] + | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] + | +-- VariableDeclarator[@Initializer = true, @Name = "result"] + | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = false, @Image = "result", @LambdaParameter = false, @LocalVariable = true, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "result"] + | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "key", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "key"] + +-- IfStatement[@Else = false] + | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "isNotEmpty", @MethodName = "isNotEmpty", @ParenthesisDepth = 0, @Parenthesized = false] + | | +-- AmbiguousName[@ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = false, @CompileTimeConstant = false, @Expression = true, @Image = "StringUtils", @Name = "StringUtils", @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = false, @ReferenceType = true, @Segments = null, @TypeImage = "StringUtils"] + | | +-- ArgumentList[@ArgumentCount = 1] + | | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "value", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "value"] + | +-- Block[@containsComment = false] + | +-- ExpressionStatement[] + | +-- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Expression = true, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] + | +-- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Expression = true, @Image = "result", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "result"] + | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "concat", @MethodName = "concat", @ParenthesisDepth = 0, @Parenthesized = false] + | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "concat", @MethodName = "concat", @ParenthesisDepth = 0, @Parenthesized = false] + | | +-- AmbiguousName[@ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = false, @CompileTimeConstant = false, @Expression = true, @Image = "result", @Name = "result", @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = false, @ReferenceType = true, @Segments = null, @TypeImage = "result"] + | | +-- ArgumentList[@ArgumentCount = 1] + | | +-- StringLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = true, @ConstValue = ":", @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = "":"", @IntLiteral = false, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = true, @TextBlock = false] + | +-- ArgumentList[@ArgumentCount = 1] + | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "value", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "value"] + +-- ReturnStatement[] + +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "result", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "result"] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/ParserCornerCases.java b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/ParserCornerCases.java new file mode 100644 index 0000000000..8249176a00 --- /dev/null +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/ParserCornerCases.java @@ -0,0 +1,224 @@ +/** + * BSD-style license; for more info see http://pmd.sourceforge.net/license.html + */ + +/* + * This file is to test the JavaCC java grammar, whether we can parse specific java constructs without + * throwing a syntax error. + */ + +class Superclass { + + public Superclass() { + } + + public Superclass(Class clazz) { + } + + T doStuff(T s) { + return s; + } +} + +class Outer { + Outer() { + System.out.println("Outer constructor"); + } + + class Inner { + Inner() { + System.out.println("Inner constructor"); + } + } +} +class Child extends Outer.Inner { + Child(Outer o) { + o.super(); + System.out.println("Child constructor"); + } +} + +public class ParserCornerCases extends Superclass { + + public ParserCornerCases() { + super(); + } + + public ParserCornerCases(int a) { + this(a, 2); + } + + public ParserCornerCases(int a, int b) { + super(String.class); + } + + public ParserCornerCases(String title) { + this(); + } + + public strictfp void testGeneric() { + String o = super. doStuff("foo"); + String v = this. thisGeneric("bar"); + } + + X thisGeneric(X x) { + return x; + } + + Class getByteArrayClass() { + return (byte[].class); + } + + public void bitwiseOperator() { + if ((modifiers & InputEvent.SHIFT_DOWN_MASK) != 0 ) { + buf.append("shift "); + } + } +} + +/** + * Test case from http://jira.codehaus.org/browse/MPMD-126 + */ +class PmdTestParent { + public PmdTestParent(Object obj) {} +} + +class PmdTestChild extends PmdTestParent { + + public PmdTestChild() { + // the following line produced a parsing problem + super(new Object() { + + public Object create() { + + Object memoryMonitor = null; + + if (memoryMonitor == null) { + memoryMonitor = new Object(); + } + + return memoryMonitor; + } + }); + } +} + +/* + * Test cases for bug #1020 Parsing Error + */ +class SimpleBean { + String name; +} + +class SimpleBeanUser { + SimpleBeanUser(SimpleBean o) { + + } + + SimpleBeanUser() { + this(new SimpleBean() {{ + name = "test"; + }}); + } +} + +class SimpleBeanUser2 extends SimpleBeanUser { + SimpleBeanUser2() { + super(new SimpleBean(){{ + name = "test2"; + }}); + } +} + +/* + * Test case for bug #1007 Parse Exception with annotation + */ +class TestParseAnnototation { + void parse() { + for (@SuppressWarnings("unchecked") int i = 0; i < 10; i++) { + } + for (@SuppressWarnings("unchecked") Iterator it = Fachabteilung.values().iterator(); it.hasNext();) { + } + List l = new ArrayList(); + for (@SuppressWarnings("unchecked") String s : l) { + } + } +} + +/* + * Test case for bug #956 PMD Parse Exception + */ +class FooBlock {} +class MyFoo { + MyFoo(FooBlock b) { + } +} +class Foo extends MyFoo { + public Foo() { + super(new FooBlock() { + public Object valueOf(Object object) { + String fish = "salmon"; + return fish; + } + }); + } +} + +/* + * Verifies #1122 parse error at class.super + */ +class SuperTest { + /** + * @throws UnsupportedOperationException + */ + public Iterator iterator() { + if (this.mods.contains(Modification.Iterator)) { + return new Iterator() { + Iterator wrapped = ImmutableSet.super.iterator(); + + public boolean hasNext() { + return this.wrapped.hasNext(); + } + + public E next() { + return this.wrapped.next(); + } + + public void remove() { + if (ImmutableSet.this.mods.contains(Modification.RemoveIter)) { + this.wrapped.remove(); + } + throw new UnsupportedOperationException(); + } + }; + } + throw new UnsupportedOperationException(); + } +} + +/* + * Test case for #1310 PMD cannot parse int.class + */ +class ClazzPropertyOfPrimitiveTypes { + public void test() { + Class c = int.class; + c = short.class; + c = long.class; + c = float.class; + c = double.class; + c = char.class; + c = byte.class; + c = void.class; + + if (c == int.class || c == short.class || c == long.class || c == double.class || c == char.class || c == byte.class || c == void.class) { + + } + + if ("a".equals((int.class).getName())) { + + } + + if ((Integer.class.equals(clazz)) || (int.class.equals(clazz))) { + } + } +} diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/ParserCornerCases.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/ParserCornerCases.txt new file mode 100644 index 0000000000..06d4ae2653 --- /dev/null +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/ParserCornerCases.txt @@ -0,0 +1,606 @@ ++-- CompilationUnit[@PackageName = "", @declarationsAreInDefaultPackage = true] + +-- TypeDeclaration[] + | +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "Superclass", @Default = false, @Final = false, @Image = "Superclass", @Interface = false, @Local = false, @Modifiers = 0, @Native = false, @Nested = null, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "Superclass", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] + | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] + | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] + | | +-- ConstructorDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "Superclass", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 1, @Name = "Superclass", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] + | | +-- FormalParameters[@ParameterCount = 0] + | | +-- Block[@containsComment = false] + | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] + | | +-- ConstructorDeclaration[@Abstract = false, @Arity = 1, @Default = false, @Final = false, @Image = "Superclass", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 1, @Name = "Superclass", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] + | | +-- TypeParameters[] + | | | +-- TypeParameter[@Image = "V", @ParameterName = "V", @TypeBound = false] + | | +-- FormalParameters[@ParameterCount = 1] + | | | +-- FormalParameter[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false] + | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Class", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Class", @TypeImage = "Class"] + | | | | +-- TypeArguments[@Diamond = false] + | | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "V", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "V", @TypeImage = "V"] + | | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "clazz", @LambdaParameter = false, @LocalVariable = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "clazz"] + | | +-- Block[@containsComment = false] + | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD] + | +-- MethodDeclaration[@Abstract = false, @Arity = 1, @Default = false, @Final = false, @Image = "doStuff", @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "doStuff", @Modifiers = 0, @Name = "doStuff", @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = false, @Transient = false, @Varargs = false, @Void = false, @Volatile = false] + | +-- TypeParameters[] + | | +-- TypeParameter[@Image = "T", @ParameterName = "T", @TypeBound = false] + | +-- ResultType[@Void = false, @returnsArray = false] + | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "T", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "T", @TypeImage = "T"] + | +-- FormalParameters[@ParameterCount = 1] + | | +-- FormalParameter[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false] + | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "T", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "T", @TypeImage = "T"] + | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "s", @LambdaParameter = false, @LocalVariable = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "s"] + | +-- Block[@containsComment = false] + | +-- ReturnStatement[] + | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "s", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "s"] + +-- TypeDeclaration[] + | +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "Outer", @Default = false, @Final = false, @Image = "Outer", @Interface = false, @Local = false, @Modifiers = 0, @Native = false, @Nested = null, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "Outer", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] + | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] + | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] + | | +-- ConstructorDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "Outer", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 0, @Name = "Outer", @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] + | | +-- FormalParameters[@ParameterCount = 0] + | | +-- Block[@containsComment = false] + | | +-- ExpressionStatement[] + | | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] + | | +-- AmbiguousName[@ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = false, @CompileTimeConstant = false, @Expression = true, @Image = "System.out", @Name = "System.out", @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = false, @ReferenceType = true, @Segments = null, @TypeImage = "System.out"] + | | +-- ArgumentList[@ArgumentCount = 1] + | | +-- StringLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = true, @ConstValue = "Outer constructor", @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = ""Outer constructor"", @IntLiteral = false, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = true, @TextBlock = false] + | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CLASS] + | +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "Outer$Inner", @Default = false, @Final = false, @Image = "Inner", @Interface = false, @Local = false, @Modifiers = 0, @Native = false, @Nested = null, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "Inner", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] + | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] + | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] + | +-- ConstructorDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "Inner", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 0, @Name = "Inner", @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] + | +-- FormalParameters[@ParameterCount = 0] + | +-- Block[@containsComment = false] + | +-- ExpressionStatement[] + | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] + | +-- AmbiguousName[@ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = false, @CompileTimeConstant = false, @Expression = true, @Image = "System.out", @Name = "System.out", @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = false, @ReferenceType = true, @Segments = null, @TypeImage = "System.out"] + | +-- ArgumentList[@ArgumentCount = 1] + | +-- StringLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = true, @ConstValue = "Inner constructor", @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = ""Inner constructor"", @IntLiteral = false, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = true, @TextBlock = false] + +-- TypeDeclaration[] + | +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "Child", @Default = false, @Final = false, @Image = "Child", @Interface = false, @Local = false, @Modifiers = 0, @Native = false, @Nested = null, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "Child", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] + | +-- ExtendsList[] + | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Inner", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = true, @ReferenceType = true, @SimpleName = "Inner", @TypeImage = "Outer.Inner"] + | | +-- AmbiguousName[@ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = false, @CompileTimeConstant = false, @Expression = true, @Image = "Outer", @Name = "Outer", @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = false, @ReferenceType = true, @Segments = null, @TypeImage = "Outer"] + | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] + | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] + | +-- ConstructorDeclaration[@Abstract = false, @Arity = 1, @Default = false, @Final = false, @Image = "Child", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 0, @Name = "Child", @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] + | +-- FormalParameters[@ParameterCount = 1] + | | +-- FormalParameter[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false] + | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Outer", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = true, @ReferenceType = true, @SimpleName = "Outer", @TypeImage = "Outer"] + | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "o", @LambdaParameter = false, @LocalVariable = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "o"] + | +-- Block[@containsComment = false] + | +-- ExplicitConstructorInvocation[@ArgumentCount = 0, @Qualified = true, @Super = true, @This = false] + | | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "o", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "o"] + | | +-- ArgumentList[@ArgumentCount = 0] + | +-- ExpressionStatement[] + | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] + | +-- AmbiguousName[@ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = false, @CompileTimeConstant = false, @Expression = true, @Image = "System.out", @Name = "System.out", @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = false, @ReferenceType = true, @Segments = null, @TypeImage = "System.out"] + | +-- ArgumentList[@ArgumentCount = 1] + | +-- StringLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = true, @ConstValue = "Child constructor", @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = ""Child constructor"", @IntLiteral = false, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = true, @TextBlock = false] + +-- TypeDeclaration[] + | +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "ParserCornerCases", @Default = false, @Final = false, @Image = "ParserCornerCases", @Interface = false, @Local = false, @Modifiers = 1, @Native = false, @Nested = null, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @SimpleName = "ParserCornerCases", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] + | +-- ExtendsList[] + | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Superclass", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = true, @ReferenceType = true, @SimpleName = "Superclass", @TypeImage = "Superclass"] + | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] + | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] + | | +-- ConstructorDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "ParserCornerCases", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 1, @Name = "ParserCornerCases", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] + | | +-- FormalParameters[@ParameterCount = 0] + | | +-- Block[@containsComment = false] + | | +-- ExplicitConstructorInvocation[@ArgumentCount = 0, @Qualified = false, @Super = true, @This = false] + | | +-- ArgumentList[@ArgumentCount = 0] + | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] + | | +-- ConstructorDeclaration[@Abstract = false, @Arity = 1, @Default = false, @Final = false, @Image = "ParserCornerCases", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 1, @Name = "ParserCornerCases", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] + | | +-- FormalParameters[@ParameterCount = 1] + | | | +-- FormalParameter[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false] + | | | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "int", @ModelConstant = PrimitiveType.INT, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "int"] + | | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "a", @LambdaParameter = false, @LocalVariable = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "a"] + | | +-- Block[@containsComment = false] + | | +-- ExplicitConstructorInvocation[@ArgumentCount = 2, @Qualified = false, @Super = false, @This = true] + | | +-- TypeArguments[@Diamond = false] + | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Integer", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Integer", @TypeImage = "Integer"] + | | +-- ArgumentList[@ArgumentCount = 2] + | | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "a", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "a"] + | | +-- NumericLiteral[@Base = 10, @BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = false, @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = true, @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = PrimitiveType.INT, @StringLiteral = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] + | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] + | | +-- ConstructorDeclaration[@Abstract = false, @Arity = 2, @Default = false, @Final = false, @Image = "ParserCornerCases", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 1, @Name = "ParserCornerCases", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] + | | +-- TypeParameters[] + | | | +-- TypeParameter[@Image = "W", @ParameterName = "W", @TypeBound = false] + | | +-- FormalParameters[@ParameterCount = 2] + | | | +-- FormalParameter[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false] + | | | | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "int", @ModelConstant = PrimitiveType.INT, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "int"] + | | | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "a", @LambdaParameter = false, @LocalVariable = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "a"] + | | | +-- FormalParameter[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false] + | | | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "int", @ModelConstant = PrimitiveType.INT, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "int"] + | | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "b", @LambdaParameter = false, @LocalVariable = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "b"] + | | +-- Block[@containsComment = false] + | | +-- ExplicitConstructorInvocation[@ArgumentCount = 1, @Qualified = false, @Super = true, @This = false] + | | +-- TypeArguments[@Diamond = false] + | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] + | | +-- ArgumentList[@ArgumentCount = 1] + | | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] + | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] + | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] + | | +-- ConstructorDeclaration[@Abstract = false, @Arity = 1, @Default = false, @Final = false, @Image = "ParserCornerCases", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 1, @Name = "ParserCornerCases", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] + | | +-- FormalParameters[@ParameterCount = 1] + | | | +-- FormalParameter[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false] + | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] + | | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "title", @LambdaParameter = false, @LocalVariable = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "title"] + | | +-- Block[@containsComment = false] + | | +-- ExplicitConstructorInvocation[@ArgumentCount = 0, @Qualified = false, @Super = false, @This = true] + | | +-- ArgumentList[@ArgumentCount = 0] + | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD] + | | +-- MethodDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "testGeneric", @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "testGeneric", @Modifiers = 4097, @Name = "testGeneric", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = true, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = true, @Transient = false, @Varargs = false, @Void = true, @Volatile = false] + | | +-- ResultType[@Void = true, @returnsArray = false] + | | +-- FormalParameters[@ParameterCount = 0] + | | +-- Block[@containsComment = false] + | | +-- LocalVariableDeclaration[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @VariableName = "o", @Volatile = false] + | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] + | | | +-- VariableDeclarator[@Initializer = true, @Name = "o"] + | | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = false, @Image = "o", @LambdaParameter = false, @LocalVariable = true, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "o"] + | | | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "doStuff", @MethodName = "doStuff", @ParenthesisDepth = 0, @Parenthesized = false] + | | | +-- SuperExpression[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false] + | | | +-- TypeArguments[@Diamond = false] + | | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] + | | | +-- ArgumentList[@ArgumentCount = 1] + | | | +-- StringLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = true, @ConstValue = "foo", @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = ""foo"", @IntLiteral = false, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = true, @TextBlock = false] + | | +-- LocalVariableDeclaration[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @VariableName = "v", @Volatile = false] + | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] + | | +-- VariableDeclarator[@Initializer = true, @Name = "v"] + | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = false, @Image = "v", @LambdaParameter = false, @LocalVariable = true, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "v"] + | | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "thisGeneric", @MethodName = "thisGeneric", @ParenthesisDepth = 0, @Parenthesized = false] + | | +-- ThisExpression[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false] + | | +-- TypeArguments[@Diamond = false] + | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] + | | +-- ArgumentList[@ArgumentCount = 1] + | | +-- StringLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = true, @ConstValue = "bar", @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = ""bar"", @IntLiteral = false, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = true, @TextBlock = false] + | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD] + | | +-- MethodDeclaration[@Abstract = false, @Arity = 1, @Default = false, @Final = false, @Image = "thisGeneric", @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "thisGeneric", @Modifiers = 0, @Name = "thisGeneric", @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = false, @Transient = false, @Varargs = false, @Void = false, @Volatile = false] + | | +-- TypeParameters[] + | | | +-- TypeParameter[@Image = "X", @ParameterName = "X", @TypeBound = false] + | | +-- ResultType[@Void = false, @returnsArray = false] + | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "X", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "X", @TypeImage = "X"] + | | +-- FormalParameters[@ParameterCount = 1] + | | | +-- FormalParameter[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false] + | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "X", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "X", @TypeImage = "X"] + | | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "x", @LambdaParameter = false, @LocalVariable = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "x"] + | | +-- Block[@containsComment = false] + | | +-- ReturnStatement[] + | | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "x", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "x"] + | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD] + | | +-- MethodDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "getByteArrayClass", @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "getByteArrayClass", @Modifiers = 0, @Name = "getByteArrayClass", @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = false, @Transient = false, @Varargs = false, @Void = false, @Volatile = false] + | | +-- ResultType[@Void = false, @returnsArray = false] + | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Class", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Class", @TypeImage = "Class"] + | | +-- FormalParameters[@ParameterCount = 0] + | | +-- Block[@containsComment = false] + | | +-- ReturnStatement[] + | | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 1, @Parenthesized = true, @Void = false] + | | +-- ArrayType[@ArrayDepth = 1, @ArrayType = true, @ClassOrInterfaceType = false, @PrimitiveType = false, @ReferenceType = true, @TypeImage = "byte"] + | | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "byte", @ModelConstant = PrimitiveType.BYTE, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "byte"] + | | +-- ArrayDimensions[@Size = 1] + | | +-- ArrayTypeDim[] + | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD] + | +-- MethodDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "bitwiseOperator", @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "bitwiseOperator", @Modifiers = 1, @Name = "bitwiseOperator", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = true, @Transient = false, @Varargs = false, @Void = true, @Volatile = false] + | +-- ResultType[@Void = true, @returnsArray = false] + | +-- FormalParameters[@ParameterCount = 0] + | +-- Block[@containsComment = false] + | +-- IfStatement[@Else = false] + | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.NE, @ParenthesisDepth = 0, @Parenthesized = false] + | | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.AND, @ParenthesisDepth = 1, @Parenthesized = true] + | | | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "modifiers", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "modifiers"] + | | | +-- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @FieldName = "SHIFT_DOWN_MASK", @Image = "SHIFT_DOWN_MASK", @ParenthesisDepth = 0, @Parenthesized = false] + | | | +-- AmbiguousName[@ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = false, @CompileTimeConstant = false, @Expression = true, @Image = "InputEvent", @Name = "InputEvent", @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = false, @ReferenceType = true, @Segments = null, @TypeImage = "InputEvent"] + | | +-- NumericLiteral[@Base = 10, @BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = false, @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = true, @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = PrimitiveType.INT, @StringLiteral = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] + | +-- Block[@containsComment = false] + | +-- ExpressionStatement[] + | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "append", @MethodName = "append", @ParenthesisDepth = 0, @Parenthesized = false] + | +-- AmbiguousName[@ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = false, @CompileTimeConstant = false, @Expression = true, @Image = "buf", @Name = "buf", @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = false, @ReferenceType = true, @Segments = null, @TypeImage = "buf"] + | +-- ArgumentList[@ArgumentCount = 1] + | +-- StringLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = true, @ConstValue = "shift ", @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = ""shift "", @IntLiteral = false, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = true, @TextBlock = false] + +-- TypeDeclaration[] + | +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "PmdTestParent", @Default = false, @Final = false, @Image = "PmdTestParent", @Interface = false, @Local = false, @Modifiers = 0, @Native = false, @Nested = null, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "PmdTestParent", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] + | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] + | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] + | +-- ConstructorDeclaration[@Abstract = false, @Arity = 1, @Default = false, @Final = false, @Image = "PmdTestParent", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 1, @Name = "PmdTestParent", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] + | +-- FormalParameters[@ParameterCount = 1] + | | +-- FormalParameter[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false] + | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Object", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Object", @TypeImage = "Object"] + | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "obj", @LambdaParameter = false, @LocalVariable = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "obj"] + | +-- Block[@containsComment = false] + +-- TypeDeclaration[] + | +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "PmdTestChild", @Default = false, @Final = false, @Image = "PmdTestChild", @Interface = false, @Local = false, @Modifiers = 0, @Native = false, @Nested = null, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "PmdTestChild", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] + | +-- ExtendsList[] + | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "PmdTestParent", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = true, @ReferenceType = true, @SimpleName = "PmdTestParent", @TypeImage = "PmdTestParent"] + | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] + | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] + | +-- ConstructorDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "PmdTestChild", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 1, @Name = "PmdTestChild", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] + | +-- FormalParameters[@ParameterCount = 0] + | +-- Block[@containsComment = false] + | +-- ExplicitConstructorInvocation[@ArgumentCount = 1, @Qualified = false, @Super = true, @This = false] + | +-- ArgumentList[@ArgumentCount = 1] + | +-- ConstructorCall[@AnonymousClass = true, @CompileTimeConstant = false, @DiamondTypeArgs = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] + | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Object", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Object", @TypeImage = "Object"] + | +-- ArgumentList[@ArgumentCount = 0] + | +-- AnonymousClassDeclaration[] + | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] + | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD] + | +-- MethodDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "create", @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "create", @Modifiers = 1, @Name = "create", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = true, @Transient = false, @Varargs = false, @Void = false, @Volatile = false] + | +-- ResultType[@Void = false, @returnsArray = false] + | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Object", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Object", @TypeImage = "Object"] + | +-- FormalParameters[@ParameterCount = 0] + | +-- Block[@containsComment = false] + | +-- LocalVariableDeclaration[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @VariableName = "memoryMonitor", @Volatile = false] + | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Object", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Object", @TypeImage = "Object"] + | | +-- VariableDeclarator[@Initializer = true, @Name = "memoryMonitor"] + | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = false, @Image = "memoryMonitor", @LambdaParameter = false, @LocalVariable = true, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "memoryMonitor"] + | | +-- NullLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = false, @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @IntLiteral = false, @LongLiteral = false, @NullLiteral = true, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = false] + | +-- IfStatement[@Else = false] + | | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] + | | | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "memoryMonitor", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "memoryMonitor"] + | | | +-- NullLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = false, @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @IntLiteral = false, @LongLiteral = false, @NullLiteral = true, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = false] + | | +-- Block[@containsComment = false] + | | +-- ExpressionStatement[] + | | +-- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Expression = true, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] + | | +-- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Expression = true, @Image = "memoryMonitor", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "memoryMonitor"] + | | +-- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] + | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Object", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Object", @TypeImage = "Object"] + | | +-- ArgumentList[@ArgumentCount = 0] + | +-- ReturnStatement[] + | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "memoryMonitor", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "memoryMonitor"] + +-- TypeDeclaration[] + | +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "SimpleBean", @Default = false, @Final = false, @Image = "SimpleBean", @Interface = false, @Local = false, @Modifiers = 0, @Native = false, @Nested = null, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "SimpleBean", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] + | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] + | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.FIELD] + | +-- FieldDeclaration[@Abstract = false, @AnnotationMember = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @InterfaceMember = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyFinal = false, @SyntacticallyPublic = false, @SyntacticallyStatic = false, @Transient = false, @VariableName = "name", @Volatile = false] + | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] + | +-- VariableDeclarator[@Initializer = false, @Name = "name"] + | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = false, @FormalParameter = false, @Image = "name", @LambdaParameter = false, @LocalVariable = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "name"] + +-- TypeDeclaration[] + | +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "SimpleBeanUser", @Default = false, @Final = false, @Image = "SimpleBeanUser", @Interface = false, @Local = false, @Modifiers = 0, @Native = false, @Nested = null, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "SimpleBeanUser", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] + | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] + | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] + | | +-- ConstructorDeclaration[@Abstract = false, @Arity = 1, @Default = false, @Final = false, @Image = "SimpleBeanUser", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 0, @Name = "SimpleBeanUser", @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] + | | +-- FormalParameters[@ParameterCount = 1] + | | | +-- FormalParameter[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false] + | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "SimpleBean", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = true, @ReferenceType = true, @SimpleName = "SimpleBean", @TypeImage = "SimpleBean"] + | | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "o", @LambdaParameter = false, @LocalVariable = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "o"] + | | +-- Block[@containsComment = false] + | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] + | +-- ConstructorDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "SimpleBeanUser", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 0, @Name = "SimpleBeanUser", @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] + | +-- FormalParameters[@ParameterCount = 0] + | +-- Block[@containsComment = false] + | +-- ExplicitConstructorInvocation[@ArgumentCount = 1, @Qualified = false, @Super = false, @This = true] + | +-- ArgumentList[@ArgumentCount = 1] + | +-- ConstructorCall[@AnonymousClass = true, @CompileTimeConstant = false, @DiamondTypeArgs = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] + | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "SimpleBean", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = true, @ReferenceType = true, @SimpleName = "SimpleBean", @TypeImage = "SimpleBean"] + | +-- ArgumentList[@ArgumentCount = 0] + | +-- AnonymousClassDeclaration[] + | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] + | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.INITIALIZER] + | +-- Initializer[@Static = false] + | +-- Block[@containsComment = false] + | +-- ExpressionStatement[] + | +-- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Expression = true, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] + | +-- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Expression = true, @Image = "name", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "name"] + | +-- StringLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = true, @ConstValue = "test", @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = ""test"", @IntLiteral = false, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = true, @TextBlock = false] + +-- TypeDeclaration[] + | +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "SimpleBeanUser2", @Default = false, @Final = false, @Image = "SimpleBeanUser2", @Interface = false, @Local = false, @Modifiers = 0, @Native = false, @Nested = null, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "SimpleBeanUser2", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] + | +-- ExtendsList[] + | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "SimpleBeanUser", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = true, @ReferenceType = true, @SimpleName = "SimpleBeanUser", @TypeImage = "SimpleBeanUser"] + | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] + | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] + | +-- ConstructorDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "SimpleBeanUser2", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 0, @Name = "SimpleBeanUser2", @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] + | +-- FormalParameters[@ParameterCount = 0] + | +-- Block[@containsComment = false] + | +-- ExplicitConstructorInvocation[@ArgumentCount = 1, @Qualified = false, @Super = true, @This = false] + | +-- ArgumentList[@ArgumentCount = 1] + | +-- ConstructorCall[@AnonymousClass = true, @CompileTimeConstant = false, @DiamondTypeArgs = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] + | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "SimpleBean", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = true, @ReferenceType = true, @SimpleName = "SimpleBean", @TypeImage = "SimpleBean"] + | +-- ArgumentList[@ArgumentCount = 0] + | +-- AnonymousClassDeclaration[] + | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] + | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.INITIALIZER] + | +-- Initializer[@Static = false] + | +-- Block[@containsComment = false] + | +-- ExpressionStatement[] + | +-- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Expression = true, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] + | +-- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Expression = true, @Image = "name", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "name"] + | +-- StringLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = true, @ConstValue = "test2", @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = ""test2"", @IntLiteral = false, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = true, @TextBlock = false] + +-- TypeDeclaration[] + | +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "TestParseAnnototation", @Default = false, @Final = false, @Image = "TestParseAnnototation", @Interface = false, @Local = false, @Modifiers = 0, @Native = false, @Nested = null, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "TestParseAnnototation", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] + | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] + | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD] + | +-- MethodDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "parse", @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "parse", @Modifiers = 0, @Name = "parse", @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = false, @Transient = false, @Varargs = false, @Void = true, @Volatile = false] + | +-- ResultType[@Void = true, @returnsArray = false] + | +-- FormalParameters[@ParameterCount = 0] + | +-- Block[@containsComment = false] + | +-- ForStatement[] + | | +-- ForInit[] + | | | +-- LocalVariableDeclaration[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @VariableName = "i", @Volatile = false] + | | | +-- SingleMemberAnnotation[@AnnotationName = "SuppressWarnings", @Image = "SuppressWarnings", @SimpleName = "SuppressWarnings"] + | | | | +-- StringLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = true, @ConstValue = "unchecked", @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = ""unchecked"", @IntLiteral = false, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = true, @TextBlock = false] + | | | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "int", @ModelConstant = PrimitiveType.INT, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "int"] + | | | +-- VariableDeclarator[@Initializer = true, @Name = "i"] + | | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = false, @Image = "i", @LambdaParameter = false, @LocalVariable = true, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "i"] + | | | +-- NumericLiteral[@Base = 10, @BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = false, @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = true, @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = PrimitiveType.INT, @StringLiteral = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] + | | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.LT, @ParenthesisDepth = 0, @Parenthesized = false] + | | | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "i", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "i"] + | | | +-- NumericLiteral[@Base = 10, @BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = false, @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = "10", @IntLiteral = true, @Integral = true, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = true, @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = PrimitiveType.INT, @StringLiteral = false, @ValueAsDouble = 10.0, @ValueAsFloat = 10.0, @ValueAsInt = 10, @ValueAsLong = 10] + | | +-- ForUpdate[] + | | | +-- StatementExpressionList[] + | | | +-- UnaryExpression[@CompileTimeConstant = false, @Expression = true, @Operator = UnaryOp.POST_INCREMENT, @ParenthesisDepth = 0, @Parenthesized = false, @Prefix = false] + | | | +-- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Expression = true, @Image = "i", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "i"] + | | +-- Block[@containsComment = false] + | +-- ForStatement[] + | | +-- ForInit[] + | | | +-- LocalVariableDeclaration[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @VariableName = "it", @Volatile = false] + | | | +-- SingleMemberAnnotation[@AnnotationName = "SuppressWarnings", @Image = "SuppressWarnings", @SimpleName = "SuppressWarnings"] + | | | | +-- StringLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = true, @ConstValue = "unchecked", @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = ""unchecked"", @IntLiteral = false, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = true, @TextBlock = false] + | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Iterator", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Iterator", @TypeImage = "Iterator"] + | | | +-- VariableDeclarator[@Initializer = true, @Name = "it"] + | | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = false, @Image = "it", @LambdaParameter = false, @LocalVariable = true, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "it"] + | | | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "iterator", @MethodName = "iterator", @ParenthesisDepth = 0, @Parenthesized = false] + | | | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "values", @MethodName = "values", @ParenthesisDepth = 0, @Parenthesized = false] + | | | | +-- AmbiguousName[@ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = false, @CompileTimeConstant = false, @Expression = true, @Image = "Fachabteilung", @Name = "Fachabteilung", @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = false, @ReferenceType = true, @Segments = null, @TypeImage = "Fachabteilung"] + | | | | +-- ArgumentList[@ArgumentCount = 0] + | | | +-- ArgumentList[@ArgumentCount = 0] + | | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "hasNext", @MethodName = "hasNext", @ParenthesisDepth = 0, @Parenthesized = false] + | | | +-- AmbiguousName[@ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = false, @CompileTimeConstant = false, @Expression = true, @Image = "it", @Name = "it", @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = false, @ReferenceType = true, @Segments = null, @TypeImage = "it"] + | | | +-- ArgumentList[@ArgumentCount = 0] + | | +-- Block[@containsComment = false] + | +-- LocalVariableDeclaration[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @VariableName = "l", @Volatile = false] + | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "List", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "List", @TypeImage = "List"] + | | | +-- TypeArguments[@Diamond = false] + | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] + | | +-- VariableDeclarator[@Initializer = true, @Name = "l"] + | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = false, @Image = "l", @LambdaParameter = false, @LocalVariable = true, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "l"] + | | +-- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] + | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "ArrayList", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "ArrayList", @TypeImage = "ArrayList"] + | | | +-- TypeArguments[@Diamond = false] + | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] + | | +-- ArgumentList[@ArgumentCount = 0] + | +-- ForeachStatement[] + | +-- LocalVariableDeclaration[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @VariableName = "s", @Volatile = false] + | | +-- SingleMemberAnnotation[@AnnotationName = "SuppressWarnings", @Image = "SuppressWarnings", @SimpleName = "SuppressWarnings"] + | | | +-- StringLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = true, @ConstValue = "unchecked", @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = ""unchecked"", @IntLiteral = false, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = true, @TextBlock = false] + | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] + | | +-- VariableDeclarator[@Initializer = false, @Name = "s"] + | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = false, @Image = "s", @LambdaParameter = false, @LocalVariable = true, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "s"] + | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "l", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "l"] + | +-- Block[@containsComment = false] + +-- TypeDeclaration[] + | +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "FooBlock", @Default = false, @Final = false, @Image = "FooBlock", @Interface = false, @Local = false, @Modifiers = 0, @Native = false, @Nested = null, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "FooBlock", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] + | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] + +-- TypeDeclaration[] + | +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "MyFoo", @Default = false, @Final = false, @Image = "MyFoo", @Interface = false, @Local = false, @Modifiers = 0, @Native = false, @Nested = null, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "MyFoo", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] + | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] + | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] + | +-- ConstructorDeclaration[@Abstract = false, @Arity = 1, @Default = false, @Final = false, @Image = "MyFoo", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 0, @Name = "MyFoo", @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] + | +-- FormalParameters[@ParameterCount = 1] + | | +-- FormalParameter[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false] + | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "FooBlock", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = true, @ReferenceType = true, @SimpleName = "FooBlock", @TypeImage = "FooBlock"] + | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "b", @LambdaParameter = false, @LocalVariable = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "b"] + | +-- Block[@containsComment = false] + +-- TypeDeclaration[] + | +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "Foo", @Default = false, @Final = false, @Image = "Foo", @Interface = false, @Local = false, @Modifiers = 0, @Native = false, @Nested = null, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "Foo", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] + | +-- ExtendsList[] + | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "MyFoo", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = true, @ReferenceType = true, @SimpleName = "MyFoo", @TypeImage = "MyFoo"] + | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] + | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] + | +-- ConstructorDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "Foo", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 1, @Name = "Foo", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] + | +-- FormalParameters[@ParameterCount = 0] + | +-- Block[@containsComment = false] + | +-- ExplicitConstructorInvocation[@ArgumentCount = 1, @Qualified = false, @Super = true, @This = false] + | +-- ArgumentList[@ArgumentCount = 1] + | +-- ConstructorCall[@AnonymousClass = true, @CompileTimeConstant = false, @DiamondTypeArgs = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] + | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "FooBlock", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = true, @ReferenceType = true, @SimpleName = "FooBlock", @TypeImage = "FooBlock"] + | +-- ArgumentList[@ArgumentCount = 0] + | +-- AnonymousClassDeclaration[] + | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] + | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD] + | +-- MethodDeclaration[@Abstract = false, @Arity = 1, @Default = false, @Final = false, @Image = "valueOf", @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "valueOf", @Modifiers = 1, @Name = "valueOf", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = true, @Transient = false, @Varargs = false, @Void = false, @Volatile = false] + | +-- ResultType[@Void = false, @returnsArray = false] + | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Object", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Object", @TypeImage = "Object"] + | +-- FormalParameters[@ParameterCount = 1] + | | +-- FormalParameter[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false] + | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Object", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Object", @TypeImage = "Object"] + | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "object", @LambdaParameter = false, @LocalVariable = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "object"] + | +-- Block[@containsComment = false] + | +-- LocalVariableDeclaration[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @VariableName = "fish", @Volatile = false] + | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] + | | +-- VariableDeclarator[@Initializer = true, @Name = "fish"] + | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = false, @Image = "fish", @LambdaParameter = false, @LocalVariable = true, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "fish"] + | | +-- StringLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = true, @ConstValue = "salmon", @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = ""salmon"", @IntLiteral = false, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = true, @TextBlock = false] + | +-- ReturnStatement[] + | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "fish", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "fish"] + +-- TypeDeclaration[] + | +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "SuperTest", @Default = false, @Final = false, @Image = "SuperTest", @Interface = false, @Local = false, @Modifiers = 0, @Native = false, @Nested = null, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "SuperTest", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] + | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] + | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD] + | +-- MethodDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "iterator", @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "iterator", @Modifiers = 1, @Name = "iterator", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = true, @Transient = false, @Varargs = false, @Void = false, @Volatile = false] + | +-- ResultType[@Void = false, @returnsArray = false] + | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Iterator", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Iterator", @TypeImage = "Iterator"] + | | +-- TypeArguments[@Diamond = false] + | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "E", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "E", @TypeImage = "E"] + | +-- FormalParameters[@ParameterCount = 0] + | +-- Block[@containsComment = false] + | +-- IfStatement[@Else = false] + | | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "contains", @MethodName = "contains", @ParenthesisDepth = 0, @Parenthesized = false] + | | | +-- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @FieldName = "mods", @Image = "mods", @ParenthesisDepth = 0, @Parenthesized = false] + | | | | +-- ThisExpression[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false] + | | | +-- ArgumentList[@ArgumentCount = 1] + | | | +-- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @FieldName = "Iterator", @Image = "Iterator", @ParenthesisDepth = 0, @Parenthesized = false] + | | | +-- AmbiguousName[@ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = false, @CompileTimeConstant = false, @Expression = true, @Image = "Modification", @Name = "Modification", @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = false, @ReferenceType = true, @Segments = null, @TypeImage = "Modification"] + | | +-- Block[@containsComment = false] + | | +-- ReturnStatement[] + | | +-- ConstructorCall[@AnonymousClass = true, @CompileTimeConstant = false, @DiamondTypeArgs = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] + | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Iterator", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Iterator", @TypeImage = "Iterator"] + | | | +-- TypeArguments[@Diamond = false] + | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "E", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "E", @TypeImage = "E"] + | | +-- ArgumentList[@ArgumentCount = 0] + | | +-- AnonymousClassDeclaration[] + | | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] + | | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.FIELD] + | | | +-- FieldDeclaration[@Abstract = false, @AnnotationMember = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @InterfaceMember = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyFinal = false, @SyntacticallyPublic = false, @SyntacticallyStatic = false, @Transient = false, @VariableName = "wrapped", @Volatile = false] + | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Iterator", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Iterator", @TypeImage = "Iterator"] + | | | | +-- TypeArguments[@Diamond = false] + | | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "E", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "E", @TypeImage = "E"] + | | | +-- VariableDeclarator[@Initializer = true, @Name = "wrapped"] + | | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = false, @FormalParameter = false, @Image = "wrapped", @LambdaParameter = false, @LocalVariable = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "wrapped"] + | | | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "iterator", @MethodName = "iterator", @ParenthesisDepth = 0, @Parenthesized = false] + | | | +-- SuperExpression[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false] + | | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "ImmutableSet", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "ImmutableSet", @TypeImage = "ImmutableSet"] + | | | +-- ArgumentList[@ArgumentCount = 0] + | | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD] + | | | +-- MethodDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "hasNext", @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "hasNext", @Modifiers = 1, @Name = "hasNext", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = true, @Transient = false, @Varargs = false, @Void = false, @Volatile = false] + | | | +-- ResultType[@Void = false, @returnsArray = false] + | | | | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = true, @ClassOrInterfaceType = false, @Image = "boolean", @ModelConstant = PrimitiveType.BOOLEAN, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "boolean"] + | | | +-- FormalParameters[@ParameterCount = 0] + | | | +-- Block[@containsComment = false] + | | | +-- ReturnStatement[] + | | | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "hasNext", @MethodName = "hasNext", @ParenthesisDepth = 0, @Parenthesized = false] + | | | +-- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @FieldName = "wrapped", @Image = "wrapped", @ParenthesisDepth = 0, @Parenthesized = false] + | | | | +-- ThisExpression[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false] + | | | +-- ArgumentList[@ArgumentCount = 0] + | | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD] + | | | +-- MethodDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "next", @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "next", @Modifiers = 1, @Name = "next", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = true, @Transient = false, @Varargs = false, @Void = false, @Volatile = false] + | | | +-- ResultType[@Void = false, @returnsArray = false] + | | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "E", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "E", @TypeImage = "E"] + | | | +-- FormalParameters[@ParameterCount = 0] + | | | +-- Block[@containsComment = false] + | | | +-- ReturnStatement[] + | | | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "next", @MethodName = "next", @ParenthesisDepth = 0, @Parenthesized = false] + | | | +-- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @FieldName = "wrapped", @Image = "wrapped", @ParenthesisDepth = 0, @Parenthesized = false] + | | | | +-- ThisExpression[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false] + | | | +-- ArgumentList[@ArgumentCount = 0] + | | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD] + | | +-- MethodDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "remove", @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "remove", @Modifiers = 1, @Name = "remove", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = true, @Transient = false, @Varargs = false, @Void = true, @Volatile = false] + | | +-- ResultType[@Void = true, @returnsArray = false] + | | +-- FormalParameters[@ParameterCount = 0] + | | +-- Block[@containsComment = false] + | | +-- IfStatement[@Else = false] + | | | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "contains", @MethodName = "contains", @ParenthesisDepth = 0, @Parenthesized = false] + | | | | +-- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @FieldName = "mods", @Image = "mods", @ParenthesisDepth = 0, @Parenthesized = false] + | | | | | +-- ThisExpression[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false] + | | | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "ImmutableSet", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "ImmutableSet", @TypeImage = "ImmutableSet"] + | | | | +-- ArgumentList[@ArgumentCount = 1] + | | | | +-- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @FieldName = "RemoveIter", @Image = "RemoveIter", @ParenthesisDepth = 0, @Parenthesized = false] + | | | | +-- AmbiguousName[@ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = false, @CompileTimeConstant = false, @Expression = true, @Image = "Modification", @Name = "Modification", @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = false, @ReferenceType = true, @Segments = null, @TypeImage = "Modification"] + | | | +-- Block[@containsComment = false] + | | | +-- ExpressionStatement[] + | | | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "remove", @MethodName = "remove", @ParenthesisDepth = 0, @Parenthesized = false] + | | | +-- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @FieldName = "wrapped", @Image = "wrapped", @ParenthesisDepth = 0, @Parenthesized = false] + | | | | +-- ThisExpression[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false] + | | | +-- ArgumentList[@ArgumentCount = 0] + | | +-- ThrowStatement[@FirstClassOrInterfaceTypeImage = "UnsupportedOperationException"] + | | +-- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] + | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "UnsupportedOperationException", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "UnsupportedOperationException", @TypeImage = "UnsupportedOperationException"] + | | +-- ArgumentList[@ArgumentCount = 0] + | +-- ThrowStatement[@FirstClassOrInterfaceTypeImage = "UnsupportedOperationException"] + | +-- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] + | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "UnsupportedOperationException", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "UnsupportedOperationException", @TypeImage = "UnsupportedOperationException"] + | +-- ArgumentList[@ArgumentCount = 0] + +-- TypeDeclaration[] + +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "ClazzPropertyOfPrimitiveTypes", @Default = false, @Final = false, @Image = "ClazzPropertyOfPrimitiveTypes", @Interface = false, @Local = false, @Modifiers = 0, @Native = false, @Nested = null, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "ClazzPropertyOfPrimitiveTypes", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] + +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] + +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD] + +-- MethodDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "test", @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "test", @Modifiers = 1, @Name = "test", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = true, @Transient = false, @Varargs = false, @Void = true, @Volatile = false] + +-- ResultType[@Void = true, @returnsArray = false] + +-- FormalParameters[@ParameterCount = 0] + +-- Block[@containsComment = false] + +-- LocalVariableDeclaration[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @VariableName = "c", @Volatile = false] + | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Class", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Class", @TypeImage = "Class"] + | | +-- TypeArguments[@Diamond = false] + | | +-- WildcardType[@ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = false, @LowerBound = false, @PrimitiveType = false, @ReferenceType = true, @TypeImage = "?", @UpperBound = false] + | +-- VariableDeclarator[@Initializer = true, @Name = "c"] + | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = false, @Image = "c", @LambdaParameter = false, @LocalVariable = true, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "c"] + | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] + | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "int", @ModelConstant = PrimitiveType.INT, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "int"] + +-- ExpressionStatement[] + | +-- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Expression = true, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] + | +-- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Expression = true, @Image = "c", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "c"] + | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] + | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "short", @ModelConstant = PrimitiveType.SHORT, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "short"] + +-- ExpressionStatement[] + | +-- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Expression = true, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] + | +-- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Expression = true, @Image = "c", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "c"] + | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] + | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "long", @ModelConstant = PrimitiveType.LONG, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "long"] + +-- ExpressionStatement[] + | +-- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Expression = true, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] + | +-- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Expression = true, @Image = "c", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "c"] + | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] + | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "float", @ModelConstant = PrimitiveType.FLOAT, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "float"] + +-- ExpressionStatement[] + | +-- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Expression = true, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] + | +-- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Expression = true, @Image = "c", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "c"] + | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] + | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "double", @ModelConstant = PrimitiveType.DOUBLE, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "double"] + +-- ExpressionStatement[] + | +-- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Expression = true, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] + | +-- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Expression = true, @Image = "c", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "c"] + | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] + | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "char", @ModelConstant = PrimitiveType.CHAR, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "char"] + +-- ExpressionStatement[] + | +-- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Expression = true, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] + | +-- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Expression = true, @Image = "c", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "c"] + | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] + | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "byte", @ModelConstant = PrimitiveType.BYTE, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "byte"] + +-- ExpressionStatement[] + | +-- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Expression = true, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] + | +-- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Expression = true, @Image = "c", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "c"] + | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = true] + +-- IfStatement[@Else = false] + | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.CONDITIONAL_OR, @ParenthesisDepth = 0, @Parenthesized = false] + | | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.CONDITIONAL_OR, @ParenthesisDepth = 0, @Parenthesized = false] + | | | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.CONDITIONAL_OR, @ParenthesisDepth = 0, @Parenthesized = false] + | | | | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.CONDITIONAL_OR, @ParenthesisDepth = 0, @Parenthesized = false] + | | | | | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.CONDITIONAL_OR, @ParenthesisDepth = 0, @Parenthesized = false] + | | | | | | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.CONDITIONAL_OR, @ParenthesisDepth = 0, @Parenthesized = false] + | | | | | | | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] + | | | | | | | | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "c", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "c"] + | | | | | | | | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] + | | | | | | | | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "int", @ModelConstant = PrimitiveType.INT, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "int"] + | | | | | | | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] + | | | | | | | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "c", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "c"] + | | | | | | | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] + | | | | | | | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "short", @ModelConstant = PrimitiveType.SHORT, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "short"] + | | | | | | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] + | | | | | | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "c", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "c"] + | | | | | | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] + | | | | | | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "long", @ModelConstant = PrimitiveType.LONG, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "long"] + | | | | | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] + | | | | | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "c", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "c"] + | | | | | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] + | | | | | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "double", @ModelConstant = PrimitiveType.DOUBLE, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "double"] + | | | | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] + | | | | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "c", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "c"] + | | | | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] + | | | | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "char", @ModelConstant = PrimitiveType.CHAR, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "char"] + | | | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] + | | | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "c", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "c"] + | | | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] + | | | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "byte", @ModelConstant = PrimitiveType.BYTE, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "byte"] + | | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] + | | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "c", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "c"] + | | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = true] + | +-- Block[@containsComment = false] + +-- IfStatement[@Else = false] + | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "equals", @MethodName = "equals", @ParenthesisDepth = 0, @Parenthesized = false] + | | +-- StringLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = true, @ConstValue = "a", @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = ""a"", @IntLiteral = false, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = true, @TextBlock = false] + | | +-- ArgumentList[@ArgumentCount = 1] + | | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "getName", @MethodName = "getName", @ParenthesisDepth = 0, @Parenthesized = false] + | | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 1, @Parenthesized = true, @Void = false] + | | | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "int", @ModelConstant = PrimitiveType.INT, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "int"] + | | +-- ArgumentList[@ArgumentCount = 0] + | +-- Block[@containsComment = false] + +-- IfStatement[@Else = false] + +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.CONDITIONAL_OR, @ParenthesisDepth = 0, @Parenthesized = false] + | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "equals", @MethodName = "equals", @ParenthesisDepth = 1, @Parenthesized = true] + | | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] + | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Integer", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Integer", @TypeImage = "Integer"] + | | +-- ArgumentList[@ArgumentCount = 1] + | | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "clazz", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "clazz"] + | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "equals", @MethodName = "equals", @ParenthesisDepth = 1, @Parenthesized = true] + | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] + | | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "int", @ModelConstant = PrimitiveType.INT, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "int"] + | +-- ArgumentList[@ArgumentCount = 1] + | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "clazz", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "clazz"] + +-- Block[@containsComment = false] diff --git a/pmd-lang-test/pom.xml b/pmd-lang-test/pom.xml index 910eda2842..2de8d05bb9 100644 --- a/pmd-lang-test/pom.xml +++ b/pmd-lang-test/pom.xml @@ -132,7 +132,7 @@ com.github.oowekyala.treeutils tree-matchers - 2.0.1 + 2.1.0 compile diff --git a/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/AstMatcherDslAdapter.kt b/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/AstMatcherDslAdapter.kt index 99ed28c236..419fafabff 100644 --- a/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/AstMatcherDslAdapter.kt +++ b/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/AstMatcherDslAdapter.kt @@ -4,6 +4,7 @@ package net.sourceforge.pmd.lang.ast.test +import com.github.oowekyala.treeutils.DoublyLinkedTreeLikeAdapter import com.github.oowekyala.treeutils.TreeLikeAdapter import com.github.oowekyala.treeutils.matchers.MatchingConfig import com.github.oowekyala.treeutils.matchers.TreeNodeWrapper @@ -12,10 +13,14 @@ import com.github.oowekyala.treeutils.printers.KotlintestBeanTreePrinter import net.sourceforge.pmd.lang.ast.Node /** An adapter for [baseShouldMatchSubtree]. */ -object NodeTreeLikeAdapter : TreeLikeAdapter { +object NodeTreeLikeAdapter : DoublyLinkedTreeLikeAdapter { override fun getChildren(node: Node): List = node.findChildrenOfType(Node::class.java) override fun nodeName(type: Class): String = type.simpleName.removePrefix("AST") + + override fun getParent(node: Node): Node? = node.parent + + override fun getChild(node: Node, index: Int): Node? = node.safeGetChild(index) } /** A subtree matcher written in the DSL documented on [TreeNodeWrapper]. */ diff --git a/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/BaseTreeDumpTest.kt b/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/BaseTreeDumpTest.kt new file mode 100644 index 0000000000..6bb0b4c8e1 --- /dev/null +++ b/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/BaseTreeDumpTest.kt @@ -0,0 +1,80 @@ +/* + * BSD-style license; for more info see http://pmd.sourceforge.net/license.html + */ + +package net.sourceforge.pmd.lang.ast.test + +import com.github.oowekyala.treeutils.printers.TreePrinter +import net.sourceforge.pmd.lang.ast.Node +import java.nio.file.Path +import java.nio.file.Paths +import kotlin.test.assertEquals + + +/** + * Compare a dump of a file against a saved baseline. + * + * @param printer The node printer used to dump the trees + * @param pathToFixtures Path to the test files within the directory of the test case + * @param extension Extension that the unparsed source file is supposed to have + */ +abstract class BaseTreeDumpTest( + val printer: TreePrinter, + val pathToFixtures: String, + val extension: String +) { + + /** + * Parses the given string into a node. + */ + abstract fun parseFile(fileText: String): Node + + + /** + * Executes the test. The test files are looked up in [pathToFixtures], + * in the resource directory *of the subclass*. + * The reference test file must be named [fileBaseName] + [ExpectedExt]. + * The source file to parse must be named [fileBaseName] + [extension]. + */ + fun doTest(fileBaseName: String) { + val expectedFile = findTestFile(javaClass, "$pathToFixtures/$fileBaseName$ExpectedExt").toFile() + val sourceFile = findTestFile(javaClass, "$pathToFixtures/$fileBaseName$extension").toFile() + + assert(sourceFile.isFile) { + "Source file $sourceFile is missing" + } + + val parsed = parseFile(sourceFile.readText()) // UTF-8 + val actual = printer.dumpSubtree(parsed) + + if (!expectedFile.exists()) { + expectedFile.writeText(actual) + throw AssertionError("Reference file $expectedFile doesn't exist, created it anyway") + } + + val expected = expectedFile.readText() + + assertEquals(expected, actual, "Tree dump comparison failed, see the reference: $expectedFile") + } + + // Outputting a path makes for better error messages + private val srcTestResources = let { + // this is set from maven surefire + System.getProperty("mvn.project.src.test.resources") + ?.let { Paths.get(it).toAbsolutePath() } + // that's for when the tests are run inside the IDE + ?: Paths.get(javaClass.protectionDomain.codeSource.location.file) + // go up from target/test-classes into the project root + .resolve("../../src/test/resources").normalize() + } + + private fun findTestFile(contextClass: Class<*>, resourcePath: String): Path { + val path = contextClass.`package`.name.replace('.', '/') + return srcTestResources.resolve("$path/$resourcePath") + } + + companion object { + const val ExpectedExt = ".txt" + } + +} diff --git a/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/NodePrinters.kt b/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/NodePrinters.kt new file mode 100644 index 0000000000..adc6c2d285 --- /dev/null +++ b/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/NodePrinters.kt @@ -0,0 +1,83 @@ +/* + * BSD-style license; for more info see http://pmd.sourceforge.net/license.html + */ + +package net.sourceforge.pmd.lang.ast.test + +import com.github.oowekyala.treeutils.printers.SimpleTreePrinter +import net.sourceforge.pmd.lang.ast.Node +import net.sourceforge.pmd.lang.ast.xpath.Attribute +import org.apache.commons.lang3.StringEscapeUtils + +/** + * Prints just the structure, like so: + * + * └── LocalVariableDeclaration + * ├── Type + * │ └── PrimitiveType + * └── VariableDeclarator + * ├── VariableDeclaratorId + * └── VariableInitializer + * └── 1 child not shown + * + */ +object SimpleNodePrinter : SimpleTreePrinter(NodeTreeLikeAdapter, UnicodeStrings) + +/** + * Prints all the XPath attributes of the node. + */ +object FullAttributePrinter : BaseNodeAttributePrinter() + + +open class RelevantAttributePrinter(stringConfig: StringConfig = UnicodeStrings) : BaseNodeAttributePrinter(stringConfig) { + + private val Ignored = setOf("BeginLine", "EndLine", "BeginColumn", "EndColumn", "FindBoundary", "SingleLine") + + override fun ignoreAttribute(node: Node, attribute: Attribute): Boolean = + Ignored.contains(attribute.name) || attribute.name == "Image" && attribute.value == null + +} + +/** + * Base attribute printer, subclass to filter attributes. + */ +open class BaseNodeAttributePrinter(stringConfig: StringConfig = UnicodeStrings) : SimpleTreePrinter(NodeTreeLikeAdapter, stringConfig) { + + protected open fun ignoreAttribute(node: Node, attribute: Attribute): Boolean = true + + override fun StringBuilder.appendSingleNode(node: Node): StringBuilder { + + append(node.xPathNodeName) + + return node.xPathAttributesIterator + .asSequence() + // sort to get deterministic results + .sortedBy { it.name } + .filterNot { ignoreAttribute(node, it) } + .joinTo(buffer = this, prefix = "[", postfix = "]") { + "@${it.name} = ${valueToString(it.value)}" + } + } + + protected open fun valueToString(value: Any?): String? { + return when (value) { + is String -> "\"" + StringEscapeUtils.unescapeJava(value) + "\"" + is Char -> '\''.toString() + value.toString().replace("'".toRegex(), "\\'") + '\''.toString() + is Enum<*> -> value.enumDeclaringClass.simpleName + "." + value.name + is Class<*> -> value.canonicalName?.let { "$it.class" } + is Number, is Boolean, null -> value.toString() + else -> null + } + } + + private val Enum<*>.enumDeclaringClass: Class<*> + get() = this.javaClass.let { + when { + it.isEnum -> it + else -> it.enclosingClass.takeIf { it.isEnum } + ?: throw IllegalStateException() + } + } + +} + diff --git a/pom.xml b/pom.xml index 1dfe7db0e1..3252464717 100644 --- a/pom.xml +++ b/pom.xml @@ -256,6 +256,9 @@ once alphabetical + + ${project.basedir}/src/test/resources + From c83790fab5473eae7bc0521f41afd6524984e921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Fri, 20 Mar 2020 09:46:11 +0100 Subject: [PATCH 2/8] Recycle tree printer from the designer --- .../pmd/util/treeexport/TextTreeRenderer.java | 199 ++++++++++++++++++ .../pmd/util/treeexport/TreeRenderers.java | 5 +- .../pmd/lang/ast/test/BaseTreeDumpTest.kt | 8 +- .../pmd/lang/ast/test/NodePrinters.kt | 3 +- 4 files changed, 209 insertions(+), 6 deletions(-) create mode 100644 pmd-core/src/main/java/net/sourceforge/pmd/util/treeexport/TextTreeRenderer.java diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/util/treeexport/TextTreeRenderer.java b/pmd-core/src/main/java/net/sourceforge/pmd/util/treeexport/TextTreeRenderer.java new file mode 100644 index 0000000000..adda0d2510 --- /dev/null +++ b/pmd-core/src/main/java/net/sourceforge/pmd/util/treeexport/TextTreeRenderer.java @@ -0,0 +1,199 @@ +/* + * BSD-style license; for more info see http://pmd.sourceforge.net/license.html + */ +package net.sourceforge.pmd.util.treeexport; + +import java.io.IOException; + +import net.sourceforge.pmd.lang.ast.Node; +import net.sourceforge.pmd.properties.AbstractPropertySource; +import net.sourceforge.pmd.properties.PropertyDescriptor; +import net.sourceforge.pmd.properties.PropertyFactory; +import net.sourceforge.pmd.properties.PropertySource; + +/** + * A simple recursive printer. Output looks like so: + * + *
+ *
+ * +- LocalVariableDeclaration
+ *    +- Type
+ *    |  +- PrimitiveType
+ *    +- VariableDeclarator
+ *       +- VariableDeclaratorId
+ *       +- VariableInitializer
+ *          +- 1 child not shown
+ *
+ * 
+ * + * or + * + *
+ *
+ * └─ LocalVariableDeclaration
+ *    ├─ Type
+ *    │  └─ PrimitiveType
+ *    └─ VariableDeclarator
+ *       ├─ VariableDeclaratorId
+ *       └─ VariableInitializer
+ *          └─ 1 child not shown
+ *
+ * 
+ * + * + * By default just prints the structure, like shown above. You can + * configure it to render nodes differently by overriding {@link #appendNodeInfoLn(Appendable, Node)}. + * + */ +public class TextTreeRenderer implements TreeRenderer { + + static final TreeRendererDescriptor DESCRIPTOR = new TreeRendererDescriptor() { + + private final PropertyDescriptor onlyAscii = + PropertyFactory.booleanProperty("onlyAsciiChars") + .defaultValue(false) + .desc("Use only ASCII characters in the structure") + .build(); + + private final PropertyDescriptor maxLevel = + PropertyFactory.intProperty("maxLevel") + .defaultValue(-1) + .desc("Max level on which to recurse. Negative means unbounded") + .build(); + + @Override + public PropertySource newPropertyBundle() { + + PropertySource bundle = new AbstractPropertySource() { + @Override + protected String getPropertySourceType() { + return "tree renderer"; + } + + @Override + public String getName() { + return "text"; + } + }; + + bundle.definePropertyDescriptor(onlyAscii); + bundle.definePropertyDescriptor(maxLevel); + + return bundle; + } + + @Override + public String id() { + return "text"; + } + + @Override + public String description() { + return "Text renderer"; + } + + @Override + public TreeRenderer produceRenderer(PropertySource properties) { + return new TextTreeRenderer(properties.getProperty(onlyAscii), properties.getProperty(maxLevel)); + } + }; + + private static final Strings ASCII = new Strings( + "+- ", + "+- ", + "| ", + " " + ); + + private static final Strings UNICODE = new Strings( + "└─ ", + "├─ ", + "│ ", + " " + ); + + private final Strings str; + private final int maxLevel; + + public TextTreeRenderer(boolean onlyAscii, int maxLevel) { + this.str = onlyAscii ? ASCII : UNICODE; + this.maxLevel = maxLevel; + } + + @Override + public void renderSubtree(Node node, Appendable out) throws IOException { + printInnerNode(node, out, 0, "", true); + } + + private String childPrefix(String prefix, boolean isTail) { + return prefix + (isTail ? str.gap : str.verticalEdge); + } + + + protected final void appendIndent(Appendable out, String prefix, boolean isTail) throws IOException { + out.append(prefix).append(isTail ? str.tailFork : str.fork); + } + + /** + * Append info about the node. The indent has already been appended. + * This should end with a newline. The default just appends the name + * of the node, and no other information. + */ + protected void appendNodeInfoLn(Appendable out, Node node) throws IOException { + out.append(node.getXPathNodeName()).append("\n"); + } + + + private void printInnerNode(Node node, + Appendable out, + int level, + String prefix, + boolean isTail) throws IOException { + + appendIndent(out, prefix, isTail); + appendNodeInfoLn(out, node); + + if (level == maxLevel) { + if (node.getNumChildren() > 0) { + appendBoundaryForNodeLn(node, out, childPrefix(prefix, isTail)); + } + } else { + int n = node.getNumChildren() - 1; + String childPrefix = childPrefix(prefix, isTail); + for (int i = 0; i < node.getNumChildren(); i++) { + Node child = node.getChild(i); + printInnerNode(child, out, level + 1, childPrefix, i == n); + } + } + } + + protected void appendBoundaryForNodeLn(Node node, Appendable out, String indentStr) throws IOException { + appendIndent(out, indentStr, true); + + if (node.getNumChildren() == 1) { + out.append("1 child is not shown"); + } else { + out.append(String.valueOf(node.getNumChildren())).append(" children are not shown"); + } + + out.append('\n'); + } + + private static final class Strings { + + + private final String tailFork; + private final String fork; + private final String verticalEdge; + private final String gap; + + + private Strings(String tailFork, String fork, String verticalEdge, String gap) { + this.tailFork = tailFork; + this.fork = fork; + this.verticalEdge = verticalEdge; + this.gap = gap; + } + } + +} diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/util/treeexport/TreeRenderers.java b/pmd-core/src/main/java/net/sourceforge/pmd/util/treeexport/TreeRenderers.java index 3fc1e5ea1a..8f47c9c9e8 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/util/treeexport/TreeRenderers.java +++ b/pmd-core/src/main/java/net/sourceforge/pmd/util/treeexport/TreeRenderers.java @@ -102,7 +102,10 @@ public final class TreeRenderers { static { - REGISTRY.put(XML.id(), XML); + List builtinDescriptors = Arrays.asList(XML, TextTreeRenderer.DESCRIPTOR); + for (TreeRendererDescriptor descriptor : builtinDescriptors) { + REGISTRY.put(descriptor.id(), descriptor); + } } diff --git a/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/BaseTreeDumpTest.kt b/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/BaseTreeDumpTest.kt index 6bb0b4c8e1..10de168b3b 100644 --- a/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/BaseTreeDumpTest.kt +++ b/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/BaseTreeDumpTest.kt @@ -4,8 +4,8 @@ package net.sourceforge.pmd.lang.ast.test -import com.github.oowekyala.treeutils.printers.TreePrinter import net.sourceforge.pmd.lang.ast.Node +import net.sourceforge.pmd.util.treeexport.TreeRenderer import java.nio.file.Path import java.nio.file.Paths import kotlin.test.assertEquals @@ -19,7 +19,7 @@ import kotlin.test.assertEquals * @param extension Extension that the unparsed source file is supposed to have */ abstract class BaseTreeDumpTest( - val printer: TreePrinter, + val printer: TreeRenderer, val pathToFixtures: String, val extension: String ) { @@ -45,7 +45,7 @@ abstract class BaseTreeDumpTest( } val parsed = parseFile(sourceFile.readText()) // UTF-8 - val actual = printer.dumpSubtree(parsed) + val actual = StringBuilder().also { printer.renderSubtree(parsed, it) }.toString() if (!expectedFile.exists()) { expectedFile.writeText(actual) @@ -62,7 +62,7 @@ abstract class BaseTreeDumpTest( // this is set from maven surefire System.getProperty("mvn.project.src.test.resources") ?.let { Paths.get(it).toAbsolutePath() } - // that's for when the tests are run inside the IDE + // that's for when the tests are run inside the IDE ?: Paths.get(javaClass.protectionDomain.codeSource.location.file) // go up from target/test-classes into the project root .resolve("../../src/test/resources").normalize() diff --git a/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/NodePrinters.kt b/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/NodePrinters.kt index adc6c2d285..7189df09e2 100644 --- a/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/NodePrinters.kt +++ b/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/NodePrinters.kt @@ -41,7 +41,8 @@ open class RelevantAttributePrinter(stringConfig: StringConfig = UnicodeStrings) /** * Base attribute printer, subclass to filter attributes. */ -open class BaseNodeAttributePrinter(stringConfig: StringConfig = UnicodeStrings) : SimpleTreePrinter(NodeTreeLikeAdapter, stringConfig) { +open class BaseNodeAttributePrinter(stringConfig: StringConfig = UnicodeStrings) + : SimpleTreePrinter(NodeTreeLikeAdapter, stringConfig) { protected open fun ignoreAttribute(node: Node, attribute: Attribute): Boolean = true From 09ddc628cdc3435586294fec39ed5716be7e321f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Fri, 20 Mar 2020 10:10:42 +0100 Subject: [PATCH 3/8] Fix reference files --- .../pmd/util/treeexport/TextTreeRenderer.java | 15 +- .../lang/java/ast/AbstractJavaTreeDumpTest.kt | 9 +- .../pmd/lang/java/ast/AstTreeDumpTests.kt | 4 - .../pmd/lang/java/ast/testdata/Bug1429.txt | 294 ++++++--- .../java/ast/testdata/ParserCornerCases.java | 224 ------- .../java/ast/testdata/ParserCornerCases.txt | 606 ------------------ .../pmd/lang/ast/test/BaseTreeDumpTest.kt | 2 +- .../pmd/lang/ast/test/NodePrinters.kt | 35 +- 8 files changed, 234 insertions(+), 955 deletions(-) delete mode 100644 pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/ParserCornerCases.java delete mode 100644 pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/ParserCornerCases.txt diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/util/treeexport/TextTreeRenderer.java b/pmd-core/src/main/java/net/sourceforge/pmd/util/treeexport/TextTreeRenderer.java index adda0d2510..eae5db0420 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/util/treeexport/TextTreeRenderer.java +++ b/pmd-core/src/main/java/net/sourceforge/pmd/util/treeexport/TextTreeRenderer.java @@ -1,10 +1,12 @@ /* * BSD-style license; for more info see http://pmd.sourceforge.net/license.html */ + package net.sourceforge.pmd.util.treeexport; import java.io.IOException; +import net.sourceforge.pmd.annotation.Experimental; import net.sourceforge.pmd.lang.ast.Node; import net.sourceforge.pmd.properties.AbstractPropertySource; import net.sourceforge.pmd.properties.PropertyDescriptor; @@ -43,8 +45,8 @@ import net.sourceforge.pmd.properties.PropertySource; * * By default just prints the structure, like shown above. You can * configure it to render nodes differently by overriding {@link #appendNodeInfoLn(Appendable, Node)}. - * */ +@Experimental public class TextTreeRenderer implements TreeRenderer { static final TreeRendererDescriptor DESCRIPTOR = new TreeRendererDescriptor() { @@ -115,6 +117,17 @@ public class TextTreeRenderer implements TreeRenderer { private final Strings str; private final int maxLevel; + /** + * Creates a new text renderer. + * + * @param onlyAscii Whether to output the skeleton of the tree with + * only ascii characters. If false, uses unicode chars + * like '├' + * @param maxLevel Max level on which to recurse. Negative means + * unbounded. If the max level is reached, a placeholder + * is dumped, like "1 child is not shown". This is + * controlled by {@link #appendBoundaryForNodeLn(Node, Appendable, String)}. + */ public TextTreeRenderer(boolean onlyAscii, int maxLevel) { this.str = onlyAscii ? ASCII : UNICODE; this.maxLevel = maxLevel; diff --git a/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/ast/AbstractJavaTreeDumpTest.kt b/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/ast/AbstractJavaTreeDumpTest.kt index ab7823f02d..ad32dfa0c8 100644 --- a/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/ast/AbstractJavaTreeDumpTest.kt +++ b/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/ast/AbstractJavaTreeDumpTest.kt @@ -4,14 +4,15 @@ package net.sourceforge.pmd.lang.java.ast -import com.github.oowekyala.treeutils.printers.SimpleTreePrinter import net.sourceforge.pmd.lang.ast.Node import net.sourceforge.pmd.lang.ast.test.BaseTreeDumpTest -import net.sourceforge.pmd.lang.ast.test.RelevantAttributePrinter +import net.sourceforge.pmd.lang.ast.test.SimpleNodePrinter import net.sourceforge.pmd.lang.java.JavaParsingHelper +import net.sourceforge.pmd.util.treeexport.TreeRenderer -abstract class AbstractJavaTreeDumpTest : BaseTreeDumpTest( - printer = RelevantAttributePrinter(SimpleTreePrinter.AsciiStrings), +abstract class AbstractJavaTreeDumpTest(printer: TreeRenderer = SimpleNodePrinter) + : BaseTreeDumpTest( + printer = printer, pathToFixtures = "testdata", extension = ".java" ) { diff --git a/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/ast/AstTreeDumpTests.kt b/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/ast/AstTreeDumpTests.kt index cc824437f5..ad0d611f91 100644 --- a/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/ast/AstTreeDumpTests.kt +++ b/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/ast/AstTreeDumpTests.kt @@ -13,10 +13,6 @@ import org.junit.Test */ class AstTreeDumpTests : AbstractJavaTreeDumpTest() { - - @Test - fun testCornerCases() = doTest("ParserCornerCases") - @Test fun testComplicatedLambda() = doTest("Bug1429") diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/Bug1429.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/Bug1429.txt index 3e88e2adaa..fa19d6bb63 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/Bug1429.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/Bug1429.txt @@ -1,94 +1,200 @@ -+-- CompilationUnit[@PackageName = "", @declarationsAreInDefaultPackage = true] - +-- TypeDeclaration[] - +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "Bug1429", @Default = false, @Final = false, @Image = "Bug1429", @Interface = false, @Local = false, @Modifiers = 1, @Native = false, @Nested = null, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @SimpleName = "Bug1429", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] - +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] - +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD] - +-- MethodDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "getAttributeTuples", @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "getAttributeTuples", @Modifiers = 1, @Name = "getAttributeTuples", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = true, @Transient = false, @Varargs = false, @Void = false, @Volatile = false] - +-- ResultType[@Void = false, @returnsArray = false] - | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Set", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Set", @TypeImage = "Set"] - | +-- TypeArguments[@Diamond = false] - | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] - +-- FormalParameters[@ParameterCount = 0] - +-- Block[@containsComment = false] - +-- ReturnStatement[] - +-- CastExpression[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false] - +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Set", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Set", @TypeImage = "Set"] - | +-- TypeArguments[@Diamond = false] - | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] - +-- ConditionalExpression[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 1, @Parenthesized = true] - +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] - | +-- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @FieldName = "attributes", @Image = "attributes", @ParenthesisDepth = 0, @Parenthesized = false] - | | +-- ThisExpression[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false] - | +-- NullLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = false, @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @IntLiteral = false, @LongLiteral = false, @NullLiteral = true, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = false] - +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "emptySet", @MethodName = "emptySet", @ParenthesisDepth = 0, @Parenthesized = false] - | +-- AmbiguousName[@ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = false, @CompileTimeConstant = false, @Expression = true, @Image = "Collections", @Name = "Collections", @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = false, @ReferenceType = true, @Segments = null, @TypeImage = "Collections"] - | +-- TypeArguments[@Diamond = false] - | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] - | +-- ArgumentList[@ArgumentCount = 0] - +-- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] - +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "HashSet", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "HashSet", @TypeImage = "HashSet"] - | +-- TypeArguments[@Diamond = false] - | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] - +-- ArgumentList[@ArgumentCount = 1] - +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "collect", @MethodName = "collect", @ParenthesisDepth = 0, @Parenthesized = false] - +-- AmbiguousName[@ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = false, @CompileTimeConstant = false, @Expression = true, @Image = "CollectionUtils", @Name = "CollectionUtils", @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = false, @ReferenceType = true, @Segments = null, @TypeImage = "CollectionUtils"] - +-- ArgumentList[@ArgumentCount = 2] - +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "keySet", @MethodName = "keySet", @ParenthesisDepth = 0, @Parenthesized = false] - | +-- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @FieldName = "attributes", @Image = "attributes", @ParenthesisDepth = 0, @Parenthesized = false] - | | +-- ThisExpression[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false] - | +-- ArgumentList[@ArgumentCount = 0] - +-- ConstructorCall[@AnonymousClass = true, @CompileTimeConstant = false, @DiamondTypeArgs = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] - +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Transformer", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Transformer", @TypeImage = "Transformer"] - +-- ArgumentList[@ArgumentCount = 0] - +-- AnonymousClassDeclaration[] - +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] - +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD] - +-- MethodDeclaration[@Abstract = false, @Arity = 1, @Default = false, @Final = false, @Image = "transform", @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "transform", @Modifiers = 1, @Name = "transform", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = true, @Transient = false, @Varargs = false, @Void = false, @Volatile = false] - +-- MarkerAnnotation[@AnnotationName = "Override", @Image = "Override", @SimpleName = "Override"] - +-- ResultType[@Void = false, @returnsArray = false] - | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Object", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Object", @TypeImage = "Object"] - +-- FormalParameters[@ParameterCount = 1] - | +-- FormalParameter[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = true, @Modifiers = 32, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false] - | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Object", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Object", @TypeImage = "Object"] - | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @FormalParameter = true, @Image = "obj", @LambdaParameter = false, @LocalVariable = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "obj"] - +-- Block[@containsComment = false] - +-- LocalVariableDeclaration[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = true, @Modifiers = 32, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @VariableName = "key", @Volatile = false] - | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] - | +-- VariableDeclarator[@Initializer = true, @Name = "key"] - | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @FormalParameter = false, @Image = "key", @LambdaParameter = false, @LocalVariable = true, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "key"] - | +-- CastExpression[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false] - | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] - | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "obj", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "obj"] - +-- LocalVariableDeclaration[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = true, @Modifiers = 32, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @VariableName = "value", @Volatile = false] - | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] - | +-- VariableDeclarator[@Initializer = true, @Name = "value"] - | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = true, @FormalParameter = false, @Image = "value", @LambdaParameter = false, @LocalVariable = true, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "value"] - | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "get", @MethodName = "get", @ParenthesisDepth = 0, @Parenthesized = false] - | +-- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @FieldName = "attributes", @Image = "attributes", @ParenthesisDepth = 0, @Parenthesized = false] - | | +-- ThisExpression[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false] - | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "HGXLIFFTypeConfiguration", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "HGXLIFFTypeConfiguration", @TypeImage = "HGXLIFFTypeConfiguration"] - | +-- ArgumentList[@ArgumentCount = 1] - | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "key", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "key"] - +-- LocalVariableDeclaration[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @VariableName = "result", @Volatile = false] - | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] - | +-- VariableDeclarator[@Initializer = true, @Name = "result"] - | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = false, @Image = "result", @LambdaParameter = false, @LocalVariable = true, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "result"] - | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "key", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "key"] - +-- IfStatement[@Else = false] - | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "isNotEmpty", @MethodName = "isNotEmpty", @ParenthesisDepth = 0, @Parenthesized = false] - | | +-- AmbiguousName[@ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = false, @CompileTimeConstant = false, @Expression = true, @Image = "StringUtils", @Name = "StringUtils", @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = false, @ReferenceType = true, @Segments = null, @TypeImage = "StringUtils"] - | | +-- ArgumentList[@ArgumentCount = 1] - | | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "value", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "value"] - | +-- Block[@containsComment = false] - | +-- ExpressionStatement[] - | +-- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Expression = true, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] - | +-- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Expression = true, @Image = "result", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "result"] - | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "concat", @MethodName = "concat", @ParenthesisDepth = 0, @Parenthesized = false] - | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "concat", @MethodName = "concat", @ParenthesisDepth = 0, @Parenthesized = false] - | | +-- AmbiguousName[@ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = false, @CompileTimeConstant = false, @Expression = true, @Image = "result", @Name = "result", @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = false, @ReferenceType = true, @Segments = null, @TypeImage = "result"] - | | +-- ArgumentList[@ArgumentCount = 1] - | | +-- StringLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = true, @ConstValue = ":", @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = "":"", @IntLiteral = false, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = true, @TextBlock = false] - | +-- ArgumentList[@ArgumentCount = 1] - | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "value", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "value"] - +-- ReturnStatement[] - +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "result", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "result"] +└─ CompilationUnit + └─ TypeDeclaration + └─ ClassOrInterfaceDeclaration + └─ ClassOrInterfaceBody + └─ ClassOrInterfaceBodyDeclaration + └─ MethodDeclaration + ├─ ResultType + │ └─ Type + │ └─ ReferenceType + │ └─ ClassOrInterfaceType + │ └─ TypeArguments + │ └─ TypeArgument + │ └─ ReferenceType + │ └─ ClassOrInterfaceType + ├─ MethodDeclarator + │ └─ FormalParameters + └─ Block + └─ BlockStatement + └─ Statement + └─ ReturnStatement + └─ Expression + └─ CastExpression + ├─ Type + │ └─ ReferenceType + │ └─ ClassOrInterfaceType + │ └─ TypeArguments + │ └─ TypeArgument + │ └─ ReferenceType + │ └─ ClassOrInterfaceType + └─ PrimaryExpression + └─ PrimaryPrefix + └─ Expression + └─ ConditionalExpression + ├─ EqualityExpression + │ ├─ PrimaryExpression + │ │ ├─ PrimaryPrefix + │ │ └─ PrimarySuffix + │ └─ PrimaryExpression + │ └─ PrimaryPrefix + │ └─ Literal + │ └─ NullLiteral + ├─ Expression + │ └─ PrimaryExpression + │ ├─ PrimaryPrefix + │ │ └─ Name + │ ├─ PrimarySuffix + │ │ └─ MemberSelector + │ │ └─ TypeArguments + │ │ └─ TypeArgument + │ │ └─ ReferenceType + │ │ └─ ClassOrInterfaceType + │ └─ PrimarySuffix + │ └─ Arguments + └─ PrimaryExpression + └─ PrimaryPrefix + └─ AllocationExpression + ├─ ClassOrInterfaceType + │ └─ TypeArguments + │ └─ TypeArgument + │ └─ ReferenceType + │ └─ ClassOrInterfaceType + └─ Arguments + └─ ArgumentList + └─ Expression + └─ PrimaryExpression + ├─ PrimaryPrefix + │ └─ Name + └─ PrimarySuffix + └─ Arguments + └─ ArgumentList + ├─ Expression + │ └─ PrimaryExpression + │ ├─ PrimaryPrefix + │ ├─ PrimarySuffix + │ ├─ PrimarySuffix + │ └─ PrimarySuffix + │ └─ Arguments + └─ Expression + └─ PrimaryExpression + └─ PrimaryPrefix + └─ AllocationExpression + ├─ ClassOrInterfaceType + ├─ Arguments + └─ ClassOrInterfaceBody + └─ ClassOrInterfaceBodyDeclaration + ├─ Annotation + │ └─ MarkerAnnotation + │ └─ Name + └─ MethodDeclaration + ├─ ResultType + │ └─ Type + │ └─ ReferenceType + │ └─ ClassOrInterfaceType + ├─ MethodDeclarator + │ └─ FormalParameters + │ └─ FormalParameter + │ ├─ Type + │ │ └─ ReferenceType + │ │ └─ ClassOrInterfaceType + │ └─ VariableDeclaratorId + └─ Block + ├─ BlockStatement + │ └─ LocalVariableDeclaration + │ ├─ Type + │ │ └─ ReferenceType + │ │ └─ ClassOrInterfaceType + │ └─ VariableDeclarator + │ ├─ VariableDeclaratorId + │ └─ VariableInitializer + │ └─ Expression + │ └─ CastExpression + │ ├─ Type + │ │ └─ ReferenceType + │ │ └─ ClassOrInterfaceType + │ └─ PrimaryExpression + │ └─ PrimaryPrefix + │ └─ Name + ├─ BlockStatement + │ └─ LocalVariableDeclaration + │ ├─ Type + │ │ └─ ReferenceType + │ │ └─ ClassOrInterfaceType + │ └─ VariableDeclarator + │ ├─ VariableDeclaratorId + │ └─ VariableInitializer + │ └─ Expression + │ └─ PrimaryExpression + │ ├─ PrimaryPrefix + │ │ └─ Name + │ ├─ PrimarySuffix + │ ├─ PrimarySuffix + │ ├─ PrimarySuffix + │ └─ PrimarySuffix + │ └─ Arguments + │ └─ ArgumentList + │ └─ Expression + │ └─ PrimaryExpression + │ └─ PrimaryPrefix + │ └─ Name + ├─ BlockStatement + │ └─ LocalVariableDeclaration + │ ├─ Type + │ │ └─ ReferenceType + │ │ └─ ClassOrInterfaceType + │ └─ VariableDeclarator + │ ├─ VariableDeclaratorId + │ └─ VariableInitializer + │ └─ Expression + │ └─ PrimaryExpression + │ └─ PrimaryPrefix + │ └─ Name + ├─ BlockStatement + │ └─ Statement + │ └─ IfStatement + │ ├─ Expression + │ │ └─ PrimaryExpression + │ │ ├─ PrimaryPrefix + │ │ │ └─ Name + │ │ └─ PrimarySuffix + │ │ └─ Arguments + │ │ └─ ArgumentList + │ │ └─ Expression + │ │ └─ PrimaryExpression + │ │ └─ PrimaryPrefix + │ │ └─ Name + │ └─ Statement + │ └─ Block + │ └─ BlockStatement + │ └─ Statement + │ └─ StatementExpression + │ ├─ PrimaryExpression + │ │ └─ PrimaryPrefix + │ │ └─ Name + │ ├─ AssignmentOperator + │ └─ Expression + │ └─ PrimaryExpression + │ ├─ PrimaryPrefix + │ │ └─ Name + │ ├─ PrimarySuffix + │ │ └─ Arguments + │ │ └─ ArgumentList + │ │ └─ Expression + │ │ └─ PrimaryExpression + │ │ └─ PrimaryPrefix + │ │ └─ Literal + │ ├─ PrimarySuffix + │ └─ PrimarySuffix + │ └─ Arguments + │ └─ ArgumentList + │ └─ Expression + │ └─ PrimaryExpression + │ └─ PrimaryPrefix + │ └─ Name + └─ BlockStatement + └─ Statement + └─ ReturnStatement + └─ Expression + └─ PrimaryExpression + └─ PrimaryPrefix + └─ Name diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/ParserCornerCases.java b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/ParserCornerCases.java deleted file mode 100644 index 8249176a00..0000000000 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/ParserCornerCases.java +++ /dev/null @@ -1,224 +0,0 @@ -/** - * BSD-style license; for more info see http://pmd.sourceforge.net/license.html - */ - -/* - * This file is to test the JavaCC java grammar, whether we can parse specific java constructs without - * throwing a syntax error. - */ - -class Superclass { - - public Superclass() { - } - - public Superclass(Class clazz) { - } - - T doStuff(T s) { - return s; - } -} - -class Outer { - Outer() { - System.out.println("Outer constructor"); - } - - class Inner { - Inner() { - System.out.println("Inner constructor"); - } - } -} -class Child extends Outer.Inner { - Child(Outer o) { - o.super(); - System.out.println("Child constructor"); - } -} - -public class ParserCornerCases extends Superclass { - - public ParserCornerCases() { - super(); - } - - public ParserCornerCases(int a) { - this(a, 2); - } - - public ParserCornerCases(int a, int b) { - super(String.class); - } - - public ParserCornerCases(String title) { - this(); - } - - public strictfp void testGeneric() { - String o = super. doStuff("foo"); - String v = this. thisGeneric("bar"); - } - - X thisGeneric(X x) { - return x; - } - - Class getByteArrayClass() { - return (byte[].class); - } - - public void bitwiseOperator() { - if ((modifiers & InputEvent.SHIFT_DOWN_MASK) != 0 ) { - buf.append("shift "); - } - } -} - -/** - * Test case from http://jira.codehaus.org/browse/MPMD-126 - */ -class PmdTestParent { - public PmdTestParent(Object obj) {} -} - -class PmdTestChild extends PmdTestParent { - - public PmdTestChild() { - // the following line produced a parsing problem - super(new Object() { - - public Object create() { - - Object memoryMonitor = null; - - if (memoryMonitor == null) { - memoryMonitor = new Object(); - } - - return memoryMonitor; - } - }); - } -} - -/* - * Test cases for bug #1020 Parsing Error - */ -class SimpleBean { - String name; -} - -class SimpleBeanUser { - SimpleBeanUser(SimpleBean o) { - - } - - SimpleBeanUser() { - this(new SimpleBean() {{ - name = "test"; - }}); - } -} - -class SimpleBeanUser2 extends SimpleBeanUser { - SimpleBeanUser2() { - super(new SimpleBean(){{ - name = "test2"; - }}); - } -} - -/* - * Test case for bug #1007 Parse Exception with annotation - */ -class TestParseAnnototation { - void parse() { - for (@SuppressWarnings("unchecked") int i = 0; i < 10; i++) { - } - for (@SuppressWarnings("unchecked") Iterator it = Fachabteilung.values().iterator(); it.hasNext();) { - } - List l = new ArrayList(); - for (@SuppressWarnings("unchecked") String s : l) { - } - } -} - -/* - * Test case for bug #956 PMD Parse Exception - */ -class FooBlock {} -class MyFoo { - MyFoo(FooBlock b) { - } -} -class Foo extends MyFoo { - public Foo() { - super(new FooBlock() { - public Object valueOf(Object object) { - String fish = "salmon"; - return fish; - } - }); - } -} - -/* - * Verifies #1122 parse error at class.super - */ -class SuperTest { - /** - * @throws UnsupportedOperationException - */ - public Iterator iterator() { - if (this.mods.contains(Modification.Iterator)) { - return new Iterator() { - Iterator wrapped = ImmutableSet.super.iterator(); - - public boolean hasNext() { - return this.wrapped.hasNext(); - } - - public E next() { - return this.wrapped.next(); - } - - public void remove() { - if (ImmutableSet.this.mods.contains(Modification.RemoveIter)) { - this.wrapped.remove(); - } - throw new UnsupportedOperationException(); - } - }; - } - throw new UnsupportedOperationException(); - } -} - -/* - * Test case for #1310 PMD cannot parse int.class - */ -class ClazzPropertyOfPrimitiveTypes { - public void test() { - Class c = int.class; - c = short.class; - c = long.class; - c = float.class; - c = double.class; - c = char.class; - c = byte.class; - c = void.class; - - if (c == int.class || c == short.class || c == long.class || c == double.class || c == char.class || c == byte.class || c == void.class) { - - } - - if ("a".equals((int.class).getName())) { - - } - - if ((Integer.class.equals(clazz)) || (int.class.equals(clazz))) { - } - } -} diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/ParserCornerCases.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/ParserCornerCases.txt deleted file mode 100644 index 06d4ae2653..0000000000 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/ParserCornerCases.txt +++ /dev/null @@ -1,606 +0,0 @@ -+-- CompilationUnit[@PackageName = "", @declarationsAreInDefaultPackage = true] - +-- TypeDeclaration[] - | +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "Superclass", @Default = false, @Final = false, @Image = "Superclass", @Interface = false, @Local = false, @Modifiers = 0, @Native = false, @Nested = null, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "Superclass", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] - | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] - | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] - | | +-- ConstructorDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "Superclass", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 1, @Name = "Superclass", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] - | | +-- FormalParameters[@ParameterCount = 0] - | | +-- Block[@containsComment = false] - | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] - | | +-- ConstructorDeclaration[@Abstract = false, @Arity = 1, @Default = false, @Final = false, @Image = "Superclass", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 1, @Name = "Superclass", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] - | | +-- TypeParameters[] - | | | +-- TypeParameter[@Image = "V", @ParameterName = "V", @TypeBound = false] - | | +-- FormalParameters[@ParameterCount = 1] - | | | +-- FormalParameter[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false] - | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Class", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Class", @TypeImage = "Class"] - | | | | +-- TypeArguments[@Diamond = false] - | | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "V", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "V", @TypeImage = "V"] - | | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "clazz", @LambdaParameter = false, @LocalVariable = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "clazz"] - | | +-- Block[@containsComment = false] - | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD] - | +-- MethodDeclaration[@Abstract = false, @Arity = 1, @Default = false, @Final = false, @Image = "doStuff", @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "doStuff", @Modifiers = 0, @Name = "doStuff", @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = false, @Transient = false, @Varargs = false, @Void = false, @Volatile = false] - | +-- TypeParameters[] - | | +-- TypeParameter[@Image = "T", @ParameterName = "T", @TypeBound = false] - | +-- ResultType[@Void = false, @returnsArray = false] - | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "T", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "T", @TypeImage = "T"] - | +-- FormalParameters[@ParameterCount = 1] - | | +-- FormalParameter[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false] - | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "T", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "T", @TypeImage = "T"] - | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "s", @LambdaParameter = false, @LocalVariable = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "s"] - | +-- Block[@containsComment = false] - | +-- ReturnStatement[] - | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "s", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "s"] - +-- TypeDeclaration[] - | +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "Outer", @Default = false, @Final = false, @Image = "Outer", @Interface = false, @Local = false, @Modifiers = 0, @Native = false, @Nested = null, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "Outer", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] - | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] - | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] - | | +-- ConstructorDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "Outer", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 0, @Name = "Outer", @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] - | | +-- FormalParameters[@ParameterCount = 0] - | | +-- Block[@containsComment = false] - | | +-- ExpressionStatement[] - | | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] - | | +-- AmbiguousName[@ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = false, @CompileTimeConstant = false, @Expression = true, @Image = "System.out", @Name = "System.out", @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = false, @ReferenceType = true, @Segments = null, @TypeImage = "System.out"] - | | +-- ArgumentList[@ArgumentCount = 1] - | | +-- StringLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = true, @ConstValue = "Outer constructor", @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = ""Outer constructor"", @IntLiteral = false, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = true, @TextBlock = false] - | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CLASS] - | +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "Outer$Inner", @Default = false, @Final = false, @Image = "Inner", @Interface = false, @Local = false, @Modifiers = 0, @Native = false, @Nested = null, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "Inner", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] - | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] - | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] - | +-- ConstructorDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "Inner", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 0, @Name = "Inner", @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] - | +-- FormalParameters[@ParameterCount = 0] - | +-- Block[@containsComment = false] - | +-- ExpressionStatement[] - | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] - | +-- AmbiguousName[@ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = false, @CompileTimeConstant = false, @Expression = true, @Image = "System.out", @Name = "System.out", @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = false, @ReferenceType = true, @Segments = null, @TypeImage = "System.out"] - | +-- ArgumentList[@ArgumentCount = 1] - | +-- StringLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = true, @ConstValue = "Inner constructor", @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = ""Inner constructor"", @IntLiteral = false, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = true, @TextBlock = false] - +-- TypeDeclaration[] - | +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "Child", @Default = false, @Final = false, @Image = "Child", @Interface = false, @Local = false, @Modifiers = 0, @Native = false, @Nested = null, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "Child", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] - | +-- ExtendsList[] - | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Inner", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = true, @ReferenceType = true, @SimpleName = "Inner", @TypeImage = "Outer.Inner"] - | | +-- AmbiguousName[@ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = false, @CompileTimeConstant = false, @Expression = true, @Image = "Outer", @Name = "Outer", @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = false, @ReferenceType = true, @Segments = null, @TypeImage = "Outer"] - | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] - | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] - | +-- ConstructorDeclaration[@Abstract = false, @Arity = 1, @Default = false, @Final = false, @Image = "Child", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 0, @Name = "Child", @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] - | +-- FormalParameters[@ParameterCount = 1] - | | +-- FormalParameter[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false] - | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Outer", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = true, @ReferenceType = true, @SimpleName = "Outer", @TypeImage = "Outer"] - | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "o", @LambdaParameter = false, @LocalVariable = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "o"] - | +-- Block[@containsComment = false] - | +-- ExplicitConstructorInvocation[@ArgumentCount = 0, @Qualified = true, @Super = true, @This = false] - | | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "o", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "o"] - | | +-- ArgumentList[@ArgumentCount = 0] - | +-- ExpressionStatement[] - | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "println", @MethodName = "println", @ParenthesisDepth = 0, @Parenthesized = false] - | +-- AmbiguousName[@ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = false, @CompileTimeConstant = false, @Expression = true, @Image = "System.out", @Name = "System.out", @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = false, @ReferenceType = true, @Segments = null, @TypeImage = "System.out"] - | +-- ArgumentList[@ArgumentCount = 1] - | +-- StringLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = true, @ConstValue = "Child constructor", @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = ""Child constructor"", @IntLiteral = false, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = true, @TextBlock = false] - +-- TypeDeclaration[] - | +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "ParserCornerCases", @Default = false, @Final = false, @Image = "ParserCornerCases", @Interface = false, @Local = false, @Modifiers = 1, @Native = false, @Nested = null, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @SimpleName = "ParserCornerCases", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] - | +-- ExtendsList[] - | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Superclass", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = true, @ReferenceType = true, @SimpleName = "Superclass", @TypeImage = "Superclass"] - | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] - | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] - | | +-- ConstructorDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "ParserCornerCases", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 1, @Name = "ParserCornerCases", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] - | | +-- FormalParameters[@ParameterCount = 0] - | | +-- Block[@containsComment = false] - | | +-- ExplicitConstructorInvocation[@ArgumentCount = 0, @Qualified = false, @Super = true, @This = false] - | | +-- ArgumentList[@ArgumentCount = 0] - | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] - | | +-- ConstructorDeclaration[@Abstract = false, @Arity = 1, @Default = false, @Final = false, @Image = "ParserCornerCases", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 1, @Name = "ParserCornerCases", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] - | | +-- FormalParameters[@ParameterCount = 1] - | | | +-- FormalParameter[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false] - | | | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "int", @ModelConstant = PrimitiveType.INT, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "int"] - | | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "a", @LambdaParameter = false, @LocalVariable = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "a"] - | | +-- Block[@containsComment = false] - | | +-- ExplicitConstructorInvocation[@ArgumentCount = 2, @Qualified = false, @Super = false, @This = true] - | | +-- TypeArguments[@Diamond = false] - | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Integer", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Integer", @TypeImage = "Integer"] - | | +-- ArgumentList[@ArgumentCount = 2] - | | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "a", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "a"] - | | +-- NumericLiteral[@Base = 10, @BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = false, @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = "2", @IntLiteral = true, @Integral = true, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = true, @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = PrimitiveType.INT, @StringLiteral = false, @ValueAsDouble = 2.0, @ValueAsFloat = 2.0, @ValueAsInt = 2, @ValueAsLong = 2] - | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] - | | +-- ConstructorDeclaration[@Abstract = false, @Arity = 2, @Default = false, @Final = false, @Image = "ParserCornerCases", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 1, @Name = "ParserCornerCases", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] - | | +-- TypeParameters[] - | | | +-- TypeParameter[@Image = "W", @ParameterName = "W", @TypeBound = false] - | | +-- FormalParameters[@ParameterCount = 2] - | | | +-- FormalParameter[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false] - | | | | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "int", @ModelConstant = PrimitiveType.INT, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "int"] - | | | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "a", @LambdaParameter = false, @LocalVariable = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "a"] - | | | +-- FormalParameter[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false] - | | | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "int", @ModelConstant = PrimitiveType.INT, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "int"] - | | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "b", @LambdaParameter = false, @LocalVariable = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "b"] - | | +-- Block[@containsComment = false] - | | +-- ExplicitConstructorInvocation[@ArgumentCount = 1, @Qualified = false, @Super = true, @This = false] - | | +-- TypeArguments[@Diamond = false] - | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] - | | +-- ArgumentList[@ArgumentCount = 1] - | | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] - | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] - | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] - | | +-- ConstructorDeclaration[@Abstract = false, @Arity = 1, @Default = false, @Final = false, @Image = "ParserCornerCases", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 1, @Name = "ParserCornerCases", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] - | | +-- FormalParameters[@ParameterCount = 1] - | | | +-- FormalParameter[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false] - | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] - | | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "title", @LambdaParameter = false, @LocalVariable = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "title"] - | | +-- Block[@containsComment = false] - | | +-- ExplicitConstructorInvocation[@ArgumentCount = 0, @Qualified = false, @Super = false, @This = true] - | | +-- ArgumentList[@ArgumentCount = 0] - | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD] - | | +-- MethodDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "testGeneric", @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "testGeneric", @Modifiers = 4097, @Name = "testGeneric", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = true, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = true, @Transient = false, @Varargs = false, @Void = true, @Volatile = false] - | | +-- ResultType[@Void = true, @returnsArray = false] - | | +-- FormalParameters[@ParameterCount = 0] - | | +-- Block[@containsComment = false] - | | +-- LocalVariableDeclaration[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @VariableName = "o", @Volatile = false] - | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] - | | | +-- VariableDeclarator[@Initializer = true, @Name = "o"] - | | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = false, @Image = "o", @LambdaParameter = false, @LocalVariable = true, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "o"] - | | | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "doStuff", @MethodName = "doStuff", @ParenthesisDepth = 0, @Parenthesized = false] - | | | +-- SuperExpression[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false] - | | | +-- TypeArguments[@Diamond = false] - | | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] - | | | +-- ArgumentList[@ArgumentCount = 1] - | | | +-- StringLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = true, @ConstValue = "foo", @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = ""foo"", @IntLiteral = false, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = true, @TextBlock = false] - | | +-- LocalVariableDeclaration[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @VariableName = "v", @Volatile = false] - | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] - | | +-- VariableDeclarator[@Initializer = true, @Name = "v"] - | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = false, @Image = "v", @LambdaParameter = false, @LocalVariable = true, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "v"] - | | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "thisGeneric", @MethodName = "thisGeneric", @ParenthesisDepth = 0, @Parenthesized = false] - | | +-- ThisExpression[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false] - | | +-- TypeArguments[@Diamond = false] - | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] - | | +-- ArgumentList[@ArgumentCount = 1] - | | +-- StringLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = true, @ConstValue = "bar", @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = ""bar"", @IntLiteral = false, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = true, @TextBlock = false] - | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD] - | | +-- MethodDeclaration[@Abstract = false, @Arity = 1, @Default = false, @Final = false, @Image = "thisGeneric", @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "thisGeneric", @Modifiers = 0, @Name = "thisGeneric", @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = false, @Transient = false, @Varargs = false, @Void = false, @Volatile = false] - | | +-- TypeParameters[] - | | | +-- TypeParameter[@Image = "X", @ParameterName = "X", @TypeBound = false] - | | +-- ResultType[@Void = false, @returnsArray = false] - | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "X", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "X", @TypeImage = "X"] - | | +-- FormalParameters[@ParameterCount = 1] - | | | +-- FormalParameter[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false] - | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "X", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "X", @TypeImage = "X"] - | | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "x", @LambdaParameter = false, @LocalVariable = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "x"] - | | +-- Block[@containsComment = false] - | | +-- ReturnStatement[] - | | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "x", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "x"] - | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD] - | | +-- MethodDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "getByteArrayClass", @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "getByteArrayClass", @Modifiers = 0, @Name = "getByteArrayClass", @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = false, @Transient = false, @Varargs = false, @Void = false, @Volatile = false] - | | +-- ResultType[@Void = false, @returnsArray = false] - | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Class", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Class", @TypeImage = "Class"] - | | +-- FormalParameters[@ParameterCount = 0] - | | +-- Block[@containsComment = false] - | | +-- ReturnStatement[] - | | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 1, @Parenthesized = true, @Void = false] - | | +-- ArrayType[@ArrayDepth = 1, @ArrayType = true, @ClassOrInterfaceType = false, @PrimitiveType = false, @ReferenceType = true, @TypeImage = "byte"] - | | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "byte", @ModelConstant = PrimitiveType.BYTE, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "byte"] - | | +-- ArrayDimensions[@Size = 1] - | | +-- ArrayTypeDim[] - | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD] - | +-- MethodDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "bitwiseOperator", @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "bitwiseOperator", @Modifiers = 1, @Name = "bitwiseOperator", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = true, @Transient = false, @Varargs = false, @Void = true, @Volatile = false] - | +-- ResultType[@Void = true, @returnsArray = false] - | +-- FormalParameters[@ParameterCount = 0] - | +-- Block[@containsComment = false] - | +-- IfStatement[@Else = false] - | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.NE, @ParenthesisDepth = 0, @Parenthesized = false] - | | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.AND, @ParenthesisDepth = 1, @Parenthesized = true] - | | | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "modifiers", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "modifiers"] - | | | +-- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @FieldName = "SHIFT_DOWN_MASK", @Image = "SHIFT_DOWN_MASK", @ParenthesisDepth = 0, @Parenthesized = false] - | | | +-- AmbiguousName[@ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = false, @CompileTimeConstant = false, @Expression = true, @Image = "InputEvent", @Name = "InputEvent", @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = false, @ReferenceType = true, @Segments = null, @TypeImage = "InputEvent"] - | | +-- NumericLiteral[@Base = 10, @BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = false, @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = true, @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = PrimitiveType.INT, @StringLiteral = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] - | +-- Block[@containsComment = false] - | +-- ExpressionStatement[] - | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "append", @MethodName = "append", @ParenthesisDepth = 0, @Parenthesized = false] - | +-- AmbiguousName[@ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = false, @CompileTimeConstant = false, @Expression = true, @Image = "buf", @Name = "buf", @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = false, @ReferenceType = true, @Segments = null, @TypeImage = "buf"] - | +-- ArgumentList[@ArgumentCount = 1] - | +-- StringLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = true, @ConstValue = "shift ", @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = ""shift "", @IntLiteral = false, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = true, @TextBlock = false] - +-- TypeDeclaration[] - | +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "PmdTestParent", @Default = false, @Final = false, @Image = "PmdTestParent", @Interface = false, @Local = false, @Modifiers = 0, @Native = false, @Nested = null, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "PmdTestParent", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] - | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] - | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] - | +-- ConstructorDeclaration[@Abstract = false, @Arity = 1, @Default = false, @Final = false, @Image = "PmdTestParent", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 1, @Name = "PmdTestParent", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] - | +-- FormalParameters[@ParameterCount = 1] - | | +-- FormalParameter[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false] - | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Object", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Object", @TypeImage = "Object"] - | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "obj", @LambdaParameter = false, @LocalVariable = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "obj"] - | +-- Block[@containsComment = false] - +-- TypeDeclaration[] - | +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "PmdTestChild", @Default = false, @Final = false, @Image = "PmdTestChild", @Interface = false, @Local = false, @Modifiers = 0, @Native = false, @Nested = null, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "PmdTestChild", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] - | +-- ExtendsList[] - | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "PmdTestParent", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = true, @ReferenceType = true, @SimpleName = "PmdTestParent", @TypeImage = "PmdTestParent"] - | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] - | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] - | +-- ConstructorDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "PmdTestChild", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 1, @Name = "PmdTestChild", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] - | +-- FormalParameters[@ParameterCount = 0] - | +-- Block[@containsComment = false] - | +-- ExplicitConstructorInvocation[@ArgumentCount = 1, @Qualified = false, @Super = true, @This = false] - | +-- ArgumentList[@ArgumentCount = 1] - | +-- ConstructorCall[@AnonymousClass = true, @CompileTimeConstant = false, @DiamondTypeArgs = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] - | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Object", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Object", @TypeImage = "Object"] - | +-- ArgumentList[@ArgumentCount = 0] - | +-- AnonymousClassDeclaration[] - | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] - | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD] - | +-- MethodDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "create", @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "create", @Modifiers = 1, @Name = "create", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = true, @Transient = false, @Varargs = false, @Void = false, @Volatile = false] - | +-- ResultType[@Void = false, @returnsArray = false] - | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Object", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Object", @TypeImage = "Object"] - | +-- FormalParameters[@ParameterCount = 0] - | +-- Block[@containsComment = false] - | +-- LocalVariableDeclaration[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @VariableName = "memoryMonitor", @Volatile = false] - | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Object", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Object", @TypeImage = "Object"] - | | +-- VariableDeclarator[@Initializer = true, @Name = "memoryMonitor"] - | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = false, @Image = "memoryMonitor", @LambdaParameter = false, @LocalVariable = true, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "memoryMonitor"] - | | +-- NullLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = false, @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @IntLiteral = false, @LongLiteral = false, @NullLiteral = true, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = false] - | +-- IfStatement[@Else = false] - | | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] - | | | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "memoryMonitor", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "memoryMonitor"] - | | | +-- NullLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = false, @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @IntLiteral = false, @LongLiteral = false, @NullLiteral = true, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = false] - | | +-- Block[@containsComment = false] - | | +-- ExpressionStatement[] - | | +-- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Expression = true, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] - | | +-- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Expression = true, @Image = "memoryMonitor", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "memoryMonitor"] - | | +-- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] - | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Object", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Object", @TypeImage = "Object"] - | | +-- ArgumentList[@ArgumentCount = 0] - | +-- ReturnStatement[] - | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "memoryMonitor", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "memoryMonitor"] - +-- TypeDeclaration[] - | +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "SimpleBean", @Default = false, @Final = false, @Image = "SimpleBean", @Interface = false, @Local = false, @Modifiers = 0, @Native = false, @Nested = null, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "SimpleBean", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] - | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] - | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.FIELD] - | +-- FieldDeclaration[@Abstract = false, @AnnotationMember = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @InterfaceMember = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyFinal = false, @SyntacticallyPublic = false, @SyntacticallyStatic = false, @Transient = false, @VariableName = "name", @Volatile = false] - | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] - | +-- VariableDeclarator[@Initializer = false, @Name = "name"] - | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = false, @FormalParameter = false, @Image = "name", @LambdaParameter = false, @LocalVariable = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "name"] - +-- TypeDeclaration[] - | +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "SimpleBeanUser", @Default = false, @Final = false, @Image = "SimpleBeanUser", @Interface = false, @Local = false, @Modifiers = 0, @Native = false, @Nested = null, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "SimpleBeanUser", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] - | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] - | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] - | | +-- ConstructorDeclaration[@Abstract = false, @Arity = 1, @Default = false, @Final = false, @Image = "SimpleBeanUser", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 0, @Name = "SimpleBeanUser", @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] - | | +-- FormalParameters[@ParameterCount = 1] - | | | +-- FormalParameter[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false] - | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "SimpleBean", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = true, @ReferenceType = true, @SimpleName = "SimpleBean", @TypeImage = "SimpleBean"] - | | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "o", @LambdaParameter = false, @LocalVariable = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "o"] - | | +-- Block[@containsComment = false] - | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] - | +-- ConstructorDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "SimpleBeanUser", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 0, @Name = "SimpleBeanUser", @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] - | +-- FormalParameters[@ParameterCount = 0] - | +-- Block[@containsComment = false] - | +-- ExplicitConstructorInvocation[@ArgumentCount = 1, @Qualified = false, @Super = false, @This = true] - | +-- ArgumentList[@ArgumentCount = 1] - | +-- ConstructorCall[@AnonymousClass = true, @CompileTimeConstant = false, @DiamondTypeArgs = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] - | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "SimpleBean", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = true, @ReferenceType = true, @SimpleName = "SimpleBean", @TypeImage = "SimpleBean"] - | +-- ArgumentList[@ArgumentCount = 0] - | +-- AnonymousClassDeclaration[] - | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] - | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.INITIALIZER] - | +-- Initializer[@Static = false] - | +-- Block[@containsComment = false] - | +-- ExpressionStatement[] - | +-- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Expression = true, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] - | +-- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Expression = true, @Image = "name", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "name"] - | +-- StringLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = true, @ConstValue = "test", @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = ""test"", @IntLiteral = false, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = true, @TextBlock = false] - +-- TypeDeclaration[] - | +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "SimpleBeanUser2", @Default = false, @Final = false, @Image = "SimpleBeanUser2", @Interface = false, @Local = false, @Modifiers = 0, @Native = false, @Nested = null, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "SimpleBeanUser2", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] - | +-- ExtendsList[] - | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "SimpleBeanUser", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = true, @ReferenceType = true, @SimpleName = "SimpleBeanUser", @TypeImage = "SimpleBeanUser"] - | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] - | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] - | +-- ConstructorDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "SimpleBeanUser2", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 0, @Name = "SimpleBeanUser2", @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] - | +-- FormalParameters[@ParameterCount = 0] - | +-- Block[@containsComment = false] - | +-- ExplicitConstructorInvocation[@ArgumentCount = 1, @Qualified = false, @Super = true, @This = false] - | +-- ArgumentList[@ArgumentCount = 1] - | +-- ConstructorCall[@AnonymousClass = true, @CompileTimeConstant = false, @DiamondTypeArgs = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] - | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "SimpleBean", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = true, @ReferenceType = true, @SimpleName = "SimpleBean", @TypeImage = "SimpleBean"] - | +-- ArgumentList[@ArgumentCount = 0] - | +-- AnonymousClassDeclaration[] - | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] - | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.INITIALIZER] - | +-- Initializer[@Static = false] - | +-- Block[@containsComment = false] - | +-- ExpressionStatement[] - | +-- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Expression = true, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] - | +-- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Expression = true, @Image = "name", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "name"] - | +-- StringLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = true, @ConstValue = "test2", @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = ""test2"", @IntLiteral = false, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = true, @TextBlock = false] - +-- TypeDeclaration[] - | +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "TestParseAnnototation", @Default = false, @Final = false, @Image = "TestParseAnnototation", @Interface = false, @Local = false, @Modifiers = 0, @Native = false, @Nested = null, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "TestParseAnnototation", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] - | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] - | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD] - | +-- MethodDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "parse", @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "parse", @Modifiers = 0, @Name = "parse", @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = false, @Transient = false, @Varargs = false, @Void = true, @Volatile = false] - | +-- ResultType[@Void = true, @returnsArray = false] - | +-- FormalParameters[@ParameterCount = 0] - | +-- Block[@containsComment = false] - | +-- ForStatement[] - | | +-- ForInit[] - | | | +-- LocalVariableDeclaration[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @VariableName = "i", @Volatile = false] - | | | +-- SingleMemberAnnotation[@AnnotationName = "SuppressWarnings", @Image = "SuppressWarnings", @SimpleName = "SuppressWarnings"] - | | | | +-- StringLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = true, @ConstValue = "unchecked", @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = ""unchecked"", @IntLiteral = false, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = true, @TextBlock = false] - | | | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "int", @ModelConstant = PrimitiveType.INT, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "int"] - | | | +-- VariableDeclarator[@Initializer = true, @Name = "i"] - | | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = false, @Image = "i", @LambdaParameter = false, @LocalVariable = true, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "i"] - | | | +-- NumericLiteral[@Base = 10, @BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = false, @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = "0", @IntLiteral = true, @Integral = true, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = true, @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = PrimitiveType.INT, @StringLiteral = false, @ValueAsDouble = 0.0, @ValueAsFloat = 0.0, @ValueAsInt = 0, @ValueAsLong = 0] - | | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.LT, @ParenthesisDepth = 0, @Parenthesized = false] - | | | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "i", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "i"] - | | | +-- NumericLiteral[@Base = 10, @BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = false, @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = "10", @IntLiteral = true, @Integral = true, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = true, @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = PrimitiveType.INT, @StringLiteral = false, @ValueAsDouble = 10.0, @ValueAsFloat = 10.0, @ValueAsInt = 10, @ValueAsLong = 10] - | | +-- ForUpdate[] - | | | +-- StatementExpressionList[] - | | | +-- UnaryExpression[@CompileTimeConstant = false, @Expression = true, @Operator = UnaryOp.POST_INCREMENT, @ParenthesisDepth = 0, @Parenthesized = false, @Prefix = false] - | | | +-- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Expression = true, @Image = "i", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "i"] - | | +-- Block[@containsComment = false] - | +-- ForStatement[] - | | +-- ForInit[] - | | | +-- LocalVariableDeclaration[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @VariableName = "it", @Volatile = false] - | | | +-- SingleMemberAnnotation[@AnnotationName = "SuppressWarnings", @Image = "SuppressWarnings", @SimpleName = "SuppressWarnings"] - | | | | +-- StringLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = true, @ConstValue = "unchecked", @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = ""unchecked"", @IntLiteral = false, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = true, @TextBlock = false] - | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Iterator", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Iterator", @TypeImage = "Iterator"] - | | | +-- VariableDeclarator[@Initializer = true, @Name = "it"] - | | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = false, @Image = "it", @LambdaParameter = false, @LocalVariable = true, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "it"] - | | | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "iterator", @MethodName = "iterator", @ParenthesisDepth = 0, @Parenthesized = false] - | | | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "values", @MethodName = "values", @ParenthesisDepth = 0, @Parenthesized = false] - | | | | +-- AmbiguousName[@ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = false, @CompileTimeConstant = false, @Expression = true, @Image = "Fachabteilung", @Name = "Fachabteilung", @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = false, @ReferenceType = true, @Segments = null, @TypeImage = "Fachabteilung"] - | | | | +-- ArgumentList[@ArgumentCount = 0] - | | | +-- ArgumentList[@ArgumentCount = 0] - | | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "hasNext", @MethodName = "hasNext", @ParenthesisDepth = 0, @Parenthesized = false] - | | | +-- AmbiguousName[@ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = false, @CompileTimeConstant = false, @Expression = true, @Image = "it", @Name = "it", @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = false, @ReferenceType = true, @Segments = null, @TypeImage = "it"] - | | | +-- ArgumentList[@ArgumentCount = 0] - | | +-- Block[@containsComment = false] - | +-- LocalVariableDeclaration[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @VariableName = "l", @Volatile = false] - | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "List", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "List", @TypeImage = "List"] - | | | +-- TypeArguments[@Diamond = false] - | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] - | | +-- VariableDeclarator[@Initializer = true, @Name = "l"] - | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = false, @Image = "l", @LambdaParameter = false, @LocalVariable = true, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "l"] - | | +-- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] - | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "ArrayList", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "ArrayList", @TypeImage = "ArrayList"] - | | | +-- TypeArguments[@Diamond = false] - | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] - | | +-- ArgumentList[@ArgumentCount = 0] - | +-- ForeachStatement[] - | +-- LocalVariableDeclaration[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @VariableName = "s", @Volatile = false] - | | +-- SingleMemberAnnotation[@AnnotationName = "SuppressWarnings", @Image = "SuppressWarnings", @SimpleName = "SuppressWarnings"] - | | | +-- StringLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = true, @ConstValue = "unchecked", @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = ""unchecked"", @IntLiteral = false, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = true, @TextBlock = false] - | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] - | | +-- VariableDeclarator[@Initializer = false, @Name = "s"] - | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = false, @Image = "s", @LambdaParameter = false, @LocalVariable = true, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "s"] - | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "l", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "l"] - | +-- Block[@containsComment = false] - +-- TypeDeclaration[] - | +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "FooBlock", @Default = false, @Final = false, @Image = "FooBlock", @Interface = false, @Local = false, @Modifiers = 0, @Native = false, @Nested = null, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "FooBlock", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] - | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] - +-- TypeDeclaration[] - | +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "MyFoo", @Default = false, @Final = false, @Image = "MyFoo", @Interface = false, @Local = false, @Modifiers = 0, @Native = false, @Nested = null, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "MyFoo", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] - | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] - | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] - | +-- ConstructorDeclaration[@Abstract = false, @Arity = 1, @Default = false, @Final = false, @Image = "MyFoo", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 0, @Name = "MyFoo", @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] - | +-- FormalParameters[@ParameterCount = 1] - | | +-- FormalParameter[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false] - | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "FooBlock", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = true, @ReferenceType = true, @SimpleName = "FooBlock", @TypeImage = "FooBlock"] - | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "b", @LambdaParameter = false, @LocalVariable = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "b"] - | +-- Block[@containsComment = false] - +-- TypeDeclaration[] - | +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "Foo", @Default = false, @Final = false, @Image = "Foo", @Interface = false, @Local = false, @Modifiers = 0, @Native = false, @Nested = null, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "Foo", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] - | +-- ExtendsList[] - | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "MyFoo", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = true, @ReferenceType = true, @SimpleName = "MyFoo", @TypeImage = "MyFoo"] - | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] - | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.CONSTRUCTOR] - | +-- ConstructorDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "Foo", @Kind = MethodLikeKind.CONSTRUCTOR, @Modifiers = 1, @Name = "Foo", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @Varargs = false, @Volatile = false, @containsComment = false] - | +-- FormalParameters[@ParameterCount = 0] - | +-- Block[@containsComment = false] - | +-- ExplicitConstructorInvocation[@ArgumentCount = 1, @Qualified = false, @Super = true, @This = false] - | +-- ArgumentList[@ArgumentCount = 1] - | +-- ConstructorCall[@AnonymousClass = true, @CompileTimeConstant = false, @DiamondTypeArgs = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] - | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "FooBlock", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = true, @ReferenceType = true, @SimpleName = "FooBlock", @TypeImage = "FooBlock"] - | +-- ArgumentList[@ArgumentCount = 0] - | +-- AnonymousClassDeclaration[] - | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] - | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD] - | +-- MethodDeclaration[@Abstract = false, @Arity = 1, @Default = false, @Final = false, @Image = "valueOf", @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "valueOf", @Modifiers = 1, @Name = "valueOf", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = true, @Transient = false, @Varargs = false, @Void = false, @Volatile = false] - | +-- ResultType[@Void = false, @returnsArray = false] - | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Object", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Object", @TypeImage = "Object"] - | +-- FormalParameters[@ParameterCount = 1] - | | +-- FormalParameter[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @Varargs = false, @Volatile = false] - | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Object", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Object", @TypeImage = "Object"] - | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = true, @Image = "object", @LambdaParameter = false, @LocalVariable = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "object"] - | +-- Block[@containsComment = false] - | +-- LocalVariableDeclaration[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @VariableName = "fish", @Volatile = false] - | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "String", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "String", @TypeImage = "String"] - | | +-- VariableDeclarator[@Initializer = true, @Name = "fish"] - | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = false, @Image = "fish", @LambdaParameter = false, @LocalVariable = true, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "fish"] - | | +-- StringLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = true, @ConstValue = "salmon", @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = ""salmon"", @IntLiteral = false, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = true, @TextBlock = false] - | +-- ReturnStatement[] - | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "fish", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "fish"] - +-- TypeDeclaration[] - | +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "SuperTest", @Default = false, @Final = false, @Image = "SuperTest", @Interface = false, @Local = false, @Modifiers = 0, @Native = false, @Nested = null, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "SuperTest", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] - | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] - | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD] - | +-- MethodDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "iterator", @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "iterator", @Modifiers = 1, @Name = "iterator", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = true, @Transient = false, @Varargs = false, @Void = false, @Volatile = false] - | +-- ResultType[@Void = false, @returnsArray = false] - | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Iterator", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Iterator", @TypeImage = "Iterator"] - | | +-- TypeArguments[@Diamond = false] - | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "E", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "E", @TypeImage = "E"] - | +-- FormalParameters[@ParameterCount = 0] - | +-- Block[@containsComment = false] - | +-- IfStatement[@Else = false] - | | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "contains", @MethodName = "contains", @ParenthesisDepth = 0, @Parenthesized = false] - | | | +-- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @FieldName = "mods", @Image = "mods", @ParenthesisDepth = 0, @Parenthesized = false] - | | | | +-- ThisExpression[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false] - | | | +-- ArgumentList[@ArgumentCount = 1] - | | | +-- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @FieldName = "Iterator", @Image = "Iterator", @ParenthesisDepth = 0, @Parenthesized = false] - | | | +-- AmbiguousName[@ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = false, @CompileTimeConstant = false, @Expression = true, @Image = "Modification", @Name = "Modification", @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = false, @ReferenceType = true, @Segments = null, @TypeImage = "Modification"] - | | +-- Block[@containsComment = false] - | | +-- ReturnStatement[] - | | +-- ConstructorCall[@AnonymousClass = true, @CompileTimeConstant = false, @DiamondTypeArgs = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] - | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Iterator", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Iterator", @TypeImage = "Iterator"] - | | | +-- TypeArguments[@Diamond = false] - | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "E", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "E", @TypeImage = "E"] - | | +-- ArgumentList[@ArgumentCount = 0] - | | +-- AnonymousClassDeclaration[] - | | +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] - | | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.FIELD] - | | | +-- FieldDeclaration[@Abstract = false, @AnnotationMember = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @InterfaceMember = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyFinal = false, @SyntacticallyPublic = false, @SyntacticallyStatic = false, @Transient = false, @VariableName = "wrapped", @Volatile = false] - | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Iterator", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Iterator", @TypeImage = "Iterator"] - | | | | +-- TypeArguments[@Diamond = false] - | | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "E", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "E", @TypeImage = "E"] - | | | +-- VariableDeclarator[@Initializer = true, @Name = "wrapped"] - | | | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = true, @Final = false, @FormalParameter = false, @Image = "wrapped", @LambdaParameter = false, @LocalVariable = false, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "wrapped"] - | | | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "iterator", @MethodName = "iterator", @ParenthesisDepth = 0, @Parenthesized = false] - | | | +-- SuperExpression[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false] - | | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "ImmutableSet", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "ImmutableSet", @TypeImage = "ImmutableSet"] - | | | +-- ArgumentList[@ArgumentCount = 0] - | | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD] - | | | +-- MethodDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "hasNext", @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "hasNext", @Modifiers = 1, @Name = "hasNext", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = true, @Transient = false, @Varargs = false, @Void = false, @Volatile = false] - | | | +-- ResultType[@Void = false, @returnsArray = false] - | | | | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = true, @ClassOrInterfaceType = false, @Image = "boolean", @ModelConstant = PrimitiveType.BOOLEAN, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "boolean"] - | | | +-- FormalParameters[@ParameterCount = 0] - | | | +-- Block[@containsComment = false] - | | | +-- ReturnStatement[] - | | | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "hasNext", @MethodName = "hasNext", @ParenthesisDepth = 0, @Parenthesized = false] - | | | +-- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @FieldName = "wrapped", @Image = "wrapped", @ParenthesisDepth = 0, @Parenthesized = false] - | | | | +-- ThisExpression[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false] - | | | +-- ArgumentList[@ArgumentCount = 0] - | | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD] - | | | +-- MethodDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "next", @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "next", @Modifiers = 1, @Name = "next", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = true, @Transient = false, @Varargs = false, @Void = false, @Volatile = false] - | | | +-- ResultType[@Void = false, @returnsArray = false] - | | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "E", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "E", @TypeImage = "E"] - | | | +-- FormalParameters[@ParameterCount = 0] - | | | +-- Block[@containsComment = false] - | | | +-- ReturnStatement[] - | | | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "next", @MethodName = "next", @ParenthesisDepth = 0, @Parenthesized = false] - | | | +-- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @FieldName = "wrapped", @Image = "wrapped", @ParenthesisDepth = 0, @Parenthesized = false] - | | | | +-- ThisExpression[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false] - | | | +-- ArgumentList[@ArgumentCount = 0] - | | +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD] - | | +-- MethodDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "remove", @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "remove", @Modifiers = 1, @Name = "remove", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = true, @Transient = false, @Varargs = false, @Void = true, @Volatile = false] - | | +-- ResultType[@Void = true, @returnsArray = false] - | | +-- FormalParameters[@ParameterCount = 0] - | | +-- Block[@containsComment = false] - | | +-- IfStatement[@Else = false] - | | | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "contains", @MethodName = "contains", @ParenthesisDepth = 0, @Parenthesized = false] - | | | | +-- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @FieldName = "mods", @Image = "mods", @ParenthesisDepth = 0, @Parenthesized = false] - | | | | | +-- ThisExpression[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false] - | | | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "ImmutableSet", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "ImmutableSet", @TypeImage = "ImmutableSet"] - | | | | +-- ArgumentList[@ArgumentCount = 1] - | | | | +-- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @FieldName = "RemoveIter", @Image = "RemoveIter", @ParenthesisDepth = 0, @Parenthesized = false] - | | | | +-- AmbiguousName[@ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = false, @CompileTimeConstant = false, @Expression = true, @Image = "Modification", @Name = "Modification", @ParenthesisDepth = 0, @Parenthesized = false, @PrimitiveType = false, @ReferenceType = true, @Segments = null, @TypeImage = "Modification"] - | | | +-- Block[@containsComment = false] - | | | +-- ExpressionStatement[] - | | | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "remove", @MethodName = "remove", @ParenthesisDepth = 0, @Parenthesized = false] - | | | +-- FieldAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @FieldName = "wrapped", @Image = "wrapped", @ParenthesisDepth = 0, @Parenthesized = false] - | | | | +-- ThisExpression[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false] - | | | +-- ArgumentList[@ArgumentCount = 0] - | | +-- ThrowStatement[@FirstClassOrInterfaceTypeImage = "UnsupportedOperationException"] - | | +-- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] - | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "UnsupportedOperationException", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "UnsupportedOperationException", @TypeImage = "UnsupportedOperationException"] - | | +-- ArgumentList[@ArgumentCount = 0] - | +-- ThrowStatement[@FirstClassOrInterfaceTypeImage = "UnsupportedOperationException"] - | +-- ConstructorCall[@AnonymousClass = false, @CompileTimeConstant = false, @DiamondTypeArgs = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @QualifiedInstanceCreation = false] - | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "UnsupportedOperationException", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "UnsupportedOperationException", @TypeImage = "UnsupportedOperationException"] - | +-- ArgumentList[@ArgumentCount = 0] - +-- TypeDeclaration[] - +-- ClassOrInterfaceDeclaration[@Abstract = false, @BinaryName = "ClazzPropertyOfPrimitiveTypes", @Default = false, @Final = false, @Image = "ClazzPropertyOfPrimitiveTypes", @Interface = false, @Local = false, @Modifiers = 0, @Native = false, @Nested = null, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @SimpleName = "ClazzPropertyOfPrimitiveTypes", @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeKind = TypeKind.CLASS, @Volatile = false] - +-- ClassOrInterfaceBody[@AnonymousInnerClass = false, @EnumChild = false] - +-- ClassOrInterfaceBodyDeclaration[@AnonymousInnerClass = false, @EnumChild = false, @Kind = DeclarationKind.METHOD] - +-- MethodDeclaration[@Abstract = false, @Arity = 0, @Default = false, @Final = false, @Image = "test", @InterfaceMember = false, @Kind = MethodLikeKind.METHOD, @MethodName = "test", @Modifiers = 1, @Name = "test", @Native = false, @PackagePrivate = false, @Private = false, @Protected = false, @Public = true, @Static = false, @Strictfp = false, @Synchronized = false, @SyntacticallyAbstract = false, @SyntacticallyPublic = true, @Transient = false, @Varargs = false, @Void = true, @Volatile = false] - +-- ResultType[@Void = true, @returnsArray = false] - +-- FormalParameters[@ParameterCount = 0] - +-- Block[@containsComment = false] - +-- LocalVariableDeclaration[@Abstract = false, @Array = false, @ArrayDepth = 0, @Default = false, @Final = false, @Modifiers = 0, @Native = false, @PackagePrivate = true, @Private = false, @Protected = false, @Public = false, @Static = false, @Strictfp = false, @Synchronized = false, @Transient = false, @TypeInferred = false, @VariableName = "c", @Volatile = false] - | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Class", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Class", @TypeImage = "Class"] - | | +-- TypeArguments[@Diamond = false] - | | +-- WildcardType[@ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = false, @LowerBound = false, @PrimitiveType = false, @ReferenceType = true, @TypeImage = "?", @UpperBound = false] - | +-- VariableDeclarator[@Initializer = true, @Name = "c"] - | +-- VariableDeclaratorId[@Array = false, @ArrayDepth = 0, @ArrayType = false, @EnumConstant = false, @ExceptionBlockParameter = false, @Field = false, @Final = false, @FormalParameter = false, @Image = "c", @LambdaParameter = false, @LocalVariable = true, @ResourceDeclaration = false, @TypeInferred = false, @VariableName = "c"] - | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] - | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "int", @ModelConstant = PrimitiveType.INT, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "int"] - +-- ExpressionStatement[] - | +-- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Expression = true, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] - | +-- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Expression = true, @Image = "c", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "c"] - | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] - | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "short", @ModelConstant = PrimitiveType.SHORT, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "short"] - +-- ExpressionStatement[] - | +-- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Expression = true, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] - | +-- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Expression = true, @Image = "c", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "c"] - | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] - | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "long", @ModelConstant = PrimitiveType.LONG, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "long"] - +-- ExpressionStatement[] - | +-- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Expression = true, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] - | +-- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Expression = true, @Image = "c", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "c"] - | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] - | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "float", @ModelConstant = PrimitiveType.FLOAT, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "float"] - +-- ExpressionStatement[] - | +-- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Expression = true, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] - | +-- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Expression = true, @Image = "c", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "c"] - | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] - | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "double", @ModelConstant = PrimitiveType.DOUBLE, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "double"] - +-- ExpressionStatement[] - | +-- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Expression = true, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] - | +-- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Expression = true, @Image = "c", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "c"] - | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] - | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "char", @ModelConstant = PrimitiveType.CHAR, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "char"] - +-- ExpressionStatement[] - | +-- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Expression = true, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] - | +-- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Expression = true, @Image = "c", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "c"] - | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] - | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "byte", @ModelConstant = PrimitiveType.BYTE, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "byte"] - +-- ExpressionStatement[] - | +-- AssignmentExpression[@CompileTimeConstant = false, @Compound = false, @Expression = true, @Operator = AssignmentOp.ASSIGN, @ParenthesisDepth = 0, @Parenthesized = false] - | +-- VariableAccess[@AccessType = AccessType.WRITE, @CompileTimeConstant = false, @Expression = true, @Image = "c", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "c"] - | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = true] - +-- IfStatement[@Else = false] - | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.CONDITIONAL_OR, @ParenthesisDepth = 0, @Parenthesized = false] - | | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.CONDITIONAL_OR, @ParenthesisDepth = 0, @Parenthesized = false] - | | | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.CONDITIONAL_OR, @ParenthesisDepth = 0, @Parenthesized = false] - | | | | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.CONDITIONAL_OR, @ParenthesisDepth = 0, @Parenthesized = false] - | | | | | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.CONDITIONAL_OR, @ParenthesisDepth = 0, @Parenthesized = false] - | | | | | | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.CONDITIONAL_OR, @ParenthesisDepth = 0, @Parenthesized = false] - | | | | | | | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] - | | | | | | | | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "c", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "c"] - | | | | | | | | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] - | | | | | | | | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "int", @ModelConstant = PrimitiveType.INT, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "int"] - | | | | | | | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] - | | | | | | | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "c", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "c"] - | | | | | | | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] - | | | | | | | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "short", @ModelConstant = PrimitiveType.SHORT, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "short"] - | | | | | | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] - | | | | | | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "c", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "c"] - | | | | | | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] - | | | | | | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "long", @ModelConstant = PrimitiveType.LONG, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "long"] - | | | | | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] - | | | | | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "c", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "c"] - | | | | | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] - | | | | | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "double", @ModelConstant = PrimitiveType.DOUBLE, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "double"] - | | | | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] - | | | | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "c", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "c"] - | | | | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] - | | | | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "char", @ModelConstant = PrimitiveType.CHAR, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "char"] - | | | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] - | | | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "c", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "c"] - | | | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] - | | | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "byte", @ModelConstant = PrimitiveType.BYTE, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "byte"] - | | +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.EQ, @ParenthesisDepth = 0, @Parenthesized = false] - | | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "c", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "c"] - | | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = true] - | +-- Block[@containsComment = false] - +-- IfStatement[@Else = false] - | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "equals", @MethodName = "equals", @ParenthesisDepth = 0, @Parenthesized = false] - | | +-- StringLiteral[@BooleanLiteral = false, @CharLiteral = false, @CompileTimeConstant = true, @ConstValue = "a", @DoubleLiteral = false, @Expression = true, @FloatLiteral = false, @Image = ""a"", @IntLiteral = false, @LongLiteral = false, @NullLiteral = false, @NumericLiteral = false, @ParenthesisDepth = 0, @Parenthesized = false, @StringLiteral = true, @TextBlock = false] - | | +-- ArgumentList[@ArgumentCount = 1] - | | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "getName", @MethodName = "getName", @ParenthesisDepth = 0, @Parenthesized = false] - | | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 1, @Parenthesized = true, @Void = false] - | | | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "int", @ModelConstant = PrimitiveType.INT, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "int"] - | | +-- ArgumentList[@ArgumentCount = 0] - | +-- Block[@containsComment = false] - +-- IfStatement[@Else = false] - +-- InfixExpression[@CompileTimeConstant = false, @Expression = true, @Operator = BinaryOp.CONDITIONAL_OR, @ParenthesisDepth = 0, @Parenthesized = false] - | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "equals", @MethodName = "equals", @ParenthesisDepth = 1, @Parenthesized = true] - | | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] - | | | +-- ClassOrInterfaceType[@AnonymousClass = false, @ArrayDepth = 0, @ArrayType = false, @ClassOrInterfaceType = true, @Image = "Integer", @PrimitiveType = false, @ReferenceToClassSameCompilationUnit = false, @ReferenceType = true, @SimpleName = "Integer", @TypeImage = "Integer"] - | | +-- ArgumentList[@ArgumentCount = 1] - | | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "clazz", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "clazz"] - | +-- MethodCall[@CompileTimeConstant = false, @Expression = true, @Image = "equals", @MethodName = "equals", @ParenthesisDepth = 1, @Parenthesized = true] - | +-- ClassLiteral[@CompileTimeConstant = false, @Expression = true, @ParenthesisDepth = 0, @Parenthesized = false, @Void = false] - | | +-- PrimitiveType[@ArrayDepth = 0, @ArrayType = false, @Boolean = false, @ClassOrInterfaceType = false, @Image = "int", @ModelConstant = PrimitiveType.INT, @PrimitiveType = true, @ReferenceType = false, @TypeImage = "int"] - | +-- ArgumentList[@ArgumentCount = 1] - | +-- VariableAccess[@AccessType = AccessType.READ, @CompileTimeConstant = false, @Expression = true, @Image = "clazz", @ParenthesisDepth = 0, @Parenthesized = false, @VariableName = "clazz"] - +-- Block[@containsComment = false] diff --git a/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/BaseTreeDumpTest.kt b/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/BaseTreeDumpTest.kt index 10de168b3b..8b2660abc7 100644 --- a/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/BaseTreeDumpTest.kt +++ b/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/BaseTreeDumpTest.kt @@ -49,7 +49,7 @@ abstract class BaseTreeDumpTest( if (!expectedFile.exists()) { expectedFile.writeText(actual) - throw AssertionError("Reference file $expectedFile doesn't exist, created it anyway") + throw AssertionError("Reference file doesn't exist, created it at $expectedFile") } val expected = expectedFile.readText() diff --git a/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/NodePrinters.kt b/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/NodePrinters.kt index 7189df09e2..5f745fd116 100644 --- a/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/NodePrinters.kt +++ b/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/NodePrinters.kt @@ -4,9 +4,9 @@ package net.sourceforge.pmd.lang.ast.test -import com.github.oowekyala.treeutils.printers.SimpleTreePrinter import net.sourceforge.pmd.lang.ast.Node import net.sourceforge.pmd.lang.ast.xpath.Attribute +import net.sourceforge.pmd.util.treeexport.TextTreeRenderer import org.apache.commons.lang3.StringEscapeUtils /** @@ -21,15 +21,10 @@ import org.apache.commons.lang3.StringEscapeUtils * └── 1 child not shown * */ -object SimpleNodePrinter : SimpleTreePrinter(NodeTreeLikeAdapter, UnicodeStrings) - -/** - * Prints all the XPath attributes of the node. - */ -object FullAttributePrinter : BaseNodeAttributePrinter() +val SimpleNodePrinter = TextTreeRenderer(false, -1) -open class RelevantAttributePrinter(stringConfig: StringConfig = UnicodeStrings) : BaseNodeAttributePrinter(stringConfig) { +open class RelevantAttributePrinter : BaseNodeAttributePrinter() { private val Ignored = setOf("BeginLine", "EndLine", "BeginColumn", "EndColumn", "FindBoundary", "SingleLine") @@ -41,23 +36,21 @@ open class RelevantAttributePrinter(stringConfig: StringConfig = UnicodeStrings) /** * Base attribute printer, subclass to filter attributes. */ -open class BaseNodeAttributePrinter(stringConfig: StringConfig = UnicodeStrings) - : SimpleTreePrinter(NodeTreeLikeAdapter, stringConfig) { +open class BaseNodeAttributePrinter : TextTreeRenderer(false, -1) { protected open fun ignoreAttribute(node: Node, attribute: Attribute): Boolean = true - override fun StringBuilder.appendSingleNode(node: Node): StringBuilder { + override fun appendNodeInfoLn(out: Appendable, node: Node) { + out.append(node.xPathNodeName) - append(node.xPathNodeName) - - return node.xPathAttributesIterator - .asSequence() - // sort to get deterministic results - .sortedBy { it.name } - .filterNot { ignoreAttribute(node, it) } - .joinTo(buffer = this, prefix = "[", postfix = "]") { - "@${it.name} = ${valueToString(it.value)}" - } + node.xPathAttributesIterator + .asSequence() + // sort to get deterministic results + .sortedBy { it.name } + .filterNot { ignoreAttribute(node, it) } + .joinTo(buffer = out, prefix = "[", postfix = "]") { + "@${it.name} = ${valueToString(it.value)}" + } } protected open fun valueToString(value: Any?): String? { From 89cddd8aa8991d15b61f1e9d904656be8b1f2d94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Fri, 20 Mar 2020 10:28:06 +0100 Subject: [PATCH 4/8] Use parsing helper --- .../lang/java/ast/AbstractJavaTreeDumpTest.kt | 11 +++-------- .../pmd/lang/ast/test/BaseParsingHelper.kt | 12 +++++++++--- .../pmd/lang/ast/test/BaseTreeDumpTest.kt | 18 +++++------------- 3 files changed, 17 insertions(+), 24 deletions(-) diff --git a/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/ast/AbstractJavaTreeDumpTest.kt b/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/ast/AbstractJavaTreeDumpTest.kt index ad32dfa0c8..5c517cf164 100644 --- a/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/ast/AbstractJavaTreeDumpTest.kt +++ b/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/ast/AbstractJavaTreeDumpTest.kt @@ -4,20 +4,15 @@ package net.sourceforge.pmd.lang.java.ast -import net.sourceforge.pmd.lang.ast.Node import net.sourceforge.pmd.lang.ast.test.BaseTreeDumpTest import net.sourceforge.pmd.lang.ast.test.SimpleNodePrinter import net.sourceforge.pmd.lang.java.JavaParsingHelper import net.sourceforge.pmd.util.treeexport.TreeRenderer abstract class AbstractJavaTreeDumpTest(printer: TreeRenderer = SimpleNodePrinter) - : BaseTreeDumpTest( - printer = printer, - pathToFixtures = "testdata", - extension = ".java" -) { - override fun parseFile(fileText: String): Node = - JavaParsingHelper.WITH_PROCESSING.parse(fileText) + : BaseTreeDumpTest(printer = printer, extension = ".java") { + override val parser: JavaParsingHelper = + JavaParsingHelper.WITH_PROCESSING.withResourceContext(javaClass, "testdata") } diff --git a/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/BaseParsingHelper.kt b/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/BaseParsingHelper.kt index 4a486a397c..c209327c9f 100644 --- a/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/BaseParsingHelper.kt +++ b/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/BaseParsingHelper.kt @@ -35,12 +35,18 @@ abstract class BaseParsingHelper, T : RootNode @JvmStatic val defaultNoProcess = Params(false, null, null, "") + @JvmStatic val defaultProcess = Params(true, null, null, "") } } + internal val resourceLoader: Class<*> + get() = params.resourceLoader ?: javaClass + + internal val resourcePrefix: String get() = params.resourcePrefix + /** * Returns the language version with the given version string. * If null, this defaults to the default language version for @@ -138,10 +144,10 @@ abstract class BaseParsingHelper, T : RootNode parse(readClassSource(clazz), version) protected fun readResource(resourceName: String): String { - val rloader = params.resourceLoader ?: javaClass - val input = rloader.getResourceAsStream(params.resourcePrefix + resourceName) - ?: throw IllegalArgumentException("Unable to find resource file ${params.resourcePrefix + resourceName} from $rloader") + val input = resourceLoader.getResourceAsStream(params.resourcePrefix + resourceName) + ?: throw IllegalArgumentException("Unable to find resource file ${params.resourcePrefix + resourceName} from $resourceLoader") + return consume(input) } diff --git a/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/BaseTreeDumpTest.kt b/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/BaseTreeDumpTest.kt index 8b2660abc7..c15c0ba9a4 100644 --- a/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/BaseTreeDumpTest.kt +++ b/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/BaseTreeDumpTest.kt @@ -4,7 +4,6 @@ package net.sourceforge.pmd.lang.ast.test -import net.sourceforge.pmd.lang.ast.Node import net.sourceforge.pmd.util.treeexport.TreeRenderer import java.nio.file.Path import java.nio.file.Paths @@ -15,36 +14,29 @@ import kotlin.test.assertEquals * Compare a dump of a file against a saved baseline. * * @param printer The node printer used to dump the trees - * @param pathToFixtures Path to the test files within the directory of the test case * @param extension Extension that the unparsed source file is supposed to have */ abstract class BaseTreeDumpTest( val printer: TreeRenderer, - val pathToFixtures: String, val extension: String ) { - /** - * Parses the given string into a node. - */ - abstract fun parseFile(fileText: String): Node - + abstract val parser: BaseParsingHelper<*, *> /** - * Executes the test. The test files are looked up in [pathToFixtures], - * in the resource directory *of the subclass*. + * Executes the test. The test files are looked up using the [parser]. * The reference test file must be named [fileBaseName] + [ExpectedExt]. * The source file to parse must be named [fileBaseName] + [extension]. */ fun doTest(fileBaseName: String) { - val expectedFile = findTestFile(javaClass, "$pathToFixtures/$fileBaseName$ExpectedExt").toFile() - val sourceFile = findTestFile(javaClass, "$pathToFixtures/$fileBaseName$extension").toFile() + val expectedFile = findTestFile(parser.resourceLoader, "${parser.resourcePrefix}/$fileBaseName$ExpectedExt").toFile() + val sourceFile = findTestFile(parser.resourceLoader, "${parser.resourcePrefix}/$fileBaseName$extension").toFile() assert(sourceFile.isFile) { "Source file $sourceFile is missing" } - val parsed = parseFile(sourceFile.readText()) // UTF-8 + val parsed = parser.parse(sourceFile.readText()) // UTF-8 val actual = StringBuilder().also { printer.renderSubtree(parsed, it) }.toString() if (!expectedFile.exists()) { From f36835638fd3fa17dc15d196f785524f5f6ac211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Fri, 20 Mar 2020 10:45:48 +0100 Subject: [PATCH 5/8] Add some scala tests --- .../lang/java/ast/AbstractJavaTreeDumpTest.kt | 18 - .../pmd/lang/java/ast/AstTreeDumpTests.kt | 20 - .../pmd/lang/java/ast/testdata/Bug1429.java | 22 - .../pmd/lang/java/ast/testdata/Bug1429.txt | 200 -- .../pmd/lang/scala/ast/ScalaParserTests.kt | 23 + .../pmd/lang/scala/ast/testdata/List.scala | 324 ++++ .../pmd/lang/scala/ast/testdata/List.txt | 1634 +++++++++++++++++ .../pmd/lang/scala/ast/testdata/package.scala | 22 + .../pmd/lang/scala/ast/testdata/package.txt | 90 + 9 files changed, 2093 insertions(+), 260 deletions(-) delete mode 100644 pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/ast/AbstractJavaTreeDumpTest.kt delete mode 100644 pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/ast/AstTreeDumpTests.kt delete mode 100644 pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/Bug1429.java delete mode 100644 pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/Bug1429.txt create mode 100644 pmd-scala/src/test/kotlin/net/sourceforge/pmd/lang/scala/ast/ScalaParserTests.kt create mode 100644 pmd-scala/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/List.scala create mode 100644 pmd-scala/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/List.txt create mode 100644 pmd-scala/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/package.scala create mode 100644 pmd-scala/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/package.txt diff --git a/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/ast/AbstractJavaTreeDumpTest.kt b/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/ast/AbstractJavaTreeDumpTest.kt deleted file mode 100644 index 5c517cf164..0000000000 --- a/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/ast/AbstractJavaTreeDumpTest.kt +++ /dev/null @@ -1,18 +0,0 @@ -/* - * BSD-style license; for more info see http://pmd.sourceforge.net/license.html - */ - -package net.sourceforge.pmd.lang.java.ast - -import net.sourceforge.pmd.lang.ast.test.BaseTreeDumpTest -import net.sourceforge.pmd.lang.ast.test.SimpleNodePrinter -import net.sourceforge.pmd.lang.java.JavaParsingHelper -import net.sourceforge.pmd.util.treeexport.TreeRenderer - -abstract class AbstractJavaTreeDumpTest(printer: TreeRenderer = SimpleNodePrinter) - : BaseTreeDumpTest(printer = printer, extension = ".java") { - - override val parser: JavaParsingHelper = - JavaParsingHelper.WITH_PROCESSING.withResourceContext(javaClass, "testdata") -} - diff --git a/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/ast/AstTreeDumpTests.kt b/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/ast/AstTreeDumpTests.kt deleted file mode 100644 index ad0d611f91..0000000000 --- a/pmd-java/src/test/kotlin/net/sourceforge/pmd/lang/java/ast/AstTreeDumpTests.kt +++ /dev/null @@ -1,20 +0,0 @@ -/* - * BSD-style license; for more info see http://pmd.sourceforge.net/license.html - */ - -package net.sourceforge.pmd.lang.java.ast - -import org.junit.Test - -/** - * Compare a dump of a file against a saved baseline. - * - * @author Clément Fournier - */ -class AstTreeDumpTests : AbstractJavaTreeDumpTest() { - - @Test - fun testComplicatedLambda() = doTest("Bug1429") - - -} diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/Bug1429.java b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/Bug1429.java deleted file mode 100644 index 2f61b06e26..0000000000 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/Bug1429.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * BSD-style license; for more info see http://pmd.sourceforge.net/license.html - */ - -public class Bug1429 { - public Set getAttributeTuples() { - return (Set) (this.attributes == null ? Collections. emptySet() : new HashSet( - CollectionUtils.collect(this.attributes.keySet(), new Transformer() { - @Override - public Object transform(final Object obj) { - final String key = (String) obj; - final String value = HGXLIFFTypeConfiguration.this.attributes.get(key); - - String result = key; - if (StringUtils.isNotEmpty(value)) { - result = result.concat(":").concat(value); - } - return result; - } - }))); - } -} diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/Bug1429.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/Bug1429.txt deleted file mode 100644 index fa19d6bb63..0000000000 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/testdata/Bug1429.txt +++ /dev/null @@ -1,200 +0,0 @@ -└─ CompilationUnit - └─ TypeDeclaration - └─ ClassOrInterfaceDeclaration - └─ ClassOrInterfaceBody - └─ ClassOrInterfaceBodyDeclaration - └─ MethodDeclaration - ├─ ResultType - │ └─ Type - │ └─ ReferenceType - │ └─ ClassOrInterfaceType - │ └─ TypeArguments - │ └─ TypeArgument - │ └─ ReferenceType - │ └─ ClassOrInterfaceType - ├─ MethodDeclarator - │ └─ FormalParameters - └─ Block - └─ BlockStatement - └─ Statement - └─ ReturnStatement - └─ Expression - └─ CastExpression - ├─ Type - │ └─ ReferenceType - │ └─ ClassOrInterfaceType - │ └─ TypeArguments - │ └─ TypeArgument - │ └─ ReferenceType - │ └─ ClassOrInterfaceType - └─ PrimaryExpression - └─ PrimaryPrefix - └─ Expression - └─ ConditionalExpression - ├─ EqualityExpression - │ ├─ PrimaryExpression - │ │ ├─ PrimaryPrefix - │ │ └─ PrimarySuffix - │ └─ PrimaryExpression - │ └─ PrimaryPrefix - │ └─ Literal - │ └─ NullLiteral - ├─ Expression - │ └─ PrimaryExpression - │ ├─ PrimaryPrefix - │ │ └─ Name - │ ├─ PrimarySuffix - │ │ └─ MemberSelector - │ │ └─ TypeArguments - │ │ └─ TypeArgument - │ │ └─ ReferenceType - │ │ └─ ClassOrInterfaceType - │ └─ PrimarySuffix - │ └─ Arguments - └─ PrimaryExpression - └─ PrimaryPrefix - └─ AllocationExpression - ├─ ClassOrInterfaceType - │ └─ TypeArguments - │ └─ TypeArgument - │ └─ ReferenceType - │ └─ ClassOrInterfaceType - └─ Arguments - └─ ArgumentList - └─ Expression - └─ PrimaryExpression - ├─ PrimaryPrefix - │ └─ Name - └─ PrimarySuffix - └─ Arguments - └─ ArgumentList - ├─ Expression - │ └─ PrimaryExpression - │ ├─ PrimaryPrefix - │ ├─ PrimarySuffix - │ ├─ PrimarySuffix - │ └─ PrimarySuffix - │ └─ Arguments - └─ Expression - └─ PrimaryExpression - └─ PrimaryPrefix - └─ AllocationExpression - ├─ ClassOrInterfaceType - ├─ Arguments - └─ ClassOrInterfaceBody - └─ ClassOrInterfaceBodyDeclaration - ├─ Annotation - │ └─ MarkerAnnotation - │ └─ Name - └─ MethodDeclaration - ├─ ResultType - │ └─ Type - │ └─ ReferenceType - │ └─ ClassOrInterfaceType - ├─ MethodDeclarator - │ └─ FormalParameters - │ └─ FormalParameter - │ ├─ Type - │ │ └─ ReferenceType - │ │ └─ ClassOrInterfaceType - │ └─ VariableDeclaratorId - └─ Block - ├─ BlockStatement - │ └─ LocalVariableDeclaration - │ ├─ Type - │ │ └─ ReferenceType - │ │ └─ ClassOrInterfaceType - │ └─ VariableDeclarator - │ ├─ VariableDeclaratorId - │ └─ VariableInitializer - │ └─ Expression - │ └─ CastExpression - │ ├─ Type - │ │ └─ ReferenceType - │ │ └─ ClassOrInterfaceType - │ └─ PrimaryExpression - │ └─ PrimaryPrefix - │ └─ Name - ├─ BlockStatement - │ └─ LocalVariableDeclaration - │ ├─ Type - │ │ └─ ReferenceType - │ │ └─ ClassOrInterfaceType - │ └─ VariableDeclarator - │ ├─ VariableDeclaratorId - │ └─ VariableInitializer - │ └─ Expression - │ └─ PrimaryExpression - │ ├─ PrimaryPrefix - │ │ └─ Name - │ ├─ PrimarySuffix - │ ├─ PrimarySuffix - │ ├─ PrimarySuffix - │ └─ PrimarySuffix - │ └─ Arguments - │ └─ ArgumentList - │ └─ Expression - │ └─ PrimaryExpression - │ └─ PrimaryPrefix - │ └─ Name - ├─ BlockStatement - │ └─ LocalVariableDeclaration - │ ├─ Type - │ │ └─ ReferenceType - │ │ └─ ClassOrInterfaceType - │ └─ VariableDeclarator - │ ├─ VariableDeclaratorId - │ └─ VariableInitializer - │ └─ Expression - │ └─ PrimaryExpression - │ └─ PrimaryPrefix - │ └─ Name - ├─ BlockStatement - │ └─ Statement - │ └─ IfStatement - │ ├─ Expression - │ │ └─ PrimaryExpression - │ │ ├─ PrimaryPrefix - │ │ │ └─ Name - │ │ └─ PrimarySuffix - │ │ └─ Arguments - │ │ └─ ArgumentList - │ │ └─ Expression - │ │ └─ PrimaryExpression - │ │ └─ PrimaryPrefix - │ │ └─ Name - │ └─ Statement - │ └─ Block - │ └─ BlockStatement - │ └─ Statement - │ └─ StatementExpression - │ ├─ PrimaryExpression - │ │ └─ PrimaryPrefix - │ │ └─ Name - │ ├─ AssignmentOperator - │ └─ Expression - │ └─ PrimaryExpression - │ ├─ PrimaryPrefix - │ │ └─ Name - │ ├─ PrimarySuffix - │ │ └─ Arguments - │ │ └─ ArgumentList - │ │ └─ Expression - │ │ └─ PrimaryExpression - │ │ └─ PrimaryPrefix - │ │ └─ Literal - │ ├─ PrimarySuffix - │ └─ PrimarySuffix - │ └─ Arguments - │ └─ ArgumentList - │ └─ Expression - │ └─ PrimaryExpression - │ └─ PrimaryPrefix - │ └─ Name - └─ BlockStatement - └─ Statement - └─ ReturnStatement - └─ Expression - └─ PrimaryExpression - └─ PrimaryPrefix - └─ Name diff --git a/pmd-scala/src/test/kotlin/net/sourceforge/pmd/lang/scala/ast/ScalaParserTests.kt b/pmd-scala/src/test/kotlin/net/sourceforge/pmd/lang/scala/ast/ScalaParserTests.kt new file mode 100644 index 0000000000..b156424fa7 --- /dev/null +++ b/pmd-scala/src/test/kotlin/net/sourceforge/pmd/lang/scala/ast/ScalaParserTests.kt @@ -0,0 +1,23 @@ +/* + * BSD-style license; for more info see http://pmd.sourceforge.net/license.html + */ + +package net.sourceforge.pmd.lang.scala.ast + +import net.sourceforge.pmd.lang.ast.test.BaseParsingHelper +import net.sourceforge.pmd.lang.ast.test.BaseTreeDumpTest +import net.sourceforge.pmd.lang.ast.test.SimpleNodePrinter +import org.junit.Test + +class ScalaParserTests : BaseTreeDumpTest(SimpleNodePrinter, ".scala") { + + override val parser: BaseParsingHelper<*, *> + get() = ScalaParsingHelper.DEFAULT.withResourceContext(javaClass, "testdata") + + @Test + fun testSomeScalaFeatures() = doTest("List") + + @Test + fun testPackageObject() = doTest("package") + +} diff --git a/pmd-scala/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/List.scala b/pmd-scala/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/List.scala new file mode 100644 index 0000000000..0c5ca22710 --- /dev/null +++ b/pmd-scala/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/List.scala @@ -0,0 +1,324 @@ +/* + * BSD-style license; for more info see http://pmd.sourceforge.net/license.html + */ + +package scala +package collection +package immutable + +import scala.annotation.unchecked.uncheckedVariance +import scala.annotation.tailrec +import mutable.{Builder, ListBuffer} +import scala.collection.generic.DefaultSerializable +import scala.runtime.Statics.releaseFence + +/** A class for immutable linked lists representing ordered collections + * of elements of type `A`. + * + */ +@SerialVersionUID(3L) +sealed abstract class List[+A] + extends AbstractSeq[A] + with LinearSeq[A] + with LinearSeqOps[A, List, List[A]] + with StrictOptimizedLinearSeqOps[A, List, List[A]] + with StrictOptimizedSeqOps[A, List, List[A]] + with IterableFactoryDefaults[A, List] + with DefaultSerializable { + + override def iterableFactory: SeqFactory[List] = List + + override def take(n: Int): List[A] = if (isEmpty || n <= 0) Nil else { + val h = new ::(head, Nil) + var t = h + var rest = tail + var i = 1 + while ( { + if (rest.isEmpty) return this; i < n + }) { + i += 1 + val nx = new ::(rest.head, Nil) + t.next = nx + t = nx + rest = rest.tail + } + releaseFence() + h + } + + /** + * @example {{{ + * // Given a list + * val letters = List('a','b','c','d','e') + * + * // `slice` returns all elements beginning at index `from` and afterwards, + * // up until index `until` (excluding index `until`.) + * letters.slice(1,3) // Returns List('b','c') + * }}} + */ + override def slice(from: Int, until: Int): List[A] = { + val lo = scala.math.max(from, 0) + if (until <= lo || isEmpty) Nil + else this drop lo take (until - lo) + } + + override def takeRight(n: Int): List[A] = { + @tailrec + def loop(lead: List[A], lag: List[A]): List[A] = lead match { + case Nil => lag + case _ :: tail => loop(tail, lag.tail) + } + loop(drop(n), this) + } + + // dropRight is inherited from LinearSeq + + override def splitAt(n: Int): (List[A], List[A]) = { + val b = new ListBuffer[A] + var i = 0 + var these = this + while (!these.isEmpty && i < n) { + i += 1 + b += these.head + these = these.tail + } + (b.toList, these) + } + + override def updated[B >: A](index: Int, elem: B): List[B] = { + var i = 0 + var current = this + val prefix = ListBuffer.empty[B] + while (i < index && current.nonEmpty) { + i += 1 + prefix += current.head + current = current.tail + } + if (i == index && current.nonEmpty) { + prefix.prependToList(elem :: current.tail) + } else { + throw new IndexOutOfBoundsException(s"$index is out of bounds (min 0, max ${leng t h-1})") + } + } + + final override def map[B](f: A => B): List[B] = { + if (this eq Nil) Nil else { + val h = new ::[B](f(head), Nil) + var t: ::[B] = h + var rest = tail + while (rest ne Nil) { + val nx = new ::(f(rest.head), Nil) + t.next = nx + t = nx + rest = rest.tail + } + releaseFence() + h + } + } + + final override def collect[B](pf: PartialFunction[A, B]): List[B] = { + if (this eq Nil) Nil else { + var rest = this + var h: ::[B] = null + var x: Any = null + // Special case for first element + while (h eq null) { + x = pf.applyOrElse(rest.head, List.partialNotApplied) + if (x.asInstanceOf[AnyRef] ne List.partialNotApplied) h = new ::(x.asInstanceOf[B], Nil) + rest = rest.tail + if (rest eq Nil) return if (h eq null) Nil else h + } + var t = h + // Remaining elements + while (rest ne Nil) { + x = pf.applyOrElse(rest.head, List.partialNotApplied) + if (x.asInstanceOf[AnyRef] ne List.partialNotApplied) { + val nx = new ::(x.asInstanceOf[B], Nil) + t.next = nx + t = nx + } + rest = rest.tail + } + releaseFence() + h + } + } + + final override def flatMap[B](f: A => IterableOnce[B]): List[B] = { + var rest = this + var h: ::[B] = null + var t: ::[B] = null + while (rest ne Nil) { + val it = f(rest.head).iterator + while (it.hasNext) { + val nx = new ::(it.next(), Nil) + if (t eq null) { + h = nx + } else { + t.next = nx + } + t = nx + } + rest = rest.tail + } + if (h eq null) Nil else {releaseFence(); h} + } + + @inline final override def takeWhile(p: A => Boolean): List[A] = { + val b = new ListBuffer[A] + var these = this + while (!these.isEmpty && p(these.head)) { + b += these.head + these = these.tail + } + b.toList + } + + @inline final override def span(p: A => Boolean): (List[A], List[A]) = { + val b = new ListBuffer[A] + var these = this + while (!these.isEmpty && p(these.head)) { + b += these.head + these = these.tail + } + (b.toList, these) + } + + // Overridden with an implementation identical to the inherited one (at this time) + // solely so it can be finalized and thus inlinable. + @inline final override def foreach[U](f: A => U): Unit = { + var these = this + while (!these.isEmpty) { + f(these.head) + these = these.tail + } + } + + final override def reverse: List[A] = { + var result: List[A] = Nil + var these = this + while (!these.isEmpty) { + result = these.head :: result + these = these.tail + } + result + } + + final override def foldRight[B](z: B)(op: (A, B) => B): B = { + var acc = z + var these: List[A] = reverse + while (!these.isEmpty) { + acc = op(these.head, acc) + these = these.tail + } + acc + } + + // Copy/Paste overrides to avoid interface calls inside loops. + + override final def length: Int = { + var these = this + var len = 0 + while (!these.isEmpty) { + len += 1 + these = these.tail + } + len + } + + override final def lengthCompare(len: Int): Int = { + @tailrec def loop(i: Int, xs: List[A]): Int = { + if (i == len) + if (xs.isEmpty) 0 else 1 + else if (xs.isEmpty) + -1 + else + loop(i + 1, xs.tail) + } + if (len < 0) 1 + else loop(0, coll) + } + + override final def forall(p: A => Boolean): Boolean = { + var these: List[A] = this + while (!these.isEmpty) { + if (!p(these.head)) return false + these = these.tail + } + true + } + + override final def exists(p: A => Boolean): Boolean = { + var these: List[A] = this + while (!these.isEmpty) { + if (p(these.head)) return true + these = these.tail + } + false + } + + override final def contains[A1 >: A](elem: A1): Boolean = { + var these: List[A] = this + while (!these.isEmpty) { + if (these.head == elem) return true + these = these.tail + } + false + } + + override final def find(p: A => Boolean): Option[A] = { + var these: List[A] = this + while (!these.isEmpty) { + if (p(these.head)) return Some(these.head) + these = these.tail + } + None + } +} +// Internal code that mutates `next` _must_ call `Statics.releaseFence()` if either immediately, or +// before a newly-allocated, thread-local :: instance is aliased (e.g. in ListBuffer.toList) +final case class :: [+A](override val head: A, private[scala] var next: List[A @uncheckedVariance]) // sound because `next` is used only locally + extends List[A] { + releaseFence() + override def headOption: Some[A] = Some(head) + override def tail: List[A] = next +} + +case object Nil extends List[Nothing] { + override def head: Nothing = throw new NoSuchElementException("head of empty list") + override def headOption: None.type = None + override def tail: Nothing = throw new UnsupportedOperationException("tail of empty list") + override def last: Nothing = throw new NoSuchElementException("last of empty list") + override def init: Nothing = throw new UnsupportedOperationException("init of empty list") + override def knownSize: Int = 0 + override def iterator: Iterator[Nothing] = Iterator.empty + override def unzip[A1, A2](implicit asPair: Nothing => (A1, A2)): (List[A1], List[A2]) = EmptyUnzip + + @transient + private[this] val EmptyUnzip = (Nil, Nil) +} + +/** + * $factoryInfo + * @define coll list + * @define Coll `List` + */ +@SerialVersionUID(3L) +object List extends StrictOptimizedSeqFactory[List] { + private val TupleOfNil = (Nil, Nil) + + def from[B](coll: collection.IterableOnce[B]): List[B] = coll match { + case coll: List[B] => coll + case _ if coll.knownSize == 0 => empty[B] + case b: ListBuffer[B] => b.toList + case _ => ListBuffer.from(coll).toList + } + + def newBuilder[A]: Builder[A, List[A]] = new ListBuffer() + + def empty[A]: List[A] = Nil + + @transient + private[collection] val partialNotApplied = new Function1[Any, Any] { def apply(x: Any): Any = this } +} diff --git a/pmd-scala/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/List.txt b/pmd-scala/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/List.txt new file mode 100644 index 0000000000..e8aadb608f --- /dev/null +++ b/pmd-scala/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/List.txt @@ -0,0 +1,1634 @@ +└─ Source + └─ Pkg + ├─ TermName + └─ Pkg + ├─ TermName + └─ Pkg + ├─ TermName + ├─ Import + │ └─ Importer + │ ├─ TermSelect + │ │ ├─ TermSelect + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ └─ TermName + │ └─ ImporteeName + │ └─ NameIndeterminate + ├─ Import + │ └─ Importer + │ ├─ TermSelect + │ │ ├─ TermName + │ │ └─ TermName + │ └─ ImporteeName + │ └─ NameIndeterminate + ├─ Import + │ └─ Importer + │ ├─ TermName + │ ├─ ImporteeName + │ │ └─ NameIndeterminate + │ └─ ImporteeName + │ └─ NameIndeterminate + ├─ Import + │ └─ Importer + │ ├─ TermSelect + │ │ ├─ TermSelect + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ └─ TermName + │ └─ ImporteeName + │ └─ NameIndeterminate + ├─ Import + │ └─ Importer + │ ├─ TermSelect + │ │ ├─ TermSelect + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ └─ TermName + │ └─ ImporteeName + │ └─ NameIndeterminate + ├─ DefnClass + │ ├─ ModAnnot + │ │ └─ Init + │ │ ├─ TypeName + │ │ ├─ NameAnonymous + │ │ └─ LitLong + │ ├─ ModSealed + │ ├─ ModAbstract + │ ├─ TypeName + │ ├─ TypeParam + │ │ ├─ ModCovariant + │ │ ├─ TypeName + │ │ └─ TypeBounds + │ ├─ CtorPrimary + │ │ └─ NameAnonymous + │ └─ Template + │ ├─ Init + │ │ ├─ TypeApply + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ └─ NameAnonymous + │ ├─ Init + │ │ ├─ TypeApply + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ └─ NameAnonymous + │ ├─ Init + │ │ ├─ TypeApply + │ │ │ ├─ TypeName + │ │ │ ├─ TypeName + │ │ │ ├─ TypeName + │ │ │ └─ TypeApply + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ └─ NameAnonymous + │ ├─ Init + │ │ ├─ TypeApply + │ │ │ ├─ TypeName + │ │ │ ├─ TypeName + │ │ │ ├─ TypeName + │ │ │ └─ TypeApply + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ └─ NameAnonymous + │ ├─ Init + │ │ ├─ TypeApply + │ │ │ ├─ TypeName + │ │ │ ├─ TypeName + │ │ │ ├─ TypeName + │ │ │ └─ TypeApply + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ └─ NameAnonymous + │ ├─ Init + │ │ ├─ TypeApply + │ │ │ ├─ TypeName + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ └─ NameAnonymous + │ ├─ Init + │ │ ├─ TypeName + │ │ └─ NameAnonymous + │ ├─ Self + │ │ └─ NameAnonymous + │ ├─ DefnDef + │ │ ├─ ModOverride + │ │ ├─ TermName + │ │ ├─ TypeApply + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ └─ TermName + │ ├─ DefnDef + │ │ ├─ ModOverride + │ │ ├─ TermName + │ │ ├─ TermParam + │ │ │ ├─ TermName + │ │ │ └─ TypeName + │ │ ├─ TypeApply + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ └─ TermIf + │ │ ├─ TermApplyInfix + │ │ │ ├─ TermName + │ │ │ ├─ TermName + │ │ │ └─ TermApplyInfix + │ │ │ ├─ TermName + │ │ │ ├─ TermName + │ │ │ └─ LitInt + │ │ ├─ TermName + │ │ └─ TermBlock + │ │ ├─ DefnVal + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ └─ TermNew + │ │ │ └─ Init + │ │ │ ├─ TypeName + │ │ │ ├─ NameAnonymous + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ ├─ DefnVar + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ └─ TermName + │ │ ├─ DefnVar + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ └─ TermName + │ │ ├─ DefnVar + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ └─ LitInt + │ │ ├─ TermWhile + │ │ │ ├─ TermBlock + │ │ │ │ ├─ TermIf + │ │ │ │ │ ├─ TermSelect + │ │ │ │ │ │ ├─ TermName + │ │ │ │ │ │ └─ TermName + │ │ │ │ │ ├─ TermReturn + │ │ │ │ │ │ └─ TermThis + │ │ │ │ │ │ └─ NameAnonymous + │ │ │ │ │ └─ LitUnit + │ │ │ │ └─ TermApplyInfix + │ │ │ │ ├─ TermName + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ └─ TermBlock + │ │ │ ├─ TermApplyInfix + │ │ │ │ ├─ TermName + │ │ │ │ ├─ TermName + │ │ │ │ └─ LitInt + │ │ │ ├─ DefnVal + │ │ │ │ ├─ PatVar + │ │ │ │ │ └─ TermName + │ │ │ │ └─ TermNew + │ │ │ │ └─ Init + │ │ │ │ ├─ TypeName + │ │ │ │ ├─ NameAnonymous + │ │ │ │ ├─ TermSelect + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermName + │ │ │ │ └─ TermName + │ │ │ ├─ TermAssign + │ │ │ │ ├─ TermSelect + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermName + │ │ │ │ └─ TermName + │ │ │ ├─ TermAssign + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ └─ TermAssign + │ │ │ ├─ TermName + │ │ │ └─ TermSelect + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ ├─ TermApply + │ │ │ └─ TermName + │ │ └─ TermName + │ ├─ DefnDef + │ │ ├─ ModOverride + │ │ ├─ TermName + │ │ ├─ TermParam + │ │ │ ├─ TermName + │ │ │ └─ TypeName + │ │ ├─ TermParam + │ │ │ ├─ TermName + │ │ │ └─ TypeName + │ │ ├─ TypeApply + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ └─ TermBlock + │ │ ├─ DefnVal + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ └─ TermApply + │ │ │ ├─ TermSelect + │ │ │ │ ├─ TermSelect + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermName + │ │ │ │ └─ TermName + │ │ │ ├─ TermName + │ │ │ └─ LitInt + │ │ └─ TermIf + │ │ ├─ TermApplyInfix + │ │ │ ├─ TermApplyInfix + │ │ │ │ ├─ TermName + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ ├─ TermName + │ │ └─ TermApplyInfix + │ │ ├─ TermApplyInfix + │ │ │ ├─ TermThis + │ │ │ │ └─ NameAnonymous + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ ├─ TermName + │ │ └─ TermApplyInfix + │ │ ├─ TermName + │ │ ├─ TermName + │ │ └─ TermName + │ ├─ DefnDef + │ │ ├─ ModOverride + │ │ ├─ TermName + │ │ ├─ TermParam + │ │ │ ├─ TermName + │ │ │ └─ TypeName + │ │ ├─ TypeApply + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ └─ TermBlock + │ │ ├─ DefnDef + │ │ │ ├─ ModAnnot + │ │ │ │ └─ Init + │ │ │ │ ├─ TypeName + │ │ │ │ └─ NameAnonymous + │ │ │ ├─ TermName + │ │ │ ├─ TermParam + │ │ │ │ ├─ TermName + │ │ │ │ └─ TypeApply + │ │ │ │ ├─ TypeName + │ │ │ │ └─ TypeName + │ │ │ ├─ TermParam + │ │ │ │ ├─ TermName + │ │ │ │ └─ TypeApply + │ │ │ │ ├─ TypeName + │ │ │ │ └─ TypeName + │ │ │ ├─ TypeApply + │ │ │ │ ├─ TypeName + │ │ │ │ └─ TypeName + │ │ │ └─ TermMatch + │ │ │ ├─ TermName + │ │ │ ├─ Case + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ └─ Case + │ │ │ ├─ PatExtractInfix + │ │ │ │ ├─ PatWildcard + │ │ │ │ ├─ TermName + │ │ │ │ └─ PatVar + │ │ │ │ └─ TermName + │ │ │ └─ TermApply + │ │ │ ├─ TermName + │ │ │ ├─ TermName + │ │ │ └─ TermSelect + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ └─ TermApply + │ │ ├─ TermName + │ │ ├─ TermApply + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ └─ TermThis + │ │ └─ NameAnonymous + │ ├─ DefnDef + │ │ ├─ ModOverride + │ │ ├─ TermName + │ │ ├─ TermParam + │ │ │ ├─ TermName + │ │ │ └─ TypeName + │ │ ├─ TypeTuple + │ │ │ ├─ TypeApply + │ │ │ │ ├─ TypeName + │ │ │ │ └─ TypeName + │ │ │ └─ TypeApply + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ └─ TermBlock + │ │ ├─ DefnVal + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ └─ TermNew + │ │ │ └─ Init + │ │ │ ├─ TypeApply + │ │ │ │ ├─ TypeName + │ │ │ │ └─ TypeName + │ │ │ └─ NameAnonymous + │ │ ├─ DefnVar + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ └─ LitInt + │ │ ├─ DefnVar + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ └─ TermThis + │ │ │ └─ NameAnonymous + │ │ ├─ TermWhile + │ │ │ ├─ TermApplyInfix + │ │ │ │ ├─ TermApplyUnary + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermSelect + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermName + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermApplyInfix + │ │ │ │ ├─ TermName + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ └─ TermBlock + │ │ │ ├─ TermApplyInfix + │ │ │ │ ├─ TermName + │ │ │ │ ├─ TermName + │ │ │ │ └─ LitInt + │ │ │ ├─ TermApplyInfix + │ │ │ │ ├─ TermName + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermSelect + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ └─ TermAssign + │ │ │ ├─ TermName + │ │ │ └─ TermSelect + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ └─ TermTuple + │ │ ├─ TermSelect + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ └─ TermName + │ ├─ DefnDef + │ │ ├─ ModOverride + │ │ ├─ TermName + │ │ ├─ TypeParam + │ │ │ ├─ TypeName + │ │ │ └─ TypeBounds + │ │ │ └─ TypeName + │ │ ├─ TermParam + │ │ │ ├─ TermName + │ │ │ └─ TypeName + │ │ ├─ TermParam + │ │ │ ├─ TermName + │ │ │ └─ TypeName + │ │ ├─ TypeApply + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ └─ TermBlock + │ │ ├─ DefnVar + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ └─ LitInt + │ │ ├─ DefnVar + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ └─ TermThis + │ │ │ └─ NameAnonymous + │ │ ├─ DefnVal + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ └─ TermApplyType + │ │ │ ├─ TermSelect + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ └─ TypeName + │ │ ├─ TermWhile + │ │ │ ├─ TermApplyInfix + │ │ │ │ ├─ TermApplyInfix + │ │ │ │ │ ├─ TermName + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermName + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermSelect + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ └─ TermBlock + │ │ │ ├─ TermApplyInfix + │ │ │ │ ├─ TermName + │ │ │ │ ├─ TermName + │ │ │ │ └─ LitInt + │ │ │ ├─ TermApplyInfix + │ │ │ │ ├─ TermName + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermSelect + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ └─ TermAssign + │ │ │ ├─ TermName + │ │ │ └─ TermSelect + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ └─ TermIf + │ │ ├─ TermApplyInfix + │ │ │ ├─ TermApplyInfix + │ │ │ │ ├─ TermName + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ ├─ TermName + │ │ │ └─ TermSelect + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ ├─ TermBlock + │ │ │ └─ TermApply + │ │ │ ├─ TermSelect + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ └─ TermApplyInfix + │ │ │ ├─ TermName + │ │ │ ├─ TermName + │ │ │ └─ TermSelect + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ └─ TermBlock + │ │ └─ TermThrow + │ │ └─ TermNew + │ │ └─ Init + │ │ ├─ TypeName + │ │ ├─ NameAnonymous + │ │ └─ TermInterpolate + │ │ ├─ TermName + │ │ ├─ LitString + │ │ ├─ LitString + │ │ ├─ LitString + │ │ ├─ TermName + │ │ └─ TermApplyInfix + │ │ ├─ TermName + │ │ ├─ TermName + │ │ └─ TermApplyInfix + │ │ ├─ TermName + │ │ ├─ TermName + │ │ └─ LitInt + │ ├─ DefnDef + │ │ ├─ ModFinal + │ │ ├─ ModOverride + │ │ ├─ TermName + │ │ ├─ TypeParam + │ │ │ ├─ TypeName + │ │ │ └─ TypeBounds + │ │ ├─ TermParam + │ │ │ ├─ TermName + │ │ │ └─ TypeFunction + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ ├─ TypeApply + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ └─ TermBlock + │ │ └─ TermIf + │ │ ├─ TermApplyInfix + │ │ │ ├─ TermThis + │ │ │ │ └─ NameAnonymous + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ ├─ TermName + │ │ └─ TermBlock + │ │ ├─ DefnVal + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ └─ TermNew + │ │ │ └─ Init + │ │ │ ├─ TypeApply + │ │ │ │ ├─ TypeName + │ │ │ │ └─ TypeName + │ │ │ ├─ NameAnonymous + │ │ │ ├─ TermApply + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ └─ TermName + │ │ ├─ DefnVar + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ ├─ TypeApply + │ │ │ │ ├─ TypeName + │ │ │ │ └─ TypeName + │ │ │ └─ TermName + │ │ ├─ DefnVar + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ └─ TermName + │ │ ├─ TermWhile + │ │ │ ├─ TermApplyInfix + │ │ │ │ ├─ TermName + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ └─ TermBlock + │ │ │ ├─ DefnVal + │ │ │ │ ├─ PatVar + │ │ │ │ │ └─ TermName + │ │ │ │ └─ TermNew + │ │ │ │ └─ Init + │ │ │ │ ├─ TypeName + │ │ │ │ ├─ NameAnonymous + │ │ │ │ ├─ TermApply + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermSelect + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermName + │ │ │ │ └─ TermName + │ │ │ ├─ TermAssign + │ │ │ │ ├─ TermSelect + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermName + │ │ │ │ └─ TermName + │ │ │ ├─ TermAssign + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ └─ TermAssign + │ │ │ ├─ TermName + │ │ │ └─ TermSelect + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ ├─ TermApply + │ │ │ └─ TermName + │ │ └─ TermName + │ ├─ DefnDef + │ │ ├─ ModFinal + │ │ ├─ ModOverride + │ │ ├─ TermName + │ │ ├─ TypeParam + │ │ │ ├─ TypeName + │ │ │ └─ TypeBounds + │ │ ├─ TermParam + │ │ │ ├─ TermName + │ │ │ └─ TypeApply + │ │ │ ├─ TypeName + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ ├─ TypeApply + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ └─ TermBlock + │ │ └─ TermIf + │ │ ├─ TermApplyInfix + │ │ │ ├─ TermThis + │ │ │ │ └─ NameAnonymous + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ ├─ TermName + │ │ └─ TermBlock + │ │ ├─ DefnVar + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ └─ TermThis + │ │ │ └─ NameAnonymous + │ │ ├─ DefnVar + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ ├─ TypeApply + │ │ │ │ ├─ TypeName + │ │ │ │ └─ TypeName + │ │ │ └─ LitNull + │ │ ├─ DefnVar + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ ├─ TypeName + │ │ │ └─ LitNull + │ │ ├─ TermWhile + │ │ │ ├─ TermApplyInfix + │ │ │ │ ├─ TermName + │ │ │ │ ├─ TermName + │ │ │ │ └─ LitNull + │ │ │ └─ TermBlock + │ │ │ ├─ TermAssign + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermApply + │ │ │ │ ├─ TermSelect + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermName + │ │ │ │ ├─ TermSelect + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermName + │ │ │ │ └─ TermSelect + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ ├─ TermIf + │ │ │ │ ├─ TermApplyInfix + │ │ │ │ │ ├─ TermApplyType + │ │ │ │ │ │ ├─ TermSelect + │ │ │ │ │ │ │ ├─ TermName + │ │ │ │ │ │ │ └─ TermName + │ │ │ │ │ │ └─ TypeName + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermSelect + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermName + │ │ │ │ ├─ TermAssign + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermNew + │ │ │ │ │ └─ Init + │ │ │ │ │ ├─ TypeName + │ │ │ │ │ ├─ NameAnonymous + │ │ │ │ │ ├─ TermApplyType + │ │ │ │ │ │ ├─ TermSelect + │ │ │ │ │ │ │ ├─ TermName + │ │ │ │ │ │ │ └─ TermName + │ │ │ │ │ │ └─ TypeName + │ │ │ │ │ └─ TermName + │ │ │ │ └─ LitUnit + │ │ │ ├─ TermAssign + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermSelect + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ └─ TermIf + │ │ │ ├─ TermApplyInfix + │ │ │ │ ├─ TermName + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ ├─ TermReturn + │ │ │ │ └─ TermIf + │ │ │ │ ├─ TermApplyInfix + │ │ │ │ │ ├─ TermName + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ LitNull + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ └─ LitUnit + │ │ ├─ DefnVar + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ └─ TermName + │ │ ├─ TermWhile + │ │ │ ├─ TermApplyInfix + │ │ │ │ ├─ TermName + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ └─ TermBlock + │ │ │ ├─ TermAssign + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermApply + │ │ │ │ ├─ TermSelect + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermName + │ │ │ │ ├─ TermSelect + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermName + │ │ │ │ └─ TermSelect + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ ├─ TermIf + │ │ │ │ ├─ TermApplyInfix + │ │ │ │ │ ├─ TermApplyType + │ │ │ │ │ │ ├─ TermSelect + │ │ │ │ │ │ │ ├─ TermName + │ │ │ │ │ │ │ └─ TermName + │ │ │ │ │ │ └─ TypeName + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermSelect + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermName + │ │ │ │ ├─ TermBlock + │ │ │ │ │ ├─ DefnVal + │ │ │ │ │ │ ├─ PatVar + │ │ │ │ │ │ │ └─ TermName + │ │ │ │ │ │ └─ TermNew + │ │ │ │ │ │ └─ Init + │ │ │ │ │ │ ├─ TypeName + │ │ │ │ │ │ ├─ NameAnonymous + │ │ │ │ │ │ ├─ TermApplyType + │ │ │ │ │ │ │ ├─ TermSelect + │ │ │ │ │ │ │ │ ├─ TermName + │ │ │ │ │ │ │ │ └─ TermName + │ │ │ │ │ │ │ └─ TypeName + │ │ │ │ │ │ └─ TermName + │ │ │ │ │ ├─ TermAssign + │ │ │ │ │ │ ├─ TermSelect + │ │ │ │ │ │ │ ├─ TermName + │ │ │ │ │ │ │ └─ TermName + │ │ │ │ │ │ └─ TermName + │ │ │ │ │ └─ TermAssign + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermName + │ │ │ │ └─ LitUnit + │ │ │ └─ TermAssign + │ │ │ ├─ TermName + │ │ │ └─ TermSelect + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ ├─ TermApply + │ │ │ └─ TermName + │ │ └─ TermName + │ ├─ DefnDef + │ │ ├─ ModFinal + │ │ ├─ ModOverride + │ │ ├─ TermName + │ │ ├─ TypeParam + │ │ │ ├─ TypeName + │ │ │ └─ TypeBounds + │ │ ├─ TermParam + │ │ │ ├─ TermName + │ │ │ └─ TypeFunction + │ │ │ ├─ TypeName + │ │ │ └─ TypeApply + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ ├─ TypeApply + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ └─ TermBlock + │ │ ├─ DefnVar + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ └─ TermThis + │ │ │ └─ NameAnonymous + │ │ ├─ DefnVar + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ ├─ TypeApply + │ │ │ │ ├─ TypeName + │ │ │ │ └─ TypeName + │ │ │ └─ LitNull + │ │ ├─ DefnVar + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ ├─ TypeApply + │ │ │ │ ├─ TypeName + │ │ │ │ └─ TypeName + │ │ │ └─ LitNull + │ │ ├─ TermWhile + │ │ │ ├─ TermApplyInfix + │ │ │ │ ├─ TermName + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ └─ TermBlock + │ │ │ ├─ DefnVal + │ │ │ │ ├─ PatVar + │ │ │ │ │ └─ TermName + │ │ │ │ └─ TermSelect + │ │ │ │ ├─ TermApply + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermSelect + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermName + │ │ │ │ └─ TermName + │ │ │ ├─ TermWhile + │ │ │ │ ├─ TermSelect + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermName + │ │ │ │ └─ TermBlock + │ │ │ │ ├─ DefnVal + │ │ │ │ │ ├─ PatVar + │ │ │ │ │ │ └─ TermName + │ │ │ │ │ └─ TermNew + │ │ │ │ │ └─ Init + │ │ │ │ │ ├─ TypeName + │ │ │ │ │ ├─ NameAnonymous + │ │ │ │ │ ├─ TermApply + │ │ │ │ │ │ └─ TermSelect + │ │ │ │ │ │ ├─ TermName + │ │ │ │ │ │ └─ TermName + │ │ │ │ │ └─ TermName + │ │ │ │ ├─ TermIf + │ │ │ │ │ ├─ TermApplyInfix + │ │ │ │ │ │ ├─ TermName + │ │ │ │ │ │ ├─ TermName + │ │ │ │ │ │ └─ LitNull + │ │ │ │ │ ├─ TermBlock + │ │ │ │ │ │ └─ TermAssign + │ │ │ │ │ │ ├─ TermName + │ │ │ │ │ │ └─ TermName + │ │ │ │ │ └─ TermBlock + │ │ │ │ │ └─ TermAssign + │ │ │ │ │ ├─ TermSelect + │ │ │ │ │ │ ├─ TermName + │ │ │ │ │ │ └─ TermName + │ │ │ │ │ └─ TermName + │ │ │ │ └─ TermAssign + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ └─ TermAssign + │ │ │ ├─ TermName + │ │ │ └─ TermSelect + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ └─ TermIf + │ │ ├─ TermApplyInfix + │ │ │ ├─ TermName + │ │ │ ├─ TermName + │ │ │ └─ LitNull + │ │ ├─ TermName + │ │ └─ TermBlock + │ │ ├─ TermApply + │ │ │ └─ TermName + │ │ └─ TermName + │ ├─ DefnDef + │ │ ├─ ModAnnot + │ │ │ └─ Init + │ │ │ ├─ TypeName + │ │ │ └─ NameAnonymous + │ │ ├─ ModFinal + │ │ ├─ ModOverride + │ │ ├─ TermName + │ │ ├─ TermParam + │ │ │ ├─ TermName + │ │ │ └─ TypeFunction + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ ├─ TypeApply + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ └─ TermBlock + │ │ ├─ DefnVal + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ └─ TermNew + │ │ │ └─ Init + │ │ │ ├─ TypeApply + │ │ │ │ ├─ TypeName + │ │ │ │ └─ TypeName + │ │ │ └─ NameAnonymous + │ │ ├─ DefnVar + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ └─ TermThis + │ │ │ └─ NameAnonymous + │ │ ├─ TermWhile + │ │ │ ├─ TermApplyInfix + │ │ │ │ ├─ TermApplyUnary + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermSelect + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermName + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermApply + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermSelect + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ └─ TermBlock + │ │ │ ├─ TermApplyInfix + │ │ │ │ ├─ TermName + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermSelect + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ └─ TermAssign + │ │ │ ├─ TermName + │ │ │ └─ TermSelect + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ └─ TermSelect + │ │ ├─ TermName + │ │ └─ TermName + │ ├─ DefnDef + │ │ ├─ ModAnnot + │ │ │ └─ Init + │ │ │ ├─ TypeName + │ │ │ └─ NameAnonymous + │ │ ├─ ModFinal + │ │ ├─ ModOverride + │ │ ├─ TermName + │ │ ├─ TermParam + │ │ │ ├─ TermName + │ │ │ └─ TypeFunction + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ ├─ TypeTuple + │ │ │ ├─ TypeApply + │ │ │ │ ├─ TypeName + │ │ │ │ └─ TypeName + │ │ │ └─ TypeApply + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ └─ TermBlock + │ │ ├─ DefnVal + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ └─ TermNew + │ │ │ └─ Init + │ │ │ ├─ TypeApply + │ │ │ │ ├─ TypeName + │ │ │ │ └─ TypeName + │ │ │ └─ NameAnonymous + │ │ ├─ DefnVar + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ └─ TermThis + │ │ │ └─ NameAnonymous + │ │ ├─ TermWhile + │ │ │ ├─ TermApplyInfix + │ │ │ │ ├─ TermApplyUnary + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermSelect + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermName + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermApply + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermSelect + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ └─ TermBlock + │ │ │ ├─ TermApplyInfix + │ │ │ │ ├─ TermName + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermSelect + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ └─ TermAssign + │ │ │ ├─ TermName + │ │ │ └─ TermSelect + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ └─ TermTuple + │ │ ├─ TermSelect + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ └─ TermName + │ ├─ DefnDef + │ │ ├─ ModAnnot + │ │ │ └─ Init + │ │ │ ├─ TypeName + │ │ │ └─ NameAnonymous + │ │ ├─ ModFinal + │ │ ├─ ModOverride + │ │ ├─ TermName + │ │ ├─ TypeParam + │ │ │ ├─ TypeName + │ │ │ └─ TypeBounds + │ │ ├─ TermParam + │ │ │ ├─ TermName + │ │ │ └─ TypeFunction + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ ├─ TypeName + │ │ └─ TermBlock + │ │ ├─ DefnVar + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ └─ TermThis + │ │ │ └─ NameAnonymous + │ │ └─ TermWhile + │ │ ├─ TermApplyUnary + │ │ │ ├─ TermName + │ │ │ └─ TermSelect + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ └─ TermBlock + │ │ ├─ TermApply + │ │ │ ├─ TermName + │ │ │ └─ TermSelect + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ └─ TermAssign + │ │ ├─ TermName + │ │ └─ TermSelect + │ │ ├─ TermName + │ │ └─ TermName + │ ├─ DefnDef + │ │ ├─ ModFinal + │ │ ├─ ModOverride + │ │ ├─ TermName + │ │ ├─ TypeApply + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ └─ TermBlock + │ │ ├─ DefnVar + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ ├─ TypeApply + │ │ │ │ ├─ TypeName + │ │ │ │ └─ TypeName + │ │ │ └─ TermName + │ │ ├─ DefnVar + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ └─ TermThis + │ │ │ └─ NameAnonymous + │ │ ├─ TermWhile + │ │ │ ├─ TermApplyUnary + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermSelect + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ └─ TermBlock + │ │ │ ├─ TermAssign + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermApplyInfix + │ │ │ │ ├─ TermSelect + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermName + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ └─ TermAssign + │ │ │ ├─ TermName + │ │ │ └─ TermSelect + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ └─ TermName + │ ├─ DefnDef + │ │ ├─ ModFinal + │ │ ├─ ModOverride + │ │ ├─ TermName + │ │ ├─ TypeParam + │ │ │ ├─ TypeName + │ │ │ └─ TypeBounds + │ │ ├─ TermParam + │ │ │ ├─ TermName + │ │ │ └─ TypeName + │ │ ├─ TermParam + │ │ │ ├─ TermName + │ │ │ └─ TypeFunction + │ │ │ ├─ TypeName + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ ├─ TypeName + │ │ └─ TermBlock + │ │ ├─ DefnVar + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ └─ TermName + │ │ ├─ DefnVar + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ ├─ TypeApply + │ │ │ │ ├─ TypeName + │ │ │ │ └─ TypeName + │ │ │ └─ TermName + │ │ ├─ TermWhile + │ │ │ ├─ TermApplyUnary + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermSelect + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ └─ TermBlock + │ │ │ ├─ TermAssign + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermApply + │ │ │ │ ├─ TermName + │ │ │ │ ├─ TermSelect + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermName + │ │ │ │ └─ TermName + │ │ │ └─ TermAssign + │ │ │ ├─ TermName + │ │ │ └─ TermSelect + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ └─ TermName + │ ├─ DefnDef + │ │ ├─ ModOverride + │ │ ├─ ModFinal + │ │ ├─ TermName + │ │ ├─ TypeName + │ │ └─ TermBlock + │ │ ├─ DefnVar + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ └─ TermThis + │ │ │ └─ NameAnonymous + │ │ ├─ DefnVar + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ └─ LitInt + │ │ ├─ TermWhile + │ │ │ ├─ TermApplyUnary + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermSelect + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ └─ TermBlock + │ │ │ ├─ TermApplyInfix + │ │ │ │ ├─ TermName + │ │ │ │ ├─ TermName + │ │ │ │ └─ LitInt + │ │ │ └─ TermAssign + │ │ │ ├─ TermName + │ │ │ └─ TermSelect + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ └─ TermName + │ ├─ DefnDef + │ │ ├─ ModOverride + │ │ ├─ ModFinal + │ │ ├─ TermName + │ │ ├─ TermParam + │ │ │ ├─ TermName + │ │ │ └─ TypeName + │ │ ├─ TypeName + │ │ └─ TermBlock + │ │ ├─ DefnDef + │ │ │ ├─ ModAnnot + │ │ │ │ └─ Init + │ │ │ │ ├─ TypeName + │ │ │ │ └─ NameAnonymous + │ │ │ ├─ TermName + │ │ │ ├─ TermParam + │ │ │ │ ├─ TermName + │ │ │ │ └─ TypeName + │ │ │ ├─ TermParam + │ │ │ │ ├─ TermName + │ │ │ │ └─ TypeApply + │ │ │ │ ├─ TypeName + │ │ │ │ └─ TypeName + │ │ │ ├─ TypeName + │ │ │ └─ TermBlock + │ │ │ └─ TermIf + │ │ │ ├─ TermApplyInfix + │ │ │ │ ├─ TermName + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ ├─ TermIf + │ │ │ │ ├─ TermSelect + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermName + │ │ │ │ ├─ LitInt + │ │ │ │ └─ LitInt + │ │ │ └─ TermIf + │ │ │ ├─ TermSelect + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ ├─ LitInt + │ │ │ └─ TermApply + │ │ │ ├─ TermName + │ │ │ ├─ TermApplyInfix + │ │ │ │ ├─ TermName + │ │ │ │ ├─ TermName + │ │ │ │ └─ LitInt + │ │ │ └─ TermSelect + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ └─ TermIf + │ │ ├─ TermApplyInfix + │ │ │ ├─ TermName + │ │ │ ├─ TermName + │ │ │ └─ LitInt + │ │ ├─ LitInt + │ │ └─ TermApply + │ │ ├─ TermName + │ │ ├─ LitInt + │ │ └─ TermName + │ ├─ DefnDef + │ │ ├─ ModOverride + │ │ ├─ ModFinal + │ │ ├─ TermName + │ │ ├─ TermParam + │ │ │ ├─ TermName + │ │ │ └─ TypeFunction + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ ├─ TypeName + │ │ └─ TermBlock + │ │ ├─ DefnVar + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ ├─ TypeApply + │ │ │ │ ├─ TypeName + │ │ │ │ └─ TypeName + │ │ │ └─ TermThis + │ │ │ └─ NameAnonymous + │ │ ├─ TermWhile + │ │ │ ├─ TermApplyUnary + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermSelect + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ └─ TermBlock + │ │ │ ├─ TermIf + │ │ │ │ ├─ TermApplyUnary + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermApply + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermSelect + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermName + │ │ │ │ ├─ TermReturn + │ │ │ │ │ └─ LitBoolean + │ │ │ │ └─ LitUnit + │ │ │ └─ TermAssign + │ │ │ ├─ TermName + │ │ │ └─ TermSelect + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ └─ LitBoolean + │ ├─ DefnDef + │ │ ├─ ModOverride + │ │ ├─ ModFinal + │ │ ├─ TermName + │ │ ├─ TermParam + │ │ │ ├─ TermName + │ │ │ └─ TypeFunction + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ ├─ TypeName + │ │ └─ TermBlock + │ │ ├─ DefnVar + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ ├─ TypeApply + │ │ │ │ ├─ TypeName + │ │ │ │ └─ TypeName + │ │ │ └─ TermThis + │ │ │ └─ NameAnonymous + │ │ ├─ TermWhile + │ │ │ ├─ TermApplyUnary + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermSelect + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ └─ TermBlock + │ │ │ ├─ TermIf + │ │ │ │ ├─ TermApply + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermSelect + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermName + │ │ │ │ ├─ TermReturn + │ │ │ │ │ └─ LitBoolean + │ │ │ │ └─ LitUnit + │ │ │ └─ TermAssign + │ │ │ ├─ TermName + │ │ │ └─ TermSelect + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ └─ LitBoolean + │ ├─ DefnDef + │ │ ├─ ModOverride + │ │ ├─ ModFinal + │ │ ├─ TermName + │ │ ├─ TypeParam + │ │ │ ├─ TypeName + │ │ │ └─ TypeBounds + │ │ │ └─ TypeName + │ │ ├─ TermParam + │ │ │ ├─ TermName + │ │ │ └─ TypeName + │ │ ├─ TypeName + │ │ └─ TermBlock + │ │ ├─ DefnVar + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ ├─ TypeApply + │ │ │ │ ├─ TypeName + │ │ │ │ └─ TypeName + │ │ │ └─ TermThis + │ │ │ └─ NameAnonymous + │ │ ├─ TermWhile + │ │ │ ├─ TermApplyUnary + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermSelect + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ └─ TermBlock + │ │ │ ├─ TermIf + │ │ │ │ ├─ TermApplyInfix + │ │ │ │ │ ├─ TermSelect + │ │ │ │ │ │ ├─ TermName + │ │ │ │ │ │ └─ TermName + │ │ │ │ │ ├─ TermName + │ │ │ │ │ └─ TermName + │ │ │ │ ├─ TermReturn + │ │ │ │ │ └─ LitBoolean + │ │ │ │ └─ LitUnit + │ │ │ └─ TermAssign + │ │ │ ├─ TermName + │ │ │ └─ TermSelect + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ └─ LitBoolean + │ └─ DefnDef + │ ├─ ModOverride + │ ├─ ModFinal + │ ├─ TermName + │ ├─ TermParam + │ │ ├─ TermName + │ │ └─ TypeFunction + │ │ ├─ TypeName + │ │ └─ TypeName + │ ├─ TypeApply + │ │ ├─ TypeName + │ │ └─ TypeName + │ └─ TermBlock + │ ├─ DefnVar + │ │ ├─ PatVar + │ │ │ └─ TermName + │ │ ├─ TypeApply + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ └─ TermThis + │ │ └─ NameAnonymous + │ ├─ TermWhile + │ │ ├─ TermApplyUnary + │ │ │ ├─ TermName + │ │ │ └─ TermSelect + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ └─ TermBlock + │ │ ├─ TermIf + │ │ │ ├─ TermApply + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermSelect + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ ├─ TermReturn + │ │ │ │ └─ TermApply + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermSelect + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ └─ LitUnit + │ │ └─ TermAssign + │ │ ├─ TermName + │ │ └─ TermSelect + │ │ ├─ TermName + │ │ └─ TermName + │ └─ TermName + ├─ DefnClass + │ ├─ ModFinal + │ ├─ ModCase + │ ├─ TypeName + │ ├─ TypeParam + │ │ ├─ ModCovariant + │ │ ├─ TypeName + │ │ └─ TypeBounds + │ ├─ CtorPrimary + │ │ ├─ NameAnonymous + │ │ ├─ TermParam + │ │ │ ├─ ModOverride + │ │ │ ├─ ModValParam + │ │ │ ├─ TermName + │ │ │ └─ TypeName + │ │ └─ TermParam + │ │ ├─ ModPrivate + │ │ │ └─ NameIndeterminate + │ │ ├─ ModVarParam + │ │ ├─ TermName + │ │ └─ TypeApply + │ │ ├─ TypeName + │ │ └─ TypeAnnotate + │ │ ├─ TypeName + │ │ └─ ModAnnot + │ │ └─ Init + │ │ ├─ TypeName + │ │ └─ NameAnonymous + │ └─ Template + │ ├─ Init + │ │ ├─ TypeApply + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ └─ NameAnonymous + │ ├─ Self + │ │ └─ NameAnonymous + │ ├─ TermApply + │ │ └─ TermName + │ ├─ DefnDef + │ │ ├─ ModOverride + │ │ ├─ TermName + │ │ ├─ TypeApply + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ └─ TermApply + │ │ ├─ TermName + │ │ └─ TermName + │ └─ DefnDef + │ ├─ ModOverride + │ ├─ TermName + │ ├─ TypeApply + │ │ ├─ TypeName + │ │ └─ TypeName + │ └─ TermName + ├─ DefnObject + │ ├─ ModCase + │ ├─ TermName + │ └─ Template + │ ├─ Init + │ │ ├─ TypeApply + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ └─ NameAnonymous + │ ├─ Self + │ │ └─ NameAnonymous + │ ├─ DefnDef + │ │ ├─ ModOverride + │ │ ├─ TermName + │ │ ├─ TypeName + │ │ └─ TermThrow + │ │ └─ TermNew + │ │ └─ Init + │ │ ├─ TypeName + │ │ ├─ NameAnonymous + │ │ └─ LitString + │ ├─ DefnDef + │ │ ├─ ModOverride + │ │ ├─ TermName + │ │ ├─ TypeSingleton + │ │ │ └─ TermName + │ │ └─ TermName + │ ├─ DefnDef + │ │ ├─ ModOverride + │ │ ├─ TermName + │ │ ├─ TypeName + │ │ └─ TermThrow + │ │ └─ TermNew + │ │ └─ Init + │ │ ├─ TypeName + │ │ ├─ NameAnonymous + │ │ └─ LitString + │ ├─ DefnDef + │ │ ├─ ModOverride + │ │ ├─ TermName + │ │ ├─ TypeName + │ │ └─ TermThrow + │ │ └─ TermNew + │ │ └─ Init + │ │ ├─ TypeName + │ │ ├─ NameAnonymous + │ │ └─ LitString + │ ├─ DefnDef + │ │ ├─ ModOverride + │ │ ├─ TermName + │ │ ├─ TypeName + │ │ └─ TermThrow + │ │ └─ TermNew + │ │ └─ Init + │ │ ├─ TypeName + │ │ ├─ NameAnonymous + │ │ └─ LitString + │ ├─ DefnDef + │ │ ├─ ModOverride + │ │ ├─ TermName + │ │ ├─ TypeName + │ │ └─ LitInt + │ ├─ DefnDef + │ │ ├─ ModOverride + │ │ ├─ TermName + │ │ ├─ TypeApply + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ └─ TermSelect + │ │ ├─ TermName + │ │ └─ TermName + │ ├─ DefnDef + │ │ ├─ ModOverride + │ │ ├─ TermName + │ │ ├─ TypeParam + │ │ │ ├─ TypeName + │ │ │ └─ TypeBounds + │ │ ├─ TypeParam + │ │ │ ├─ TypeName + │ │ │ └─ TypeBounds + │ │ ├─ TermParam + │ │ │ ├─ ModImplicit + │ │ │ ├─ TermName + │ │ │ └─ TypeFunction + │ │ │ ├─ TypeName + │ │ │ └─ TypeTuple + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ ├─ TypeTuple + │ │ │ ├─ TypeApply + │ │ │ │ ├─ TypeName + │ │ │ │ └─ TypeName + │ │ │ └─ TypeApply + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ └─ TermName + │ └─ DefnVal + │ ├─ ModAnnot + │ │ └─ Init + │ │ ├─ TypeName + │ │ └─ NameAnonymous + │ ├─ ModPrivate + │ │ └─ TermThis + │ │ └─ NameAnonymous + │ ├─ PatVar + │ │ └─ TermName + │ └─ TermTuple + │ ├─ TermName + │ └─ TermName + └─ DefnObject + ├─ ModAnnot + │ └─ Init + │ ├─ TypeName + │ ├─ NameAnonymous + │ └─ LitLong + ├─ TermName + └─ Template + ├─ Init + │ ├─ TypeApply + │ │ ├─ TypeName + │ │ └─ TypeName + │ └─ NameAnonymous + ├─ Self + │ └─ NameAnonymous + ├─ DefnVal + │ ├─ ModPrivate + │ │ └─ NameAnonymous + │ ├─ PatVar + │ │ └─ TermName + │ └─ TermTuple + │ ├─ TermName + │ └─ TermName + ├─ DefnDef + │ ├─ TermName + │ ├─ TypeParam + │ │ ├─ TypeName + │ │ └─ TypeBounds + │ ├─ TermParam + │ │ ├─ TermName + │ │ └─ TypeApply + │ │ ├─ TypeSelect + │ │ │ ├─ TermName + │ │ │ └─ TypeName + │ │ └─ TypeName + │ ├─ TypeApply + │ │ ├─ TypeName + │ │ └─ TypeName + │ └─ TermMatch + │ ├─ TermName + │ ├─ Case + │ │ ├─ PatTyped + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ └─ TypeApply + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ └─ TermName + │ ├─ Case + │ │ ├─ PatWildcard + │ │ ├─ TermApplyInfix + │ │ │ ├─ TermSelect + │ │ │ │ ├─ TermName + │ │ │ │ └─ TermName + │ │ │ ├─ TermName + │ │ │ └─ LitInt + │ │ └─ TermApplyType + │ │ ├─ TermName + │ │ └─ TypeName + │ ├─ Case + │ │ ├─ PatTyped + │ │ │ ├─ PatVar + │ │ │ │ └─ TermName + │ │ │ └─ TypeApply + │ │ │ ├─ TypeName + │ │ │ └─ TypeName + │ │ └─ TermSelect + │ │ ├─ TermName + │ │ └─ TermName + │ └─ Case + │ ├─ PatWildcard + │ └─ TermSelect + │ ├─ TermApply + │ │ ├─ TermSelect + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ └─ TermName + │ └─ TermName + ├─ DefnDef + │ ├─ TermName + │ ├─ TypeParam + │ │ ├─ TypeName + │ │ └─ TypeBounds + │ ├─ TypeApply + │ │ ├─ TypeName + │ │ ├─ TypeName + │ │ └─ TypeApply + │ │ ├─ TypeName + │ │ └─ TypeName + │ └─ TermNew + │ └─ Init + │ ├─ TypeName + │ └─ NameAnonymous + ├─ DefnDef + │ ├─ TermName + │ ├─ TypeParam + │ │ ├─ TypeName + │ │ └─ TypeBounds + │ ├─ TypeApply + │ │ ├─ TypeName + │ │ └─ TypeName + │ └─ TermName + └─ DefnVal + ├─ ModAnnot + │ └─ Init + │ ├─ TypeName + │ └─ NameAnonymous + ├─ ModPrivate + │ └─ NameIndeterminate + ├─ PatVar + │ └─ TermName + └─ TermNewAnonymous + └─ Template + ├─ Init + │ ├─ TypeApply + │ │ ├─ TypeName + │ │ ├─ TypeName + │ │ └─ TypeName + │ └─ NameAnonymous + ├─ Self + │ └─ NameAnonymous + └─ DefnDef + ├─ TermName + ├─ TermParam + │ ├─ TermName + │ └─ TypeName + ├─ TypeName + └─ TermThis + └─ NameAnonymous diff --git a/pmd-scala/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/package.scala b/pmd-scala/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/package.scala new file mode 100644 index 0000000000..4acf9bf2b7 --- /dev/null +++ b/pmd-scala/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/package.scala @@ -0,0 +1,22 @@ + +/* + * BSD-style license; for more info see http://pmd.sourceforge.net/license.html + */ + +package scala.collection + + +package object immutable { + type StringOps = scala.collection.StringOps + val StringOps = scala.collection.StringOps + type StringView = scala.collection.StringView + val StringView = scala.collection.StringView + + @deprecated("Use Iterable instead of Traversable", "2.13.0") + type Traversable[+X] = Iterable[X] + @deprecated("Use Iterable instead of Traversable", "2.13.0") + val Traversable = Iterable + + @deprecated("Use Map instead of DefaultMap", "2.13.0") + type DefaultMap[K, +V] = scala.collection.immutable.Map[K, V] +} \ No newline at end of file diff --git a/pmd-scala/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/package.txt b/pmd-scala/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/package.txt new file mode 100644 index 0000000000..0f6823b890 --- /dev/null +++ b/pmd-scala/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/package.txt @@ -0,0 +1,90 @@ +└─ Source + └─ Pkg + ├─ TermSelect + │ ├─ TermName + │ └─ TermName + └─ PkgObject + ├─ TermName + └─ Template + ├─ Self + │ └─ NameAnonymous + ├─ DefnType + │ ├─ TypeName + │ └─ TypeSelect + │ ├─ TermSelect + │ │ ├─ TermName + │ │ └─ TermName + │ └─ TypeName + ├─ DefnVal + │ ├─ PatVar + │ │ └─ TermName + │ └─ TermSelect + │ ├─ TermSelect + │ │ ├─ TermName + │ │ └─ TermName + │ └─ TermName + ├─ DefnType + │ ├─ TypeName + │ └─ TypeSelect + │ ├─ TermSelect + │ │ ├─ TermName + │ │ └─ TermName + │ └─ TypeName + ├─ DefnVal + │ ├─ PatVar + │ │ └─ TermName + │ └─ TermSelect + │ ├─ TermSelect + │ │ ├─ TermName + │ │ └─ TermName + │ └─ TermName + ├─ DefnType + │ ├─ ModAnnot + │ │ └─ Init + │ │ ├─ TypeName + │ │ ├─ NameAnonymous + │ │ ├─ LitString + │ │ └─ LitString + │ ├─ TypeName + │ ├─ TypeParam + │ │ ├─ ModCovariant + │ │ ├─ TypeName + │ │ └─ TypeBounds + │ └─ TypeApply + │ ├─ TypeName + │ └─ TypeName + ├─ DefnVal + │ ├─ ModAnnot + │ │ └─ Init + │ │ ├─ TypeName + │ │ ├─ NameAnonymous + │ │ ├─ LitString + │ │ └─ LitString + │ ├─ PatVar + │ │ └─ TermName + │ └─ TermName + └─ DefnType + ├─ ModAnnot + │ └─ Init + │ ├─ TypeName + │ ├─ NameAnonymous + │ ├─ LitString + │ └─ LitString + ├─ TypeName + ├─ TypeParam + │ ├─ TypeName + │ └─ TypeBounds + ├─ TypeParam + │ ├─ ModCovariant + │ ├─ TypeName + │ └─ TypeBounds + └─ TypeApply + ├─ TypeSelect + │ ├─ TermSelect + │ │ ├─ TermSelect + │ │ │ ├─ TermName + │ │ │ └─ TermName + │ │ └─ TermName + │ └─ TypeName + ├─ TypeName + └─ TypeName From e89c54fcf9df1e2730e6dde608975889d9e8bc2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Sat, 28 Mar 2020 18:01:32 +0100 Subject: [PATCH 6/8] Cleanup --- .../pmd/util/treeexport/TextTreeRenderer.java | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/util/treeexport/TextTreeRenderer.java b/pmd-core/src/main/java/net/sourceforge/pmd/util/treeexport/TextTreeRenderer.java index eae5db0420..8d1e822672 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/util/treeexport/TextTreeRenderer.java +++ b/pmd-core/src/main/java/net/sourceforge/pmd/util/treeexport/TextTreeRenderer.java @@ -100,20 +100,6 @@ public class TextTreeRenderer implements TreeRenderer { } }; - private static final Strings ASCII = new Strings( - "+- ", - "+- ", - "| ", - " " - ); - - private static final Strings UNICODE = new Strings( - "└─ ", - "├─ ", - "│ ", - " " - ); - private final Strings str; private final int maxLevel; @@ -129,7 +115,7 @@ public class TextTreeRenderer implements TreeRenderer { * controlled by {@link #appendBoundaryForNodeLn(Node, Appendable, String)}. */ public TextTreeRenderer(boolean onlyAscii, int maxLevel) { - this.str = onlyAscii ? ASCII : UNICODE; + this.str = onlyAscii ? Strings.ASCII : Strings.UNICODE; this.maxLevel = maxLevel; } @@ -194,6 +180,18 @@ public class TextTreeRenderer implements TreeRenderer { private static final class Strings { + private static final Strings ASCII = new Strings( + "+- ", + "+- ", + "| ", + " " + ); + private static final Strings UNICODE = new Strings( + "└─ ", + "├─ ", + "│ ", + " " + ); private final String tailFork; private final String fork; From e84349531b2c8cd0d5614036ba7e05bed0b77804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Sun, 29 Mar 2020 09:17:49 +0200 Subject: [PATCH 7/8] Normalize line endings --- .../net/sourceforge/pmd/lang/ast/test/BaseTreeDumpTest.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/BaseTreeDumpTest.kt b/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/BaseTreeDumpTest.kt index c15c0ba9a4..4e52a66651 100644 --- a/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/BaseTreeDumpTest.kt +++ b/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/BaseTreeDumpTest.kt @@ -46,7 +46,7 @@ abstract class BaseTreeDumpTest( val expected = expectedFile.readText() - assertEquals(expected, actual, "Tree dump comparison failed, see the reference: $expectedFile") + assertEquals(expected.normalize(), actual.normalize(), "Tree dump comparison failed, see the reference: $expectedFile") } // Outputting a path makes for better error messages @@ -67,6 +67,8 @@ abstract class BaseTreeDumpTest( companion object { const val ExpectedExt = ".txt" + + fun String.normalize() = replace(Regex("\\R"), "\n") } } From 5cbfdfdd9904b688511585614a18f8b319ff9365 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Sun, 29 Mar 2020 09:21:36 +0200 Subject: [PATCH 8/8] Use ascii printer for tree dumps Some environments may not display the structure correctly otherwise. See eg https://travis-ci.org/github/pmd/pmd/jobs/668122788#L9312-L9322 --- .../pmd/lang/ast/test/NodePrinters.kt | 4 +- .../pmd/lang/scala/ast/testdata/List.txt | 3268 ++++++++--------- .../pmd/lang/scala/ast/testdata/package.txt | 180 +- 3 files changed, 1726 insertions(+), 1726 deletions(-) diff --git a/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/NodePrinters.kt b/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/NodePrinters.kt index 5f745fd116..7e476c62c3 100644 --- a/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/NodePrinters.kt +++ b/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/lang/ast/test/NodePrinters.kt @@ -21,7 +21,7 @@ import org.apache.commons.lang3.StringEscapeUtils * └── 1 child not shown * */ -val SimpleNodePrinter = TextTreeRenderer(false, -1) +val SimpleNodePrinter = TextTreeRenderer(true, -1) open class RelevantAttributePrinter : BaseNodeAttributePrinter() { @@ -36,7 +36,7 @@ open class RelevantAttributePrinter : BaseNodeAttributePrinter() { /** * Base attribute printer, subclass to filter attributes. */ -open class BaseNodeAttributePrinter : TextTreeRenderer(false, -1) { +open class BaseNodeAttributePrinter : TextTreeRenderer(true, -1) { protected open fun ignoreAttribute(node: Node, attribute: Attribute): Boolean = true diff --git a/pmd-scala/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/List.txt b/pmd-scala/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/List.txt index e8aadb608f..52f77880f0 100644 --- a/pmd-scala/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/List.txt +++ b/pmd-scala/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/List.txt @@ -1,1634 +1,1634 @@ -└─ Source - └─ Pkg - ├─ TermName - └─ Pkg - ├─ TermName - └─ Pkg - ├─ TermName - ├─ Import - │ └─ Importer - │ ├─ TermSelect - │ │ ├─ TermSelect - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ └─ TermName - │ └─ ImporteeName - │ └─ NameIndeterminate - ├─ Import - │ └─ Importer - │ ├─ TermSelect - │ │ ├─ TermName - │ │ └─ TermName - │ └─ ImporteeName - │ └─ NameIndeterminate - ├─ Import - │ └─ Importer - │ ├─ TermName - │ ├─ ImporteeName - │ │ └─ NameIndeterminate - │ └─ ImporteeName - │ └─ NameIndeterminate - ├─ Import - │ └─ Importer - │ ├─ TermSelect - │ │ ├─ TermSelect - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ └─ TermName - │ └─ ImporteeName - │ └─ NameIndeterminate - ├─ Import - │ └─ Importer - │ ├─ TermSelect - │ │ ├─ TermSelect - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ └─ TermName - │ └─ ImporteeName - │ └─ NameIndeterminate - ├─ DefnClass - │ ├─ ModAnnot - │ │ └─ Init - │ │ ├─ TypeName - │ │ ├─ NameAnonymous - │ │ └─ LitLong - │ ├─ ModSealed - │ ├─ ModAbstract - │ ├─ TypeName - │ ├─ TypeParam - │ │ ├─ ModCovariant - │ │ ├─ TypeName - │ │ └─ TypeBounds - │ ├─ CtorPrimary - │ │ └─ NameAnonymous - │ └─ Template - │ ├─ Init - │ │ ├─ TypeApply - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ └─ NameAnonymous - │ ├─ Init - │ │ ├─ TypeApply - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ └─ NameAnonymous - │ ├─ Init - │ │ ├─ TypeApply - │ │ │ ├─ TypeName - │ │ │ ├─ TypeName - │ │ │ ├─ TypeName - │ │ │ └─ TypeApply - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ └─ NameAnonymous - │ ├─ Init - │ │ ├─ TypeApply - │ │ │ ├─ TypeName - │ │ │ ├─ TypeName - │ │ │ ├─ TypeName - │ │ │ └─ TypeApply - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ └─ NameAnonymous - │ ├─ Init - │ │ ├─ TypeApply - │ │ │ ├─ TypeName - │ │ │ ├─ TypeName - │ │ │ ├─ TypeName - │ │ │ └─ TypeApply - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ └─ NameAnonymous - │ ├─ Init - │ │ ├─ TypeApply - │ │ │ ├─ TypeName - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ └─ NameAnonymous - │ ├─ Init - │ │ ├─ TypeName - │ │ └─ NameAnonymous - │ ├─ Self - │ │ └─ NameAnonymous - │ ├─ DefnDef - │ │ ├─ ModOverride - │ │ ├─ TermName - │ │ ├─ TypeApply - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ └─ TermName - │ ├─ DefnDef - │ │ ├─ ModOverride - │ │ ├─ TermName - │ │ ├─ TermParam - │ │ │ ├─ TermName - │ │ │ └─ TypeName - │ │ ├─ TypeApply - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ └─ TermIf - │ │ ├─ TermApplyInfix - │ │ │ ├─ TermName - │ │ │ ├─ TermName - │ │ │ └─ TermApplyInfix - │ │ │ ├─ TermName - │ │ │ ├─ TermName - │ │ │ └─ LitInt - │ │ ├─ TermName - │ │ └─ TermBlock - │ │ ├─ DefnVal - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ └─ TermNew - │ │ │ └─ Init - │ │ │ ├─ TypeName - │ │ │ ├─ NameAnonymous - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ ├─ DefnVar - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ └─ TermName - │ │ ├─ DefnVar - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ └─ TermName - │ │ ├─ DefnVar - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ └─ LitInt - │ │ ├─ TermWhile - │ │ │ ├─ TermBlock - │ │ │ │ ├─ TermIf - │ │ │ │ │ ├─ TermSelect - │ │ │ │ │ │ ├─ TermName - │ │ │ │ │ │ └─ TermName - │ │ │ │ │ ├─ TermReturn - │ │ │ │ │ │ └─ TermThis - │ │ │ │ │ │ └─ NameAnonymous - │ │ │ │ │ └─ LitUnit - │ │ │ │ └─ TermApplyInfix - │ │ │ │ ├─ TermName - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ └─ TermBlock - │ │ │ ├─ TermApplyInfix - │ │ │ │ ├─ TermName - │ │ │ │ ├─ TermName - │ │ │ │ └─ LitInt - │ │ │ ├─ DefnVal - │ │ │ │ ├─ PatVar - │ │ │ │ │ └─ TermName - │ │ │ │ └─ TermNew - │ │ │ │ └─ Init - │ │ │ │ ├─ TypeName - │ │ │ │ ├─ NameAnonymous - │ │ │ │ ├─ TermSelect - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermName - │ │ │ │ └─ TermName - │ │ │ ├─ TermAssign - │ │ │ │ ├─ TermSelect - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermName - │ │ │ │ └─ TermName - │ │ │ ├─ TermAssign - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ └─ TermAssign - │ │ │ ├─ TermName - │ │ │ └─ TermSelect - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ ├─ TermApply - │ │ │ └─ TermName - │ │ └─ TermName - │ ├─ DefnDef - │ │ ├─ ModOverride - │ │ ├─ TermName - │ │ ├─ TermParam - │ │ │ ├─ TermName - │ │ │ └─ TypeName - │ │ ├─ TermParam - │ │ │ ├─ TermName - │ │ │ └─ TypeName - │ │ ├─ TypeApply - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ └─ TermBlock - │ │ ├─ DefnVal - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ └─ TermApply - │ │ │ ├─ TermSelect - │ │ │ │ ├─ TermSelect - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermName - │ │ │ │ └─ TermName - │ │ │ ├─ TermName - │ │ │ └─ LitInt - │ │ └─ TermIf - │ │ ├─ TermApplyInfix - │ │ │ ├─ TermApplyInfix - │ │ │ │ ├─ TermName - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ ├─ TermName - │ │ └─ TermApplyInfix - │ │ ├─ TermApplyInfix - │ │ │ ├─ TermThis - │ │ │ │ └─ NameAnonymous - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ ├─ TermName - │ │ └─ TermApplyInfix - │ │ ├─ TermName - │ │ ├─ TermName - │ │ └─ TermName - │ ├─ DefnDef - │ │ ├─ ModOverride - │ │ ├─ TermName - │ │ ├─ TermParam - │ │ │ ├─ TermName - │ │ │ └─ TypeName - │ │ ├─ TypeApply - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ └─ TermBlock - │ │ ├─ DefnDef - │ │ │ ├─ ModAnnot - │ │ │ │ └─ Init - │ │ │ │ ├─ TypeName - │ │ │ │ └─ NameAnonymous - │ │ │ ├─ TermName - │ │ │ ├─ TermParam - │ │ │ │ ├─ TermName - │ │ │ │ └─ TypeApply - │ │ │ │ ├─ TypeName - │ │ │ │ └─ TypeName - │ │ │ ├─ TermParam - │ │ │ │ ├─ TermName - │ │ │ │ └─ TypeApply - │ │ │ │ ├─ TypeName - │ │ │ │ └─ TypeName - │ │ │ ├─ TypeApply - │ │ │ │ ├─ TypeName - │ │ │ │ └─ TypeName - │ │ │ └─ TermMatch - │ │ │ ├─ TermName - │ │ │ ├─ Case - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ └─ Case - │ │ │ ├─ PatExtractInfix - │ │ │ │ ├─ PatWildcard - │ │ │ │ ├─ TermName - │ │ │ │ └─ PatVar - │ │ │ │ └─ TermName - │ │ │ └─ TermApply - │ │ │ ├─ TermName - │ │ │ ├─ TermName - │ │ │ └─ TermSelect - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ └─ TermApply - │ │ ├─ TermName - │ │ ├─ TermApply - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ └─ TermThis - │ │ └─ NameAnonymous - │ ├─ DefnDef - │ │ ├─ ModOverride - │ │ ├─ TermName - │ │ ├─ TermParam - │ │ │ ├─ TermName - │ │ │ └─ TypeName - │ │ ├─ TypeTuple - │ │ │ ├─ TypeApply - │ │ │ │ ├─ TypeName - │ │ │ │ └─ TypeName - │ │ │ └─ TypeApply - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ └─ TermBlock - │ │ ├─ DefnVal - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ └─ TermNew - │ │ │ └─ Init - │ │ │ ├─ TypeApply - │ │ │ │ ├─ TypeName - │ │ │ │ └─ TypeName - │ │ │ └─ NameAnonymous - │ │ ├─ DefnVar - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ └─ LitInt - │ │ ├─ DefnVar - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ └─ TermThis - │ │ │ └─ NameAnonymous - │ │ ├─ TermWhile - │ │ │ ├─ TermApplyInfix - │ │ │ │ ├─ TermApplyUnary - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermSelect - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermName - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermApplyInfix - │ │ │ │ ├─ TermName - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ └─ TermBlock - │ │ │ ├─ TermApplyInfix - │ │ │ │ ├─ TermName - │ │ │ │ ├─ TermName - │ │ │ │ └─ LitInt - │ │ │ ├─ TermApplyInfix - │ │ │ │ ├─ TermName - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermSelect - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ └─ TermAssign - │ │ │ ├─ TermName - │ │ │ └─ TermSelect - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ └─ TermTuple - │ │ ├─ TermSelect - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ └─ TermName - │ ├─ DefnDef - │ │ ├─ ModOverride - │ │ ├─ TermName - │ │ ├─ TypeParam - │ │ │ ├─ TypeName - │ │ │ └─ TypeBounds - │ │ │ └─ TypeName - │ │ ├─ TermParam - │ │ │ ├─ TermName - │ │ │ └─ TypeName - │ │ ├─ TermParam - │ │ │ ├─ TermName - │ │ │ └─ TypeName - │ │ ├─ TypeApply - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ └─ TermBlock - │ │ ├─ DefnVar - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ └─ LitInt - │ │ ├─ DefnVar - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ └─ TermThis - │ │ │ └─ NameAnonymous - │ │ ├─ DefnVal - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ └─ TermApplyType - │ │ │ ├─ TermSelect - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ └─ TypeName - │ │ ├─ TermWhile - │ │ │ ├─ TermApplyInfix - │ │ │ │ ├─ TermApplyInfix - │ │ │ │ │ ├─ TermName - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermName - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermSelect - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ └─ TermBlock - │ │ │ ├─ TermApplyInfix - │ │ │ │ ├─ TermName - │ │ │ │ ├─ TermName - │ │ │ │ └─ LitInt - │ │ │ ├─ TermApplyInfix - │ │ │ │ ├─ TermName - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermSelect - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ └─ TermAssign - │ │ │ ├─ TermName - │ │ │ └─ TermSelect - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ └─ TermIf - │ │ ├─ TermApplyInfix - │ │ │ ├─ TermApplyInfix - │ │ │ │ ├─ TermName - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ ├─ TermName - │ │ │ └─ TermSelect - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ ├─ TermBlock - │ │ │ └─ TermApply - │ │ │ ├─ TermSelect - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ └─ TermApplyInfix - │ │ │ ├─ TermName - │ │ │ ├─ TermName - │ │ │ └─ TermSelect - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ └─ TermBlock - │ │ └─ TermThrow - │ │ └─ TermNew - │ │ └─ Init - │ │ ├─ TypeName - │ │ ├─ NameAnonymous - │ │ └─ TermInterpolate - │ │ ├─ TermName - │ │ ├─ LitString - │ │ ├─ LitString - │ │ ├─ LitString - │ │ ├─ TermName - │ │ └─ TermApplyInfix - │ │ ├─ TermName - │ │ ├─ TermName - │ │ └─ TermApplyInfix - │ │ ├─ TermName - │ │ ├─ TermName - │ │ └─ LitInt - │ ├─ DefnDef - │ │ ├─ ModFinal - │ │ ├─ ModOverride - │ │ ├─ TermName - │ │ ├─ TypeParam - │ │ │ ├─ TypeName - │ │ │ └─ TypeBounds - │ │ ├─ TermParam - │ │ │ ├─ TermName - │ │ │ └─ TypeFunction - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ ├─ TypeApply - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ └─ TermBlock - │ │ └─ TermIf - │ │ ├─ TermApplyInfix - │ │ │ ├─ TermThis - │ │ │ │ └─ NameAnonymous - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ ├─ TermName - │ │ └─ TermBlock - │ │ ├─ DefnVal - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ └─ TermNew - │ │ │ └─ Init - │ │ │ ├─ TypeApply - │ │ │ │ ├─ TypeName - │ │ │ │ └─ TypeName - │ │ │ ├─ NameAnonymous - │ │ │ ├─ TermApply - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ └─ TermName - │ │ ├─ DefnVar - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ ├─ TypeApply - │ │ │ │ ├─ TypeName - │ │ │ │ └─ TypeName - │ │ │ └─ TermName - │ │ ├─ DefnVar - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ └─ TermName - │ │ ├─ TermWhile - │ │ │ ├─ TermApplyInfix - │ │ │ │ ├─ TermName - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ └─ TermBlock - │ │ │ ├─ DefnVal - │ │ │ │ ├─ PatVar - │ │ │ │ │ └─ TermName - │ │ │ │ └─ TermNew - │ │ │ │ └─ Init - │ │ │ │ ├─ TypeName - │ │ │ │ ├─ NameAnonymous - │ │ │ │ ├─ TermApply - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermSelect - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermName - │ │ │ │ └─ TermName - │ │ │ ├─ TermAssign - │ │ │ │ ├─ TermSelect - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermName - │ │ │ │ └─ TermName - │ │ │ ├─ TermAssign - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ └─ TermAssign - │ │ │ ├─ TermName - │ │ │ └─ TermSelect - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ ├─ TermApply - │ │ │ └─ TermName - │ │ └─ TermName - │ ├─ DefnDef - │ │ ├─ ModFinal - │ │ ├─ ModOverride - │ │ ├─ TermName - │ │ ├─ TypeParam - │ │ │ ├─ TypeName - │ │ │ └─ TypeBounds - │ │ ├─ TermParam - │ │ │ ├─ TermName - │ │ │ └─ TypeApply - │ │ │ ├─ TypeName - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ ├─ TypeApply - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ └─ TermBlock - │ │ └─ TermIf - │ │ ├─ TermApplyInfix - │ │ │ ├─ TermThis - │ │ │ │ └─ NameAnonymous - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ ├─ TermName - │ │ └─ TermBlock - │ │ ├─ DefnVar - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ └─ TermThis - │ │ │ └─ NameAnonymous - │ │ ├─ DefnVar - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ ├─ TypeApply - │ │ │ │ ├─ TypeName - │ │ │ │ └─ TypeName - │ │ │ └─ LitNull - │ │ ├─ DefnVar - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ ├─ TypeName - │ │ │ └─ LitNull - │ │ ├─ TermWhile - │ │ │ ├─ TermApplyInfix - │ │ │ │ ├─ TermName - │ │ │ │ ├─ TermName - │ │ │ │ └─ LitNull - │ │ │ └─ TermBlock - │ │ │ ├─ TermAssign - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermApply - │ │ │ │ ├─ TermSelect - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermName - │ │ │ │ ├─ TermSelect - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermName - │ │ │ │ └─ TermSelect - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ ├─ TermIf - │ │ │ │ ├─ TermApplyInfix - │ │ │ │ │ ├─ TermApplyType - │ │ │ │ │ │ ├─ TermSelect - │ │ │ │ │ │ │ ├─ TermName - │ │ │ │ │ │ │ └─ TermName - │ │ │ │ │ │ └─ TypeName - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermSelect - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermName - │ │ │ │ ├─ TermAssign - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermNew - │ │ │ │ │ └─ Init - │ │ │ │ │ ├─ TypeName - │ │ │ │ │ ├─ NameAnonymous - │ │ │ │ │ ├─ TermApplyType - │ │ │ │ │ │ ├─ TermSelect - │ │ │ │ │ │ │ ├─ TermName - │ │ │ │ │ │ │ └─ TermName - │ │ │ │ │ │ └─ TypeName - │ │ │ │ │ └─ TermName - │ │ │ │ └─ LitUnit - │ │ │ ├─ TermAssign - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermSelect - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ └─ TermIf - │ │ │ ├─ TermApplyInfix - │ │ │ │ ├─ TermName - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ ├─ TermReturn - │ │ │ │ └─ TermIf - │ │ │ │ ├─ TermApplyInfix - │ │ │ │ │ ├─ TermName - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ LitNull - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ └─ LitUnit - │ │ ├─ DefnVar - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ └─ TermName - │ │ ├─ TermWhile - │ │ │ ├─ TermApplyInfix - │ │ │ │ ├─ TermName - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ └─ TermBlock - │ │ │ ├─ TermAssign - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermApply - │ │ │ │ ├─ TermSelect - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermName - │ │ │ │ ├─ TermSelect - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermName - │ │ │ │ └─ TermSelect - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ ├─ TermIf - │ │ │ │ ├─ TermApplyInfix - │ │ │ │ │ ├─ TermApplyType - │ │ │ │ │ │ ├─ TermSelect - │ │ │ │ │ │ │ ├─ TermName - │ │ │ │ │ │ │ └─ TermName - │ │ │ │ │ │ └─ TypeName - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermSelect - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermName - │ │ │ │ ├─ TermBlock - │ │ │ │ │ ├─ DefnVal - │ │ │ │ │ │ ├─ PatVar - │ │ │ │ │ │ │ └─ TermName - │ │ │ │ │ │ └─ TermNew - │ │ │ │ │ │ └─ Init - │ │ │ │ │ │ ├─ TypeName - │ │ │ │ │ │ ├─ NameAnonymous - │ │ │ │ │ │ ├─ TermApplyType - │ │ │ │ │ │ │ ├─ TermSelect - │ │ │ │ │ │ │ │ ├─ TermName - │ │ │ │ │ │ │ │ └─ TermName - │ │ │ │ │ │ │ └─ TypeName - │ │ │ │ │ │ └─ TermName - │ │ │ │ │ ├─ TermAssign - │ │ │ │ │ │ ├─ TermSelect - │ │ │ │ │ │ │ ├─ TermName - │ │ │ │ │ │ │ └─ TermName - │ │ │ │ │ │ └─ TermName - │ │ │ │ │ └─ TermAssign - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermName - │ │ │ │ └─ LitUnit - │ │ │ └─ TermAssign - │ │ │ ├─ TermName - │ │ │ └─ TermSelect - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ ├─ TermApply - │ │ │ └─ TermName - │ │ └─ TermName - │ ├─ DefnDef - │ │ ├─ ModFinal - │ │ ├─ ModOverride - │ │ ├─ TermName - │ │ ├─ TypeParam - │ │ │ ├─ TypeName - │ │ │ └─ TypeBounds - │ │ ├─ TermParam - │ │ │ ├─ TermName - │ │ │ └─ TypeFunction - │ │ │ ├─ TypeName - │ │ │ └─ TypeApply - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ ├─ TypeApply - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ └─ TermBlock - │ │ ├─ DefnVar - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ └─ TermThis - │ │ │ └─ NameAnonymous - │ │ ├─ DefnVar - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ ├─ TypeApply - │ │ │ │ ├─ TypeName - │ │ │ │ └─ TypeName - │ │ │ └─ LitNull - │ │ ├─ DefnVar - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ ├─ TypeApply - │ │ │ │ ├─ TypeName - │ │ │ │ └─ TypeName - │ │ │ └─ LitNull - │ │ ├─ TermWhile - │ │ │ ├─ TermApplyInfix - │ │ │ │ ├─ TermName - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ └─ TermBlock - │ │ │ ├─ DefnVal - │ │ │ │ ├─ PatVar - │ │ │ │ │ └─ TermName - │ │ │ │ └─ TermSelect - │ │ │ │ ├─ TermApply - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermSelect - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermName - │ │ │ │ └─ TermName - │ │ │ ├─ TermWhile - │ │ │ │ ├─ TermSelect - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermName - │ │ │ │ └─ TermBlock - │ │ │ │ ├─ DefnVal - │ │ │ │ │ ├─ PatVar - │ │ │ │ │ │ └─ TermName - │ │ │ │ │ └─ TermNew - │ │ │ │ │ └─ Init - │ │ │ │ │ ├─ TypeName - │ │ │ │ │ ├─ NameAnonymous - │ │ │ │ │ ├─ TermApply - │ │ │ │ │ │ └─ TermSelect - │ │ │ │ │ │ ├─ TermName - │ │ │ │ │ │ └─ TermName - │ │ │ │ │ └─ TermName - │ │ │ │ ├─ TermIf - │ │ │ │ │ ├─ TermApplyInfix - │ │ │ │ │ │ ├─ TermName - │ │ │ │ │ │ ├─ TermName - │ │ │ │ │ │ └─ LitNull - │ │ │ │ │ ├─ TermBlock - │ │ │ │ │ │ └─ TermAssign - │ │ │ │ │ │ ├─ TermName - │ │ │ │ │ │ └─ TermName - │ │ │ │ │ └─ TermBlock - │ │ │ │ │ └─ TermAssign - │ │ │ │ │ ├─ TermSelect - │ │ │ │ │ │ ├─ TermName - │ │ │ │ │ │ └─ TermName - │ │ │ │ │ └─ TermName - │ │ │ │ └─ TermAssign - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ └─ TermAssign - │ │ │ ├─ TermName - │ │ │ └─ TermSelect - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ └─ TermIf - │ │ ├─ TermApplyInfix - │ │ │ ├─ TermName - │ │ │ ├─ TermName - │ │ │ └─ LitNull - │ │ ├─ TermName - │ │ └─ TermBlock - │ │ ├─ TermApply - │ │ │ └─ TermName - │ │ └─ TermName - │ ├─ DefnDef - │ │ ├─ ModAnnot - │ │ │ └─ Init - │ │ │ ├─ TypeName - │ │ │ └─ NameAnonymous - │ │ ├─ ModFinal - │ │ ├─ ModOverride - │ │ ├─ TermName - │ │ ├─ TermParam - │ │ │ ├─ TermName - │ │ │ └─ TypeFunction - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ ├─ TypeApply - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ └─ TermBlock - │ │ ├─ DefnVal - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ └─ TermNew - │ │ │ └─ Init - │ │ │ ├─ TypeApply - │ │ │ │ ├─ TypeName - │ │ │ │ └─ TypeName - │ │ │ └─ NameAnonymous - │ │ ├─ DefnVar - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ └─ TermThis - │ │ │ └─ NameAnonymous - │ │ ├─ TermWhile - │ │ │ ├─ TermApplyInfix - │ │ │ │ ├─ TermApplyUnary - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermSelect - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermName - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermApply - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermSelect - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ └─ TermBlock - │ │ │ ├─ TermApplyInfix - │ │ │ │ ├─ TermName - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermSelect - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ └─ TermAssign - │ │ │ ├─ TermName - │ │ │ └─ TermSelect - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ └─ TermSelect - │ │ ├─ TermName - │ │ └─ TermName - │ ├─ DefnDef - │ │ ├─ ModAnnot - │ │ │ └─ Init - │ │ │ ├─ TypeName - │ │ │ └─ NameAnonymous - │ │ ├─ ModFinal - │ │ ├─ ModOverride - │ │ ├─ TermName - │ │ ├─ TermParam - │ │ │ ├─ TermName - │ │ │ └─ TypeFunction - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ ├─ TypeTuple - │ │ │ ├─ TypeApply - │ │ │ │ ├─ TypeName - │ │ │ │ └─ TypeName - │ │ │ └─ TypeApply - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ └─ TermBlock - │ │ ├─ DefnVal - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ └─ TermNew - │ │ │ └─ Init - │ │ │ ├─ TypeApply - │ │ │ │ ├─ TypeName - │ │ │ │ └─ TypeName - │ │ │ └─ NameAnonymous - │ │ ├─ DefnVar - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ └─ TermThis - │ │ │ └─ NameAnonymous - │ │ ├─ TermWhile - │ │ │ ├─ TermApplyInfix - │ │ │ │ ├─ TermApplyUnary - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermSelect - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermName - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermApply - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermSelect - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ └─ TermBlock - │ │ │ ├─ TermApplyInfix - │ │ │ │ ├─ TermName - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermSelect - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ └─ TermAssign - │ │ │ ├─ TermName - │ │ │ └─ TermSelect - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ └─ TermTuple - │ │ ├─ TermSelect - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ └─ TermName - │ ├─ DefnDef - │ │ ├─ ModAnnot - │ │ │ └─ Init - │ │ │ ├─ TypeName - │ │ │ └─ NameAnonymous - │ │ ├─ ModFinal - │ │ ├─ ModOverride - │ │ ├─ TermName - │ │ ├─ TypeParam - │ │ │ ├─ TypeName - │ │ │ └─ TypeBounds - │ │ ├─ TermParam - │ │ │ ├─ TermName - │ │ │ └─ TypeFunction - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ ├─ TypeName - │ │ └─ TermBlock - │ │ ├─ DefnVar - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ └─ TermThis - │ │ │ └─ NameAnonymous - │ │ └─ TermWhile - │ │ ├─ TermApplyUnary - │ │ │ ├─ TermName - │ │ │ └─ TermSelect - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ └─ TermBlock - │ │ ├─ TermApply - │ │ │ ├─ TermName - │ │ │ └─ TermSelect - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ └─ TermAssign - │ │ ├─ TermName - │ │ └─ TermSelect - │ │ ├─ TermName - │ │ └─ TermName - │ ├─ DefnDef - │ │ ├─ ModFinal - │ │ ├─ ModOverride - │ │ ├─ TermName - │ │ ├─ TypeApply - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ └─ TermBlock - │ │ ├─ DefnVar - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ ├─ TypeApply - │ │ │ │ ├─ TypeName - │ │ │ │ └─ TypeName - │ │ │ └─ TermName - │ │ ├─ DefnVar - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ └─ TermThis - │ │ │ └─ NameAnonymous - │ │ ├─ TermWhile - │ │ │ ├─ TermApplyUnary - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermSelect - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ └─ TermBlock - │ │ │ ├─ TermAssign - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermApplyInfix - │ │ │ │ ├─ TermSelect - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermName - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ └─ TermAssign - │ │ │ ├─ TermName - │ │ │ └─ TermSelect - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ └─ TermName - │ ├─ DefnDef - │ │ ├─ ModFinal - │ │ ├─ ModOverride - │ │ ├─ TermName - │ │ ├─ TypeParam - │ │ │ ├─ TypeName - │ │ │ └─ TypeBounds - │ │ ├─ TermParam - │ │ │ ├─ TermName - │ │ │ └─ TypeName - │ │ ├─ TermParam - │ │ │ ├─ TermName - │ │ │ └─ TypeFunction - │ │ │ ├─ TypeName - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ ├─ TypeName - │ │ └─ TermBlock - │ │ ├─ DefnVar - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ └─ TermName - │ │ ├─ DefnVar - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ ├─ TypeApply - │ │ │ │ ├─ TypeName - │ │ │ │ └─ TypeName - │ │ │ └─ TermName - │ │ ├─ TermWhile - │ │ │ ├─ TermApplyUnary - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermSelect - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ └─ TermBlock - │ │ │ ├─ TermAssign - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermApply - │ │ │ │ ├─ TermName - │ │ │ │ ├─ TermSelect - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermName - │ │ │ │ └─ TermName - │ │ │ └─ TermAssign - │ │ │ ├─ TermName - │ │ │ └─ TermSelect - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ └─ TermName - │ ├─ DefnDef - │ │ ├─ ModOverride - │ │ ├─ ModFinal - │ │ ├─ TermName - │ │ ├─ TypeName - │ │ └─ TermBlock - │ │ ├─ DefnVar - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ └─ TermThis - │ │ │ └─ NameAnonymous - │ │ ├─ DefnVar - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ └─ LitInt - │ │ ├─ TermWhile - │ │ │ ├─ TermApplyUnary - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermSelect - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ └─ TermBlock - │ │ │ ├─ TermApplyInfix - │ │ │ │ ├─ TermName - │ │ │ │ ├─ TermName - │ │ │ │ └─ LitInt - │ │ │ └─ TermAssign - │ │ │ ├─ TermName - │ │ │ └─ TermSelect - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ └─ TermName - │ ├─ DefnDef - │ │ ├─ ModOverride - │ │ ├─ ModFinal - │ │ ├─ TermName - │ │ ├─ TermParam - │ │ │ ├─ TermName - │ │ │ └─ TypeName - │ │ ├─ TypeName - │ │ └─ TermBlock - │ │ ├─ DefnDef - │ │ │ ├─ ModAnnot - │ │ │ │ └─ Init - │ │ │ │ ├─ TypeName - │ │ │ │ └─ NameAnonymous - │ │ │ ├─ TermName - │ │ │ ├─ TermParam - │ │ │ │ ├─ TermName - │ │ │ │ └─ TypeName - │ │ │ ├─ TermParam - │ │ │ │ ├─ TermName - │ │ │ │ └─ TypeApply - │ │ │ │ ├─ TypeName - │ │ │ │ └─ TypeName - │ │ │ ├─ TypeName - │ │ │ └─ TermBlock - │ │ │ └─ TermIf - │ │ │ ├─ TermApplyInfix - │ │ │ │ ├─ TermName - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ ├─ TermIf - │ │ │ │ ├─ TermSelect - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermName - │ │ │ │ ├─ LitInt - │ │ │ │ └─ LitInt - │ │ │ └─ TermIf - │ │ │ ├─ TermSelect - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ ├─ LitInt - │ │ │ └─ TermApply - │ │ │ ├─ TermName - │ │ │ ├─ TermApplyInfix - │ │ │ │ ├─ TermName - │ │ │ │ ├─ TermName - │ │ │ │ └─ LitInt - │ │ │ └─ TermSelect - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ └─ TermIf - │ │ ├─ TermApplyInfix - │ │ │ ├─ TermName - │ │ │ ├─ TermName - │ │ │ └─ LitInt - │ │ ├─ LitInt - │ │ └─ TermApply - │ │ ├─ TermName - │ │ ├─ LitInt - │ │ └─ TermName - │ ├─ DefnDef - │ │ ├─ ModOverride - │ │ ├─ ModFinal - │ │ ├─ TermName - │ │ ├─ TermParam - │ │ │ ├─ TermName - │ │ │ └─ TypeFunction - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ ├─ TypeName - │ │ └─ TermBlock - │ │ ├─ DefnVar - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ ├─ TypeApply - │ │ │ │ ├─ TypeName - │ │ │ │ └─ TypeName - │ │ │ └─ TermThis - │ │ │ └─ NameAnonymous - │ │ ├─ TermWhile - │ │ │ ├─ TermApplyUnary - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermSelect - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ └─ TermBlock - │ │ │ ├─ TermIf - │ │ │ │ ├─ TermApplyUnary - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermApply - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermSelect - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermName - │ │ │ │ ├─ TermReturn - │ │ │ │ │ └─ LitBoolean - │ │ │ │ └─ LitUnit - │ │ │ └─ TermAssign - │ │ │ ├─ TermName - │ │ │ └─ TermSelect - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ └─ LitBoolean - │ ├─ DefnDef - │ │ ├─ ModOverride - │ │ ├─ ModFinal - │ │ ├─ TermName - │ │ ├─ TermParam - │ │ │ ├─ TermName - │ │ │ └─ TypeFunction - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ ├─ TypeName - │ │ └─ TermBlock - │ │ ├─ DefnVar - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ ├─ TypeApply - │ │ │ │ ├─ TypeName - │ │ │ │ └─ TypeName - │ │ │ └─ TermThis - │ │ │ └─ NameAnonymous - │ │ ├─ TermWhile - │ │ │ ├─ TermApplyUnary - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermSelect - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ └─ TermBlock - │ │ │ ├─ TermIf - │ │ │ │ ├─ TermApply - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermSelect - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermName - │ │ │ │ ├─ TermReturn - │ │ │ │ │ └─ LitBoolean - │ │ │ │ └─ LitUnit - │ │ │ └─ TermAssign - │ │ │ ├─ TermName - │ │ │ └─ TermSelect - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ └─ LitBoolean - │ ├─ DefnDef - │ │ ├─ ModOverride - │ │ ├─ ModFinal - │ │ ├─ TermName - │ │ ├─ TypeParam - │ │ │ ├─ TypeName - │ │ │ └─ TypeBounds - │ │ │ └─ TypeName - │ │ ├─ TermParam - │ │ │ ├─ TermName - │ │ │ └─ TypeName - │ │ ├─ TypeName - │ │ └─ TermBlock - │ │ ├─ DefnVar - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ ├─ TypeApply - │ │ │ │ ├─ TypeName - │ │ │ │ └─ TypeName - │ │ │ └─ TermThis - │ │ │ └─ NameAnonymous - │ │ ├─ TermWhile - │ │ │ ├─ TermApplyUnary - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermSelect - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ └─ TermBlock - │ │ │ ├─ TermIf - │ │ │ │ ├─ TermApplyInfix - │ │ │ │ │ ├─ TermSelect - │ │ │ │ │ │ ├─ TermName - │ │ │ │ │ │ └─ TermName - │ │ │ │ │ ├─ TermName - │ │ │ │ │ └─ TermName - │ │ │ │ ├─ TermReturn - │ │ │ │ │ └─ LitBoolean - │ │ │ │ └─ LitUnit - │ │ │ └─ TermAssign - │ │ │ ├─ TermName - │ │ │ └─ TermSelect - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ └─ LitBoolean - │ └─ DefnDef - │ ├─ ModOverride - │ ├─ ModFinal - │ ├─ TermName - │ ├─ TermParam - │ │ ├─ TermName - │ │ └─ TypeFunction - │ │ ├─ TypeName - │ │ └─ TypeName - │ ├─ TypeApply - │ │ ├─ TypeName - │ │ └─ TypeName - │ └─ TermBlock - │ ├─ DefnVar - │ │ ├─ PatVar - │ │ │ └─ TermName - │ │ ├─ TypeApply - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ └─ TermThis - │ │ └─ NameAnonymous - │ ├─ TermWhile - │ │ ├─ TermApplyUnary - │ │ │ ├─ TermName - │ │ │ └─ TermSelect - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ └─ TermBlock - │ │ ├─ TermIf - │ │ │ ├─ TermApply - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermSelect - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ ├─ TermReturn - │ │ │ │ └─ TermApply - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermSelect - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ └─ LitUnit - │ │ └─ TermAssign - │ │ ├─ TermName - │ │ └─ TermSelect - │ │ ├─ TermName - │ │ └─ TermName - │ └─ TermName - ├─ DefnClass - │ ├─ ModFinal - │ ├─ ModCase - │ ├─ TypeName - │ ├─ TypeParam - │ │ ├─ ModCovariant - │ │ ├─ TypeName - │ │ └─ TypeBounds - │ ├─ CtorPrimary - │ │ ├─ NameAnonymous - │ │ ├─ TermParam - │ │ │ ├─ ModOverride - │ │ │ ├─ ModValParam - │ │ │ ├─ TermName - │ │ │ └─ TypeName - │ │ └─ TermParam - │ │ ├─ ModPrivate - │ │ │ └─ NameIndeterminate - │ │ ├─ ModVarParam - │ │ ├─ TermName - │ │ └─ TypeApply - │ │ ├─ TypeName - │ │ └─ TypeAnnotate - │ │ ├─ TypeName - │ │ └─ ModAnnot - │ │ └─ Init - │ │ ├─ TypeName - │ │ └─ NameAnonymous - │ └─ Template - │ ├─ Init - │ │ ├─ TypeApply - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ └─ NameAnonymous - │ ├─ Self - │ │ └─ NameAnonymous - │ ├─ TermApply - │ │ └─ TermName - │ ├─ DefnDef - │ │ ├─ ModOverride - │ │ ├─ TermName - │ │ ├─ TypeApply - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ └─ TermApply - │ │ ├─ TermName - │ │ └─ TermName - │ └─ DefnDef - │ ├─ ModOverride - │ ├─ TermName - │ ├─ TypeApply - │ │ ├─ TypeName - │ │ └─ TypeName - │ └─ TermName - ├─ DefnObject - │ ├─ ModCase - │ ├─ TermName - │ └─ Template - │ ├─ Init - │ │ ├─ TypeApply - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ └─ NameAnonymous - │ ├─ Self - │ │ └─ NameAnonymous - │ ├─ DefnDef - │ │ ├─ ModOverride - │ │ ├─ TermName - │ │ ├─ TypeName - │ │ └─ TermThrow - │ │ └─ TermNew - │ │ └─ Init - │ │ ├─ TypeName - │ │ ├─ NameAnonymous - │ │ └─ LitString - │ ├─ DefnDef - │ │ ├─ ModOverride - │ │ ├─ TermName - │ │ ├─ TypeSingleton - │ │ │ └─ TermName - │ │ └─ TermName - │ ├─ DefnDef - │ │ ├─ ModOverride - │ │ ├─ TermName - │ │ ├─ TypeName - │ │ └─ TermThrow - │ │ └─ TermNew - │ │ └─ Init - │ │ ├─ TypeName - │ │ ├─ NameAnonymous - │ │ └─ LitString - │ ├─ DefnDef - │ │ ├─ ModOverride - │ │ ├─ TermName - │ │ ├─ TypeName - │ │ └─ TermThrow - │ │ └─ TermNew - │ │ └─ Init - │ │ ├─ TypeName - │ │ ├─ NameAnonymous - │ │ └─ LitString - │ ├─ DefnDef - │ │ ├─ ModOverride - │ │ ├─ TermName - │ │ ├─ TypeName - │ │ └─ TermThrow - │ │ └─ TermNew - │ │ └─ Init - │ │ ├─ TypeName - │ │ ├─ NameAnonymous - │ │ └─ LitString - │ ├─ DefnDef - │ │ ├─ ModOverride - │ │ ├─ TermName - │ │ ├─ TypeName - │ │ └─ LitInt - │ ├─ DefnDef - │ │ ├─ ModOverride - │ │ ├─ TermName - │ │ ├─ TypeApply - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ └─ TermSelect - │ │ ├─ TermName - │ │ └─ TermName - │ ├─ DefnDef - │ │ ├─ ModOverride - │ │ ├─ TermName - │ │ ├─ TypeParam - │ │ │ ├─ TypeName - │ │ │ └─ TypeBounds - │ │ ├─ TypeParam - │ │ │ ├─ TypeName - │ │ │ └─ TypeBounds - │ │ ├─ TermParam - │ │ │ ├─ ModImplicit - │ │ │ ├─ TermName - │ │ │ └─ TypeFunction - │ │ │ ├─ TypeName - │ │ │ └─ TypeTuple - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ ├─ TypeTuple - │ │ │ ├─ TypeApply - │ │ │ │ ├─ TypeName - │ │ │ │ └─ TypeName - │ │ │ └─ TypeApply - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ └─ TermName - │ └─ DefnVal - │ ├─ ModAnnot - │ │ └─ Init - │ │ ├─ TypeName - │ │ └─ NameAnonymous - │ ├─ ModPrivate - │ │ └─ TermThis - │ │ └─ NameAnonymous - │ ├─ PatVar - │ │ └─ TermName - │ └─ TermTuple - │ ├─ TermName - │ └─ TermName - └─ DefnObject - ├─ ModAnnot - │ └─ Init - │ ├─ TypeName - │ ├─ NameAnonymous - │ └─ LitLong - ├─ TermName - └─ Template - ├─ Init - │ ├─ TypeApply - │ │ ├─ TypeName - │ │ └─ TypeName - │ └─ NameAnonymous - ├─ Self - │ └─ NameAnonymous - ├─ DefnVal - │ ├─ ModPrivate - │ │ └─ NameAnonymous - │ ├─ PatVar - │ │ └─ TermName - │ └─ TermTuple - │ ├─ TermName - │ └─ TermName - ├─ DefnDef - │ ├─ TermName - │ ├─ TypeParam - │ │ ├─ TypeName - │ │ └─ TypeBounds - │ ├─ TermParam - │ │ ├─ TermName - │ │ └─ TypeApply - │ │ ├─ TypeSelect - │ │ │ ├─ TermName - │ │ │ └─ TypeName - │ │ └─ TypeName - │ ├─ TypeApply - │ │ ├─ TypeName - │ │ └─ TypeName - │ └─ TermMatch - │ ├─ TermName - │ ├─ Case - │ │ ├─ PatTyped - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ └─ TypeApply - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ └─ TermName - │ ├─ Case - │ │ ├─ PatWildcard - │ │ ├─ TermApplyInfix - │ │ │ ├─ TermSelect - │ │ │ │ ├─ TermName - │ │ │ │ └─ TermName - │ │ │ ├─ TermName - │ │ │ └─ LitInt - │ │ └─ TermApplyType - │ │ ├─ TermName - │ │ └─ TypeName - │ ├─ Case - │ │ ├─ PatTyped - │ │ │ ├─ PatVar - │ │ │ │ └─ TermName - │ │ │ └─ TypeApply - │ │ │ ├─ TypeName - │ │ │ └─ TypeName - │ │ └─ TermSelect - │ │ ├─ TermName - │ │ └─ TermName - │ └─ Case - │ ├─ PatWildcard - │ └─ TermSelect - │ ├─ TermApply - │ │ ├─ TermSelect - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ └─ TermName - │ └─ TermName - ├─ DefnDef - │ ├─ TermName - │ ├─ TypeParam - │ │ ├─ TypeName - │ │ └─ TypeBounds - │ ├─ TypeApply - │ │ ├─ TypeName - │ │ ├─ TypeName - │ │ └─ TypeApply - │ │ ├─ TypeName - │ │ └─ TypeName - │ └─ TermNew - │ └─ Init - │ ├─ TypeName - │ └─ NameAnonymous - ├─ DefnDef - │ ├─ TermName - │ ├─ TypeParam - │ │ ├─ TypeName - │ │ └─ TypeBounds - │ ├─ TypeApply - │ │ ├─ TypeName - │ │ └─ TypeName - │ └─ TermName - └─ DefnVal - ├─ ModAnnot - │ └─ Init - │ ├─ TypeName - │ └─ NameAnonymous - ├─ ModPrivate - │ └─ NameIndeterminate - ├─ PatVar - │ └─ TermName - └─ TermNewAnonymous - └─ Template - ├─ Init - │ ├─ TypeApply - │ │ ├─ TypeName - │ │ ├─ TypeName - │ │ └─ TypeName - │ └─ NameAnonymous - ├─ Self - │ └─ NameAnonymous - └─ DefnDef - ├─ TermName - ├─ TermParam - │ ├─ TermName - │ └─ TypeName - ├─ TypeName - └─ TermThis - └─ NameAnonymous ++- Source + +- Pkg + +- TermName + +- Pkg + +- TermName + +- Pkg + +- TermName + +- Import + | +- Importer + | +- TermSelect + | | +- TermSelect + | | | +- TermName + | | | +- TermName + | | +- TermName + | +- ImporteeName + | +- NameIndeterminate + +- Import + | +- Importer + | +- TermSelect + | | +- TermName + | | +- TermName + | +- ImporteeName + | +- NameIndeterminate + +- Import + | +- Importer + | +- TermName + | +- ImporteeName + | | +- NameIndeterminate + | +- ImporteeName + | +- NameIndeterminate + +- Import + | +- Importer + | +- TermSelect + | | +- TermSelect + | | | +- TermName + | | | +- TermName + | | +- TermName + | +- ImporteeName + | +- NameIndeterminate + +- Import + | +- Importer + | +- TermSelect + | | +- TermSelect + | | | +- TermName + | | | +- TermName + | | +- TermName + | +- ImporteeName + | +- NameIndeterminate + +- DefnClass + | +- ModAnnot + | | +- Init + | | +- TypeName + | | +- NameAnonymous + | | +- LitLong + | +- ModSealed + | +- ModAbstract + | +- TypeName + | +- TypeParam + | | +- ModCovariant + | | +- TypeName + | | +- TypeBounds + | +- CtorPrimary + | | +- NameAnonymous + | +- Template + | +- Init + | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | +- NameAnonymous + | +- Init + | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | +- NameAnonymous + | +- Init + | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | | +- TypeName + | | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | +- NameAnonymous + | +- Init + | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | | +- TypeName + | | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | +- NameAnonymous + | +- Init + | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | | +- TypeName + | | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | +- NameAnonymous + | +- Init + | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | | +- TypeName + | | +- NameAnonymous + | +- Init + | | +- TypeName + | | +- NameAnonymous + | +- Self + | | +- NameAnonymous + | +- DefnDef + | | +- ModOverride + | | +- TermName + | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | +- TermName + | +- DefnDef + | | +- ModOverride + | | +- TermName + | | +- TermParam + | | | +- TermName + | | | +- TypeName + | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | +- TermIf + | | +- TermApplyInfix + | | | +- TermName + | | | +- TermName + | | | +- TermApplyInfix + | | | +- TermName + | | | +- TermName + | | | +- LitInt + | | +- TermName + | | +- TermBlock + | | +- DefnVal + | | | +- PatVar + | | | | +- TermName + | | | +- TermNew + | | | +- Init + | | | +- TypeName + | | | +- NameAnonymous + | | | +- TermName + | | | +- TermName + | | +- DefnVar + | | | +- PatVar + | | | | +- TermName + | | | +- TermName + | | +- DefnVar + | | | +- PatVar + | | | | +- TermName + | | | +- TermName + | | +- DefnVar + | | | +- PatVar + | | | | +- TermName + | | | +- LitInt + | | +- TermWhile + | | | +- TermBlock + | | | | +- TermIf + | | | | | +- TermSelect + | | | | | | +- TermName + | | | | | | +- TermName + | | | | | +- TermReturn + | | | | | | +- TermThis + | | | | | | +- NameAnonymous + | | | | | +- LitUnit + | | | | +- TermApplyInfix + | | | | +- TermName + | | | | +- TermName + | | | | +- TermName + | | | +- TermBlock + | | | +- TermApplyInfix + | | | | +- TermName + | | | | +- TermName + | | | | +- LitInt + | | | +- DefnVal + | | | | +- PatVar + | | | | | +- TermName + | | | | +- TermNew + | | | | +- Init + | | | | +- TypeName + | | | | +- NameAnonymous + | | | | +- TermSelect + | | | | | +- TermName + | | | | | +- TermName + | | | | +- TermName + | | | +- TermAssign + | | | | +- TermSelect + | | | | | +- TermName + | | | | | +- TermName + | | | | +- TermName + | | | +- TermAssign + | | | | +- TermName + | | | | +- TermName + | | | +- TermAssign + | | | +- TermName + | | | +- TermSelect + | | | +- TermName + | | | +- TermName + | | +- TermApply + | | | +- TermName + | | +- TermName + | +- DefnDef + | | +- ModOverride + | | +- TermName + | | +- TermParam + | | | +- TermName + | | | +- TypeName + | | +- TermParam + | | | +- TermName + | | | +- TypeName + | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | +- TermBlock + | | +- DefnVal + | | | +- PatVar + | | | | +- TermName + | | | +- TermApply + | | | +- TermSelect + | | | | +- TermSelect + | | | | | +- TermName + | | | | | +- TermName + | | | | +- TermName + | | | +- TermName + | | | +- LitInt + | | +- TermIf + | | +- TermApplyInfix + | | | +- TermApplyInfix + | | | | +- TermName + | | | | +- TermName + | | | | +- TermName + | | | +- TermName + | | | +- TermName + | | +- TermName + | | +- TermApplyInfix + | | +- TermApplyInfix + | | | +- TermThis + | | | | +- NameAnonymous + | | | +- TermName + | | | +- TermName + | | +- TermName + | | +- TermApplyInfix + | | +- TermName + | | +- TermName + | | +- TermName + | +- DefnDef + | | +- ModOverride + | | +- TermName + | | +- TermParam + | | | +- TermName + | | | +- TypeName + | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | +- TermBlock + | | +- DefnDef + | | | +- ModAnnot + | | | | +- Init + | | | | +- TypeName + | | | | +- NameAnonymous + | | | +- TermName + | | | +- TermParam + | | | | +- TermName + | | | | +- TypeApply + | | | | +- TypeName + | | | | +- TypeName + | | | +- TermParam + | | | | +- TermName + | | | | +- TypeApply + | | | | +- TypeName + | | | | +- TypeName + | | | +- TypeApply + | | | | +- TypeName + | | | | +- TypeName + | | | +- TermMatch + | | | +- TermName + | | | +- Case + | | | | +- TermName + | | | | +- TermName + | | | +- Case + | | | +- PatExtractInfix + | | | | +- PatWildcard + | | | | +- TermName + | | | | +- PatVar + | | | | +- TermName + | | | +- TermApply + | | | +- TermName + | | | +- TermName + | | | +- TermSelect + | | | +- TermName + | | | +- TermName + | | +- TermApply + | | +- TermName + | | +- TermApply + | | | +- TermName + | | | +- TermName + | | +- TermThis + | | +- NameAnonymous + | +- DefnDef + | | +- ModOverride + | | +- TermName + | | +- TermParam + | | | +- TermName + | | | +- TypeName + | | +- TypeTuple + | | | +- TypeApply + | | | | +- TypeName + | | | | +- TypeName + | | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | +- TermBlock + | | +- DefnVal + | | | +- PatVar + | | | | +- TermName + | | | +- TermNew + | | | +- Init + | | | +- TypeApply + | | | | +- TypeName + | | | | +- TypeName + | | | +- NameAnonymous + | | +- DefnVar + | | | +- PatVar + | | | | +- TermName + | | | +- LitInt + | | +- DefnVar + | | | +- PatVar + | | | | +- TermName + | | | +- TermThis + | | | +- NameAnonymous + | | +- TermWhile + | | | +- TermApplyInfix + | | | | +- TermApplyUnary + | | | | | +- TermName + | | | | | +- TermSelect + | | | | | +- TermName + | | | | | +- TermName + | | | | +- TermName + | | | | +- TermApplyInfix + | | | | +- TermName + | | | | +- TermName + | | | | +- TermName + | | | +- TermBlock + | | | +- TermApplyInfix + | | | | +- TermName + | | | | +- TermName + | | | | +- LitInt + | | | +- TermApplyInfix + | | | | +- TermName + | | | | +- TermName + | | | | +- TermSelect + | | | | +- TermName + | | | | +- TermName + | | | +- TermAssign + | | | +- TermName + | | | +- TermSelect + | | | +- TermName + | | | +- TermName + | | +- TermTuple + | | +- TermSelect + | | | +- TermName + | | | +- TermName + | | +- TermName + | +- DefnDef + | | +- ModOverride + | | +- TermName + | | +- TypeParam + | | | +- TypeName + | | | +- TypeBounds + | | | +- TypeName + | | +- TermParam + | | | +- TermName + | | | +- TypeName + | | +- TermParam + | | | +- TermName + | | | +- TypeName + | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | +- TermBlock + | | +- DefnVar + | | | +- PatVar + | | | | +- TermName + | | | +- LitInt + | | +- DefnVar + | | | +- PatVar + | | | | +- TermName + | | | +- TermThis + | | | +- NameAnonymous + | | +- DefnVal + | | | +- PatVar + | | | | +- TermName + | | | +- TermApplyType + | | | +- TermSelect + | | | | +- TermName + | | | | +- TermName + | | | +- TypeName + | | +- TermWhile + | | | +- TermApplyInfix + | | | | +- TermApplyInfix + | | | | | +- TermName + | | | | | +- TermName + | | | | | +- TermName + | | | | +- TermName + | | | | +- TermSelect + | | | | +- TermName + | | | | +- TermName + | | | +- TermBlock + | | | +- TermApplyInfix + | | | | +- TermName + | | | | +- TermName + | | | | +- LitInt + | | | +- TermApplyInfix + | | | | +- TermName + | | | | +- TermName + | | | | +- TermSelect + | | | | +- TermName + | | | | +- TermName + | | | +- TermAssign + | | | +- TermName + | | | +- TermSelect + | | | +- TermName + | | | +- TermName + | | +- TermIf + | | +- TermApplyInfix + | | | +- TermApplyInfix + | | | | +- TermName + | | | | +- TermName + | | | | +- TermName + | | | +- TermName + | | | +- TermSelect + | | | +- TermName + | | | +- TermName + | | +- TermBlock + | | | +- TermApply + | | | +- TermSelect + | | | | +- TermName + | | | | +- TermName + | | | +- TermApplyInfix + | | | +- TermName + | | | +- TermName + | | | +- TermSelect + | | | +- TermName + | | | +- TermName + | | +- TermBlock + | | +- TermThrow + | | +- TermNew + | | +- Init + | | +- TypeName + | | +- NameAnonymous + | | +- TermInterpolate + | | +- TermName + | | +- LitString + | | +- LitString + | | +- LitString + | | +- TermName + | | +- TermApplyInfix + | | +- TermName + | | +- TermName + | | +- TermApplyInfix + | | +- TermName + | | +- TermName + | | +- LitInt + | +- DefnDef + | | +- ModFinal + | | +- ModOverride + | | +- TermName + | | +- TypeParam + | | | +- TypeName + | | | +- TypeBounds + | | +- TermParam + | | | +- TermName + | | | +- TypeFunction + | | | +- TypeName + | | | +- TypeName + | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | +- TermBlock + | | +- TermIf + | | +- TermApplyInfix + | | | +- TermThis + | | | | +- NameAnonymous + | | | +- TermName + | | | +- TermName + | | +- TermName + | | +- TermBlock + | | +- DefnVal + | | | +- PatVar + | | | | +- TermName + | | | +- TermNew + | | | +- Init + | | | +- TypeApply + | | | | +- TypeName + | | | | +- TypeName + | | | +- NameAnonymous + | | | +- TermApply + | | | | +- TermName + | | | | +- TermName + | | | +- TermName + | | +- DefnVar + | | | +- PatVar + | | | | +- TermName + | | | +- TypeApply + | | | | +- TypeName + | | | | +- TypeName + | | | +- TermName + | | +- DefnVar + | | | +- PatVar + | | | | +- TermName + | | | +- TermName + | | +- TermWhile + | | | +- TermApplyInfix + | | | | +- TermName + | | | | +- TermName + | | | | +- TermName + | | | +- TermBlock + | | | +- DefnVal + | | | | +- PatVar + | | | | | +- TermName + | | | | +- TermNew + | | | | +- Init + | | | | +- TypeName + | | | | +- NameAnonymous + | | | | +- TermApply + | | | | | +- TermName + | | | | | +- TermSelect + | | | | | +- TermName + | | | | | +- TermName + | | | | +- TermName + | | | +- TermAssign + | | | | +- TermSelect + | | | | | +- TermName + | | | | | +- TermName + | | | | +- TermName + | | | +- TermAssign + | | | | +- TermName + | | | | +- TermName + | | | +- TermAssign + | | | +- TermName + | | | +- TermSelect + | | | +- TermName + | | | +- TermName + | | +- TermApply + | | | +- TermName + | | +- TermName + | +- DefnDef + | | +- ModFinal + | | +- ModOverride + | | +- TermName + | | +- TypeParam + | | | +- TypeName + | | | +- TypeBounds + | | +- TermParam + | | | +- TermName + | | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | | +- TypeName + | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | +- TermBlock + | | +- TermIf + | | +- TermApplyInfix + | | | +- TermThis + | | | | +- NameAnonymous + | | | +- TermName + | | | +- TermName + | | +- TermName + | | +- TermBlock + | | +- DefnVar + | | | +- PatVar + | | | | +- TermName + | | | +- TermThis + | | | +- NameAnonymous + | | +- DefnVar + | | | +- PatVar + | | | | +- TermName + | | | +- TypeApply + | | | | +- TypeName + | | | | +- TypeName + | | | +- LitNull + | | +- DefnVar + | | | +- PatVar + | | | | +- TermName + | | | +- TypeName + | | | +- LitNull + | | +- TermWhile + | | | +- TermApplyInfix + | | | | +- TermName + | | | | +- TermName + | | | | +- LitNull + | | | +- TermBlock + | | | +- TermAssign + | | | | +- TermName + | | | | +- TermApply + | | | | +- TermSelect + | | | | | +- TermName + | | | | | +- TermName + | | | | +- TermSelect + | | | | | +- TermName + | | | | | +- TermName + | | | | +- TermSelect + | | | | +- TermName + | | | | +- TermName + | | | +- TermIf + | | | | +- TermApplyInfix + | | | | | +- TermApplyType + | | | | | | +- TermSelect + | | | | | | | +- TermName + | | | | | | | +- TermName + | | | | | | +- TypeName + | | | | | +- TermName + | | | | | +- TermSelect + | | | | | +- TermName + | | | | | +- TermName + | | | | +- TermAssign + | | | | | +- TermName + | | | | | +- TermNew + | | | | | +- Init + | | | | | +- TypeName + | | | | | +- NameAnonymous + | | | | | +- TermApplyType + | | | | | | +- TermSelect + | | | | | | | +- TermName + | | | | | | | +- TermName + | | | | | | +- TypeName + | | | | | +- TermName + | | | | +- LitUnit + | | | +- TermAssign + | | | | +- TermName + | | | | +- TermSelect + | | | | +- TermName + | | | | +- TermName + | | | +- TermIf + | | | +- TermApplyInfix + | | | | +- TermName + | | | | +- TermName + | | | | +- TermName + | | | +- TermReturn + | | | | +- TermIf + | | | | +- TermApplyInfix + | | | | | +- TermName + | | | | | +- TermName + | | | | | +- LitNull + | | | | +- TermName + | | | | +- TermName + | | | +- LitUnit + | | +- DefnVar + | | | +- PatVar + | | | | +- TermName + | | | +- TermName + | | +- TermWhile + | | | +- TermApplyInfix + | | | | +- TermName + | | | | +- TermName + | | | | +- TermName + | | | +- TermBlock + | | | +- TermAssign + | | | | +- TermName + | | | | +- TermApply + | | | | +- TermSelect + | | | | | +- TermName + | | | | | +- TermName + | | | | +- TermSelect + | | | | | +- TermName + | | | | | +- TermName + | | | | +- TermSelect + | | | | +- TermName + | | | | +- TermName + | | | +- TermIf + | | | | +- TermApplyInfix + | | | | | +- TermApplyType + | | | | | | +- TermSelect + | | | | | | | +- TermName + | | | | | | | +- TermName + | | | | | | +- TypeName + | | | | | +- TermName + | | | | | +- TermSelect + | | | | | +- TermName + | | | | | +- TermName + | | | | +- TermBlock + | | | | | +- DefnVal + | | | | | | +- PatVar + | | | | | | | +- TermName + | | | | | | +- TermNew + | | | | | | +- Init + | | | | | | +- TypeName + | | | | | | +- NameAnonymous + | | | | | | +- TermApplyType + | | | | | | | +- TermSelect + | | | | | | | | +- TermName + | | | | | | | | +- TermName + | | | | | | | +- TypeName + | | | | | | +- TermName + | | | | | +- TermAssign + | | | | | | +- TermSelect + | | | | | | | +- TermName + | | | | | | | +- TermName + | | | | | | +- TermName + | | | | | +- TermAssign + | | | | | +- TermName + | | | | | +- TermName + | | | | +- LitUnit + | | | +- TermAssign + | | | +- TermName + | | | +- TermSelect + | | | +- TermName + | | | +- TermName + | | +- TermApply + | | | +- TermName + | | +- TermName + | +- DefnDef + | | +- ModFinal + | | +- ModOverride + | | +- TermName + | | +- TypeParam + | | | +- TypeName + | | | +- TypeBounds + | | +- TermParam + | | | +- TermName + | | | +- TypeFunction + | | | +- TypeName + | | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | +- TermBlock + | | +- DefnVar + | | | +- PatVar + | | | | +- TermName + | | | +- TermThis + | | | +- NameAnonymous + | | +- DefnVar + | | | +- PatVar + | | | | +- TermName + | | | +- TypeApply + | | | | +- TypeName + | | | | +- TypeName + | | | +- LitNull + | | +- DefnVar + | | | +- PatVar + | | | | +- TermName + | | | +- TypeApply + | | | | +- TypeName + | | | | +- TypeName + | | | +- LitNull + | | +- TermWhile + | | | +- TermApplyInfix + | | | | +- TermName + | | | | +- TermName + | | | | +- TermName + | | | +- TermBlock + | | | +- DefnVal + | | | | +- PatVar + | | | | | +- TermName + | | | | +- TermSelect + | | | | +- TermApply + | | | | | +- TermName + | | | | | +- TermSelect + | | | | | +- TermName + | | | | | +- TermName + | | | | +- TermName + | | | +- TermWhile + | | | | +- TermSelect + | | | | | +- TermName + | | | | | +- TermName + | | | | +- TermBlock + | | | | +- DefnVal + | | | | | +- PatVar + | | | | | | +- TermName + | | | | | +- TermNew + | | | | | +- Init + | | | | | +- TypeName + | | | | | +- NameAnonymous + | | | | | +- TermApply + | | | | | | +- TermSelect + | | | | | | +- TermName + | | | | | | +- TermName + | | | | | +- TermName + | | | | +- TermIf + | | | | | +- TermApplyInfix + | | | | | | +- TermName + | | | | | | +- TermName + | | | | | | +- LitNull + | | | | | +- TermBlock + | | | | | | +- TermAssign + | | | | | | +- TermName + | | | | | | +- TermName + | | | | | +- TermBlock + | | | | | +- TermAssign + | | | | | +- TermSelect + | | | | | | +- TermName + | | | | | | +- TermName + | | | | | +- TermName + | | | | +- TermAssign + | | | | +- TermName + | | | | +- TermName + | | | +- TermAssign + | | | +- TermName + | | | +- TermSelect + | | | +- TermName + | | | +- TermName + | | +- TermIf + | | +- TermApplyInfix + | | | +- TermName + | | | +- TermName + | | | +- LitNull + | | +- TermName + | | +- TermBlock + | | +- TermApply + | | | +- TermName + | | +- TermName + | +- DefnDef + | | +- ModAnnot + | | | +- Init + | | | +- TypeName + | | | +- NameAnonymous + | | +- ModFinal + | | +- ModOverride + | | +- TermName + | | +- TermParam + | | | +- TermName + | | | +- TypeFunction + | | | +- TypeName + | | | +- TypeName + | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | +- TermBlock + | | +- DefnVal + | | | +- PatVar + | | | | +- TermName + | | | +- TermNew + | | | +- Init + | | | +- TypeApply + | | | | +- TypeName + | | | | +- TypeName + | | | +- NameAnonymous + | | +- DefnVar + | | | +- PatVar + | | | | +- TermName + | | | +- TermThis + | | | +- NameAnonymous + | | +- TermWhile + | | | +- TermApplyInfix + | | | | +- TermApplyUnary + | | | | | +- TermName + | | | | | +- TermSelect + | | | | | +- TermName + | | | | | +- TermName + | | | | +- TermName + | | | | +- TermApply + | | | | +- TermName + | | | | +- TermSelect + | | | | +- TermName + | | | | +- TermName + | | | +- TermBlock + | | | +- TermApplyInfix + | | | | +- TermName + | | | | +- TermName + | | | | +- TermSelect + | | | | +- TermName + | | | | +- TermName + | | | +- TermAssign + | | | +- TermName + | | | +- TermSelect + | | | +- TermName + | | | +- TermName + | | +- TermSelect + | | +- TermName + | | +- TermName + | +- DefnDef + | | +- ModAnnot + | | | +- Init + | | | +- TypeName + | | | +- NameAnonymous + | | +- ModFinal + | | +- ModOverride + | | +- TermName + | | +- TermParam + | | | +- TermName + | | | +- TypeFunction + | | | +- TypeName + | | | +- TypeName + | | +- TypeTuple + | | | +- TypeApply + | | | | +- TypeName + | | | | +- TypeName + | | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | +- TermBlock + | | +- DefnVal + | | | +- PatVar + | | | | +- TermName + | | | +- TermNew + | | | +- Init + | | | +- TypeApply + | | | | +- TypeName + | | | | +- TypeName + | | | +- NameAnonymous + | | +- DefnVar + | | | +- PatVar + | | | | +- TermName + | | | +- TermThis + | | | +- NameAnonymous + | | +- TermWhile + | | | +- TermApplyInfix + | | | | +- TermApplyUnary + | | | | | +- TermName + | | | | | +- TermSelect + | | | | | +- TermName + | | | | | +- TermName + | | | | +- TermName + | | | | +- TermApply + | | | | +- TermName + | | | | +- TermSelect + | | | | +- TermName + | | | | +- TermName + | | | +- TermBlock + | | | +- TermApplyInfix + | | | | +- TermName + | | | | +- TermName + | | | | +- TermSelect + | | | | +- TermName + | | | | +- TermName + | | | +- TermAssign + | | | +- TermName + | | | +- TermSelect + | | | +- TermName + | | | +- TermName + | | +- TermTuple + | | +- TermSelect + | | | +- TermName + | | | +- TermName + | | +- TermName + | +- DefnDef + | | +- ModAnnot + | | | +- Init + | | | +- TypeName + | | | +- NameAnonymous + | | +- ModFinal + | | +- ModOverride + | | +- TermName + | | +- TypeParam + | | | +- TypeName + | | | +- TypeBounds + | | +- TermParam + | | | +- TermName + | | | +- TypeFunction + | | | +- TypeName + | | | +- TypeName + | | +- TypeName + | | +- TermBlock + | | +- DefnVar + | | | +- PatVar + | | | | +- TermName + | | | +- TermThis + | | | +- NameAnonymous + | | +- TermWhile + | | +- TermApplyUnary + | | | +- TermName + | | | +- TermSelect + | | | +- TermName + | | | +- TermName + | | +- TermBlock + | | +- TermApply + | | | +- TermName + | | | +- TermSelect + | | | +- TermName + | | | +- TermName + | | +- TermAssign + | | +- TermName + | | +- TermSelect + | | +- TermName + | | +- TermName + | +- DefnDef + | | +- ModFinal + | | +- ModOverride + | | +- TermName + | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | +- TermBlock + | | +- DefnVar + | | | +- PatVar + | | | | +- TermName + | | | +- TypeApply + | | | | +- TypeName + | | | | +- TypeName + | | | +- TermName + | | +- DefnVar + | | | +- PatVar + | | | | +- TermName + | | | +- TermThis + | | | +- NameAnonymous + | | +- TermWhile + | | | +- TermApplyUnary + | | | | +- TermName + | | | | +- TermSelect + | | | | +- TermName + | | | | +- TermName + | | | +- TermBlock + | | | +- TermAssign + | | | | +- TermName + | | | | +- TermApplyInfix + | | | | +- TermSelect + | | | | | +- TermName + | | | | | +- TermName + | | | | +- TermName + | | | | +- TermName + | | | +- TermAssign + | | | +- TermName + | | | +- TermSelect + | | | +- TermName + | | | +- TermName + | | +- TermName + | +- DefnDef + | | +- ModFinal + | | +- ModOverride + | | +- TermName + | | +- TypeParam + | | | +- TypeName + | | | +- TypeBounds + | | +- TermParam + | | | +- TermName + | | | +- TypeName + | | +- TermParam + | | | +- TermName + | | | +- TypeFunction + | | | +- TypeName + | | | +- TypeName + | | | +- TypeName + | | +- TypeName + | | +- TermBlock + | | +- DefnVar + | | | +- PatVar + | | | | +- TermName + | | | +- TermName + | | +- DefnVar + | | | +- PatVar + | | | | +- TermName + | | | +- TypeApply + | | | | +- TypeName + | | | | +- TypeName + | | | +- TermName + | | +- TermWhile + | | | +- TermApplyUnary + | | | | +- TermName + | | | | +- TermSelect + | | | | +- TermName + | | | | +- TermName + | | | +- TermBlock + | | | +- TermAssign + | | | | +- TermName + | | | | +- TermApply + | | | | +- TermName + | | | | +- TermSelect + | | | | | +- TermName + | | | | | +- TermName + | | | | +- TermName + | | | +- TermAssign + | | | +- TermName + | | | +- TermSelect + | | | +- TermName + | | | +- TermName + | | +- TermName + | +- DefnDef + | | +- ModOverride + | | +- ModFinal + | | +- TermName + | | +- TypeName + | | +- TermBlock + | | +- DefnVar + | | | +- PatVar + | | | | +- TermName + | | | +- TermThis + | | | +- NameAnonymous + | | +- DefnVar + | | | +- PatVar + | | | | +- TermName + | | | +- LitInt + | | +- TermWhile + | | | +- TermApplyUnary + | | | | +- TermName + | | | | +- TermSelect + | | | | +- TermName + | | | | +- TermName + | | | +- TermBlock + | | | +- TermApplyInfix + | | | | +- TermName + | | | | +- TermName + | | | | +- LitInt + | | | +- TermAssign + | | | +- TermName + | | | +- TermSelect + | | | +- TermName + | | | +- TermName + | | +- TermName + | +- DefnDef + | | +- ModOverride + | | +- ModFinal + | | +- TermName + | | +- TermParam + | | | +- TermName + | | | +- TypeName + | | +- TypeName + | | +- TermBlock + | | +- DefnDef + | | | +- ModAnnot + | | | | +- Init + | | | | +- TypeName + | | | | +- NameAnonymous + | | | +- TermName + | | | +- TermParam + | | | | +- TermName + | | | | +- TypeName + | | | +- TermParam + | | | | +- TermName + | | | | +- TypeApply + | | | | +- TypeName + | | | | +- TypeName + | | | +- TypeName + | | | +- TermBlock + | | | +- TermIf + | | | +- TermApplyInfix + | | | | +- TermName + | | | | +- TermName + | | | | +- TermName + | | | +- TermIf + | | | | +- TermSelect + | | | | | +- TermName + | | | | | +- TermName + | | | | +- LitInt + | | | | +- LitInt + | | | +- TermIf + | | | +- TermSelect + | | | | +- TermName + | | | | +- TermName + | | | +- LitInt + | | | +- TermApply + | | | +- TermName + | | | +- TermApplyInfix + | | | | +- TermName + | | | | +- TermName + | | | | +- LitInt + | | | +- TermSelect + | | | +- TermName + | | | +- TermName + | | +- TermIf + | | +- TermApplyInfix + | | | +- TermName + | | | +- TermName + | | | +- LitInt + | | +- LitInt + | | +- TermApply + | | +- TermName + | | +- LitInt + | | +- TermName + | +- DefnDef + | | +- ModOverride + | | +- ModFinal + | | +- TermName + | | +- TermParam + | | | +- TermName + | | | +- TypeFunction + | | | +- TypeName + | | | +- TypeName + | | +- TypeName + | | +- TermBlock + | | +- DefnVar + | | | +- PatVar + | | | | +- TermName + | | | +- TypeApply + | | | | +- TypeName + | | | | +- TypeName + | | | +- TermThis + | | | +- NameAnonymous + | | +- TermWhile + | | | +- TermApplyUnary + | | | | +- TermName + | | | | +- TermSelect + | | | | +- TermName + | | | | +- TermName + | | | +- TermBlock + | | | +- TermIf + | | | | +- TermApplyUnary + | | | | | +- TermName + | | | | | +- TermApply + | | | | | +- TermName + | | | | | +- TermSelect + | | | | | +- TermName + | | | | | +- TermName + | | | | +- TermReturn + | | | | | +- LitBoolean + | | | | +- LitUnit + | | | +- TermAssign + | | | +- TermName + | | | +- TermSelect + | | | +- TermName + | | | +- TermName + | | +- LitBoolean + | +- DefnDef + | | +- ModOverride + | | +- ModFinal + | | +- TermName + | | +- TermParam + | | | +- TermName + | | | +- TypeFunction + | | | +- TypeName + | | | +- TypeName + | | +- TypeName + | | +- TermBlock + | | +- DefnVar + | | | +- PatVar + | | | | +- TermName + | | | +- TypeApply + | | | | +- TypeName + | | | | +- TypeName + | | | +- TermThis + | | | +- NameAnonymous + | | +- TermWhile + | | | +- TermApplyUnary + | | | | +- TermName + | | | | +- TermSelect + | | | | +- TermName + | | | | +- TermName + | | | +- TermBlock + | | | +- TermIf + | | | | +- TermApply + | | | | | +- TermName + | | | | | +- TermSelect + | | | | | +- TermName + | | | | | +- TermName + | | | | +- TermReturn + | | | | | +- LitBoolean + | | | | +- LitUnit + | | | +- TermAssign + | | | +- TermName + | | | +- TermSelect + | | | +- TermName + | | | +- TermName + | | +- LitBoolean + | +- DefnDef + | | +- ModOverride + | | +- ModFinal + | | +- TermName + | | +- TypeParam + | | | +- TypeName + | | | +- TypeBounds + | | | +- TypeName + | | +- TermParam + | | | +- TermName + | | | +- TypeName + | | +- TypeName + | | +- TermBlock + | | +- DefnVar + | | | +- PatVar + | | | | +- TermName + | | | +- TypeApply + | | | | +- TypeName + | | | | +- TypeName + | | | +- TermThis + | | | +- NameAnonymous + | | +- TermWhile + | | | +- TermApplyUnary + | | | | +- TermName + | | | | +- TermSelect + | | | | +- TermName + | | | | +- TermName + | | | +- TermBlock + | | | +- TermIf + | | | | +- TermApplyInfix + | | | | | +- TermSelect + | | | | | | +- TermName + | | | | | | +- TermName + | | | | | +- TermName + | | | | | +- TermName + | | | | +- TermReturn + | | | | | +- LitBoolean + | | | | +- LitUnit + | | | +- TermAssign + | | | +- TermName + | | | +- TermSelect + | | | +- TermName + | | | +- TermName + | | +- LitBoolean + | +- DefnDef + | +- ModOverride + | +- ModFinal + | +- TermName + | +- TermParam + | | +- TermName + | | +- TypeFunction + | | +- TypeName + | | +- TypeName + | +- TypeApply + | | +- TypeName + | | +- TypeName + | +- TermBlock + | +- DefnVar + | | +- PatVar + | | | +- TermName + | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | +- TermThis + | | +- NameAnonymous + | +- TermWhile + | | +- TermApplyUnary + | | | +- TermName + | | | +- TermSelect + | | | +- TermName + | | | +- TermName + | | +- TermBlock + | | +- TermIf + | | | +- TermApply + | | | | +- TermName + | | | | +- TermSelect + | | | | +- TermName + | | | | +- TermName + | | | +- TermReturn + | | | | +- TermApply + | | | | +- TermName + | | | | +- TermSelect + | | | | +- TermName + | | | | +- TermName + | | | +- LitUnit + | | +- TermAssign + | | +- TermName + | | +- TermSelect + | | +- TermName + | | +- TermName + | +- TermName + +- DefnClass + | +- ModFinal + | +- ModCase + | +- TypeName + | +- TypeParam + | | +- ModCovariant + | | +- TypeName + | | +- TypeBounds + | +- CtorPrimary + | | +- NameAnonymous + | | +- TermParam + | | | +- ModOverride + | | | +- ModValParam + | | | +- TermName + | | | +- TypeName + | | +- TermParam + | | +- ModPrivate + | | | +- NameIndeterminate + | | +- ModVarParam + | | +- TermName + | | +- TypeApply + | | +- TypeName + | | +- TypeAnnotate + | | +- TypeName + | | +- ModAnnot + | | +- Init + | | +- TypeName + | | +- NameAnonymous + | +- Template + | +- Init + | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | +- NameAnonymous + | +- Self + | | +- NameAnonymous + | +- TermApply + | | +- TermName + | +- DefnDef + | | +- ModOverride + | | +- TermName + | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | +- TermApply + | | +- TermName + | | +- TermName + | +- DefnDef + | +- ModOverride + | +- TermName + | +- TypeApply + | | +- TypeName + | | +- TypeName + | +- TermName + +- DefnObject + | +- ModCase + | +- TermName + | +- Template + | +- Init + | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | +- NameAnonymous + | +- Self + | | +- NameAnonymous + | +- DefnDef + | | +- ModOverride + | | +- TermName + | | +- TypeName + | | +- TermThrow + | | +- TermNew + | | +- Init + | | +- TypeName + | | +- NameAnonymous + | | +- LitString + | +- DefnDef + | | +- ModOverride + | | +- TermName + | | +- TypeSingleton + | | | +- TermName + | | +- TermName + | +- DefnDef + | | +- ModOverride + | | +- TermName + | | +- TypeName + | | +- TermThrow + | | +- TermNew + | | +- Init + | | +- TypeName + | | +- NameAnonymous + | | +- LitString + | +- DefnDef + | | +- ModOverride + | | +- TermName + | | +- TypeName + | | +- TermThrow + | | +- TermNew + | | +- Init + | | +- TypeName + | | +- NameAnonymous + | | +- LitString + | +- DefnDef + | | +- ModOverride + | | +- TermName + | | +- TypeName + | | +- TermThrow + | | +- TermNew + | | +- Init + | | +- TypeName + | | +- NameAnonymous + | | +- LitString + | +- DefnDef + | | +- ModOverride + | | +- TermName + | | +- TypeName + | | +- LitInt + | +- DefnDef + | | +- ModOverride + | | +- TermName + | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | +- TermSelect + | | +- TermName + | | +- TermName + | +- DefnDef + | | +- ModOverride + | | +- TermName + | | +- TypeParam + | | | +- TypeName + | | | +- TypeBounds + | | +- TypeParam + | | | +- TypeName + | | | +- TypeBounds + | | +- TermParam + | | | +- ModImplicit + | | | +- TermName + | | | +- TypeFunction + | | | +- TypeName + | | | +- TypeTuple + | | | +- TypeName + | | | +- TypeName + | | +- TypeTuple + | | | +- TypeApply + | | | | +- TypeName + | | | | +- TypeName + | | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | +- TermName + | +- DefnVal + | +- ModAnnot + | | +- Init + | | +- TypeName + | | +- NameAnonymous + | +- ModPrivate + | | +- TermThis + | | +- NameAnonymous + | +- PatVar + | | +- TermName + | +- TermTuple + | +- TermName + | +- TermName + +- DefnObject + +- ModAnnot + | +- Init + | +- TypeName + | +- NameAnonymous + | +- LitLong + +- TermName + +- Template + +- Init + | +- TypeApply + | | +- TypeName + | | +- TypeName + | +- NameAnonymous + +- Self + | +- NameAnonymous + +- DefnVal + | +- ModPrivate + | | +- NameAnonymous + | +- PatVar + | | +- TermName + | +- TermTuple + | +- TermName + | +- TermName + +- DefnDef + | +- TermName + | +- TypeParam + | | +- TypeName + | | +- TypeBounds + | +- TermParam + | | +- TermName + | | +- TypeApply + | | +- TypeSelect + | | | +- TermName + | | | +- TypeName + | | +- TypeName + | +- TypeApply + | | +- TypeName + | | +- TypeName + | +- TermMatch + | +- TermName + | +- Case + | | +- PatTyped + | | | +- PatVar + | | | | +- TermName + | | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | +- TermName + | +- Case + | | +- PatWildcard + | | +- TermApplyInfix + | | | +- TermSelect + | | | | +- TermName + | | | | +- TermName + | | | +- TermName + | | | +- LitInt + | | +- TermApplyType + | | +- TermName + | | +- TypeName + | +- Case + | | +- PatTyped + | | | +- PatVar + | | | | +- TermName + | | | +- TypeApply + | | | +- TypeName + | | | +- TypeName + | | +- TermSelect + | | +- TermName + | | +- TermName + | +- Case + | +- PatWildcard + | +- TermSelect + | +- TermApply + | | +- TermSelect + | | | +- TermName + | | | +- TermName + | | +- TermName + | +- TermName + +- DefnDef + | +- TermName + | +- TypeParam + | | +- TypeName + | | +- TypeBounds + | +- TypeApply + | | +- TypeName + | | +- TypeName + | | +- TypeApply + | | +- TypeName + | | +- TypeName + | +- TermNew + | +- Init + | +- TypeName + | +- NameAnonymous + +- DefnDef + | +- TermName + | +- TypeParam + | | +- TypeName + | | +- TypeBounds + | +- TypeApply + | | +- TypeName + | | +- TypeName + | +- TermName + +- DefnVal + +- ModAnnot + | +- Init + | +- TypeName + | +- NameAnonymous + +- ModPrivate + | +- NameIndeterminate + +- PatVar + | +- TermName + +- TermNewAnonymous + +- Template + +- Init + | +- TypeApply + | | +- TypeName + | | +- TypeName + | | +- TypeName + | +- NameAnonymous + +- Self + | +- NameAnonymous + +- DefnDef + +- TermName + +- TermParam + | +- TermName + | +- TypeName + +- TypeName + +- TermThis + +- NameAnonymous diff --git a/pmd-scala/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/package.txt b/pmd-scala/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/package.txt index 0f6823b890..0a5eedd4b5 100644 --- a/pmd-scala/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/package.txt +++ b/pmd-scala/src/test/resources/net/sourceforge/pmd/lang/scala/ast/testdata/package.txt @@ -1,90 +1,90 @@ -└─ Source - └─ Pkg - ├─ TermSelect - │ ├─ TermName - │ └─ TermName - └─ PkgObject - ├─ TermName - └─ Template - ├─ Self - │ └─ NameAnonymous - ├─ DefnType - │ ├─ TypeName - │ └─ TypeSelect - │ ├─ TermSelect - │ │ ├─ TermName - │ │ └─ TermName - │ └─ TypeName - ├─ DefnVal - │ ├─ PatVar - │ │ └─ TermName - │ └─ TermSelect - │ ├─ TermSelect - │ │ ├─ TermName - │ │ └─ TermName - │ └─ TermName - ├─ DefnType - │ ├─ TypeName - │ └─ TypeSelect - │ ├─ TermSelect - │ │ ├─ TermName - │ │ └─ TermName - │ └─ TypeName - ├─ DefnVal - │ ├─ PatVar - │ │ └─ TermName - │ └─ TermSelect - │ ├─ TermSelect - │ │ ├─ TermName - │ │ └─ TermName - │ └─ TermName - ├─ DefnType - │ ├─ ModAnnot - │ │ └─ Init - │ │ ├─ TypeName - │ │ ├─ NameAnonymous - │ │ ├─ LitString - │ │ └─ LitString - │ ├─ TypeName - │ ├─ TypeParam - │ │ ├─ ModCovariant - │ │ ├─ TypeName - │ │ └─ TypeBounds - │ └─ TypeApply - │ ├─ TypeName - │ └─ TypeName - ├─ DefnVal - │ ├─ ModAnnot - │ │ └─ Init - │ │ ├─ TypeName - │ │ ├─ NameAnonymous - │ │ ├─ LitString - │ │ └─ LitString - │ ├─ PatVar - │ │ └─ TermName - │ └─ TermName - └─ DefnType - ├─ ModAnnot - │ └─ Init - │ ├─ TypeName - │ ├─ NameAnonymous - │ ├─ LitString - │ └─ LitString - ├─ TypeName - ├─ TypeParam - │ ├─ TypeName - │ └─ TypeBounds - ├─ TypeParam - │ ├─ ModCovariant - │ ├─ TypeName - │ └─ TypeBounds - └─ TypeApply - ├─ TypeSelect - │ ├─ TermSelect - │ │ ├─ TermSelect - │ │ │ ├─ TermName - │ │ │ └─ TermName - │ │ └─ TermName - │ └─ TypeName - ├─ TypeName - └─ TypeName ++- Source + +- Pkg + +- TermSelect + | +- TermName + | +- TermName + +- PkgObject + +- TermName + +- Template + +- Self + | +- NameAnonymous + +- DefnType + | +- TypeName + | +- TypeSelect + | +- TermSelect + | | +- TermName + | | +- TermName + | +- TypeName + +- DefnVal + | +- PatVar + | | +- TermName + | +- TermSelect + | +- TermSelect + | | +- TermName + | | +- TermName + | +- TermName + +- DefnType + | +- TypeName + | +- TypeSelect + | +- TermSelect + | | +- TermName + | | +- TermName + | +- TypeName + +- DefnVal + | +- PatVar + | | +- TermName + | +- TermSelect + | +- TermSelect + | | +- TermName + | | +- TermName + | +- TermName + +- DefnType + | +- ModAnnot + | | +- Init + | | +- TypeName + | | +- NameAnonymous + | | +- LitString + | | +- LitString + | +- TypeName + | +- TypeParam + | | +- ModCovariant + | | +- TypeName + | | +- TypeBounds + | +- TypeApply + | +- TypeName + | +- TypeName + +- DefnVal + | +- ModAnnot + | | +- Init + | | +- TypeName + | | +- NameAnonymous + | | +- LitString + | | +- LitString + | +- PatVar + | | +- TermName + | +- TermName + +- DefnType + +- ModAnnot + | +- Init + | +- TypeName + | +- NameAnonymous + | +- LitString + | +- LitString + +- TypeName + +- TypeParam + | +- TypeName + | +- TypeBounds + +- TypeParam + | +- ModCovariant + | +- TypeName + | +- TypeBounds + +- TypeApply + +- TypeSelect + | +- TermSelect + | | +- TermSelect + | | | +- TermName + | | | +- TermName + | | +- TermName + | +- TypeName + +- TypeName + +- TypeName