diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/Bug1429.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/Bug1429.txt index c185aa487a..b1a0d5889e 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/Bug1429.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/Bug1429.txt @@ -91,7 +91,7 @@ | +- MethodCall[@CompileTimeConstant = "false", @Image = "concat", @MethodName = "concat", @ParenthesisDepth = "0", @Parenthesized = "false"] | | +- VariableAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "result", @Name = "result", @ParenthesisDepth = "0", @Parenthesized = "false"] | | +- ArgumentList[@Size = "1"] - | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = ":", @Empty = "false", @Image = "":"", @Length = "1", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = ":", @Empty = "false", @Image = "\":\"", @Length = "1", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | +- ArgumentList[@Size = "1"] | +- VariableAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "value", @Name = "value", @ParenthesisDepth = "0", @Parenthesized = "false"] +- ReturnStatement[] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases.txt index 51a5694e6f..6fc2e4a168 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases.txt @@ -44,7 +44,7 @@ | | | +- TypeExpression[@CompileTimeConstant = "false", @ParenthesisDepth = "0", @Parenthesized = "false"] | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "System"] | | +- ArgumentList[@Size = "1"] - | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Outer constructor", @Empty = "false", @Image = ""Outer constructor"", @Length = "17", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Outer constructor", @Empty = "false", @Image = "\"Outer constructor\"", @Length = "17", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | +- ClassOrInterfaceDeclaration[@Abstract = "false", @Annotation = "false", @Anonymous = "false", @BinaryName = "Outer$Inner", @CanonicalName = "Outer.Inner", @EffectiveVisibility = "package", @Enum = "false", @Final = "false", @Interface = "false", @Local = "false", @Nested = "true", @PackageName = "", @PackagePrivate = "true", @Record = "false", @RegularClass = "true", @SimpleName = "Inner", @TopLevel = "false", @Visibility = "package"] | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | +- ClassOrInterfaceBody[@Size = "1"] @@ -58,7 +58,7 @@ | | +- TypeExpression[@CompileTimeConstant = "false", @ParenthesisDepth = "0", @Parenthesized = "false"] | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "System"] | +- ArgumentList[@Size = "1"] - | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Inner constructor", @Empty = "false", @Image = ""Inner constructor"", @Length = "17", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Inner constructor", @Empty = "false", @Image = "\"Inner constructor\"", @Length = "17", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] +- ClassOrInterfaceDeclaration[@Abstract = "false", @Annotation = "false", @Anonymous = "false", @BinaryName = "Child", @CanonicalName = "Child", @EffectiveVisibility = "package", @Enum = "false", @Final = "false", @Interface = "false", @Local = "false", @Nested = "false", @PackageName = "", @PackagePrivate = "true", @Record = "false", @RegularClass = "true", @SimpleName = "Child", @TopLevel = "true", @Visibility = "package"] | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | +- ExtendsList[@Size = "1"] @@ -82,7 +82,7 @@ | | +- TypeExpression[@CompileTimeConstant = "false", @ParenthesisDepth = "0", @Parenthesized = "false"] | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "System"] | +- ArgumentList[@Size = "1"] - | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Child constructor", @Empty = "false", @Image = ""Child constructor"", @Length = "17", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Child constructor", @Empty = "false", @Image = "\"Child constructor\"", @Length = "17", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] +- ClassOrInterfaceDeclaration[@Abstract = "false", @Annotation = "false", @Anonymous = "false", @BinaryName = "ParserCornerCases", @CanonicalName = "ParserCornerCases", @EffectiveVisibility = "public", @Enum = "false", @Final = "false", @Interface = "false", @Local = "false", @Nested = "false", @PackageName = "", @PackagePrivate = "false", @Record = "false", @RegularClass = "true", @SimpleName = "ParserCornerCases", @TopLevel = "true", @Visibility = "public"] | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] | +- ExtendsList[@Size = "1"] @@ -153,7 +153,7 @@ | | | +- TypeArguments[@Diamond = "false", @Size = "1"] | | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"] | | | +- ArgumentList[@Size = "1"] - | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "foo", @Empty = "false", @Image = ""foo"", @Length = "3", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "foo", @Empty = "false", @Image = "\"foo\"", @Length = "3", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | | +- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "false", @TypeInferred = "false", @Visibility = "local"] | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"] @@ -164,7 +164,7 @@ | | +- TypeArguments[@Diamond = "false", @Size = "1"] | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"] | | +- ArgumentList[@Size = "1"] - | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "bar", @Empty = "false", @Image = ""bar"", @Length = "3", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "bar", @Empty = "false", @Image = "\"bar\"", @Length = "3", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | +- MethodDeclaration[@Abstract = "false", @Arity = "1", @EffectiveVisibility = "package", @Image = "thisGeneric", @Name = "thisGeneric", @Overridden = "false", @Varargs = "false", @Visibility = "package", @Void = "false"] | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | | +- TypeParameters[@Size = "1"] @@ -206,7 +206,7 @@ | +- MethodCall[@CompileTimeConstant = "false", @Image = "append", @MethodName = "append", @ParenthesisDepth = "0", @Parenthesized = "false"] | +- AmbiguousName[@CompileTimeConstant = "false", @Image = "buf", @Name = "buf", @ParenthesisDepth = "0", @Parenthesized = "false"] | +- ArgumentList[@Size = "1"] - | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "shift ", @Empty = "false", @Image = ""shift "", @Length = "6", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "shift ", @Empty = "false", @Image = "\"shift \"", @Length = "6", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] +- ClassOrInterfaceDeclaration[@Abstract = "false", @Annotation = "false", @Anonymous = "false", @BinaryName = "PmdTestParent", @CanonicalName = "PmdTestParent", @EffectiveVisibility = "package", @Enum = "false", @Final = "false", @Interface = "false", @Local = "false", @Nested = "false", @PackageName = "", @PackagePrivate = "true", @Record = "false", @RegularClass = "true", @SimpleName = "PmdTestParent", @TopLevel = "true", @Visibility = "package"] | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | +- ClassOrInterfaceBody[@Size = "1"] @@ -295,7 +295,7 @@ | +- ExpressionStatement[] | +- AssignmentExpression[@CompileTimeConstant = "false", @Compound = "false", @Operator = "=", @ParenthesisDepth = "0", @Parenthesized = "false"] | +- VariableAccess[@AccessType = "WRITE", @CompileTimeConstant = "false", @Image = "name", @Name = "name", @ParenthesisDepth = "0", @Parenthesized = "false"] - | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "test", @Empty = "false", @Image = ""test"", @Length = "4", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "test", @Empty = "false", @Image = "\"test\"", @Length = "4", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] +- ClassOrInterfaceDeclaration[@Abstract = "false", @Annotation = "false", @Anonymous = "false", @BinaryName = "SimpleBeanUser2", @CanonicalName = "SimpleBeanUser2", @EffectiveVisibility = "package", @Enum = "false", @Final = "false", @Interface = "false", @Local = "false", @Nested = "false", @PackageName = "", @PackagePrivate = "true", @Record = "false", @RegularClass = "true", @SimpleName = "SimpleBeanUser2", @TopLevel = "true", @Visibility = "package"] | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | +- ExtendsList[@Size = "1"] @@ -318,7 +318,7 @@ | +- ExpressionStatement[] | +- AssignmentExpression[@CompileTimeConstant = "false", @Compound = "false", @Operator = "=", @ParenthesisDepth = "0", @Parenthesized = "false"] | +- VariableAccess[@AccessType = "WRITE", @CompileTimeConstant = "false", @Image = "name", @Name = "name", @ParenthesisDepth = "0", @Parenthesized = "false"] - | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "test2", @Empty = "false", @Image = ""test2"", @Length = "5", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "test2", @Empty = "false", @Image = "\"test2\"", @Length = "5", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] +- ClassOrInterfaceDeclaration[@Abstract = "false", @Annotation = "false", @Anonymous = "false", @BinaryName = "TestParseAnnototation", @CanonicalName = "TestParseAnnototation", @EffectiveVisibility = "package", @Enum = "false", @Final = "false", @Interface = "false", @Local = "false", @Nested = "false", @PackageName = "", @PackagePrivate = "true", @Record = "false", @RegularClass = "true", @SimpleName = "TestParseAnnototation", @TopLevel = "true", @Visibility = "package"] | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | +- ClassOrInterfaceBody[@Size = "1"] @@ -335,7 +335,7 @@ | | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "SuppressWarnings"] | | | | +- AnnotationMemberList[@Size = "1"] | | | | +- MemberValuePair[@Image = "value", @Name = "value", @Shorthand = "true"] - | | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "unchecked", @Empty = "false", @Image = ""unchecked"", @Length = "9", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "unchecked", @Empty = "false", @Image = "\"unchecked\"", @Length = "9", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | | | +- PrimitiveType[@Kind = "int"] | | | +- VariableDeclarator[@Initializer = "true", @Name = "i"] | | | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "i", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"] @@ -356,7 +356,7 @@ | | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "SuppressWarnings"] | | | | +- AnnotationMemberList[@Size = "1"] | | | | +- MemberValuePair[@Image = "value", @Name = "value", @Shorthand = "true"] - | | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "unchecked", @Empty = "false", @Image = ""unchecked"", @Length = "9", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "unchecked", @Empty = "false", @Image = "\"unchecked\"", @Length = "9", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "Iterator"] | | | +- VariableDeclarator[@Initializer = "true", @Name = "it"] | | | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "it", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"] @@ -388,7 +388,7 @@ | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "SuppressWarnings"] | | | +- AnnotationMemberList[@Size = "1"] | | | +- MemberValuePair[@Image = "value", @Name = "value", @Shorthand = "true"] - | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "unchecked", @Empty = "false", @Image = ""unchecked"", @Length = "9", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "unchecked", @Empty = "false", @Image = "\"unchecked\"", @Length = "9", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = "false", @Name = "s"] | | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "s", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"] @@ -439,7 +439,7 @@ | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = "true", @Name = "fish"] | | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "fish", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"] - | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "salmon", @Empty = "false", @Image = ""salmon"", @Length = "6", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "salmon", @Empty = "false", @Image = "\"salmon\"", @Length = "6", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | +- ReturnStatement[] | +- VariableAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "fish", @Name = "fish", @ParenthesisDepth = "0", @Parenthesized = "false"] +- ClassOrInterfaceDeclaration[@Abstract = "false", @Annotation = "false", @Anonymous = "false", @BinaryName = "SuperTest", @CanonicalName = "SuperTest", @EffectiveVisibility = "package", @Enum = "false", @Final = "false", @Interface = "false", @Local = "false", @Nested = "false", @PackageName = "", @PackagePrivate = "true", @Record = "false", @RegularClass = "true", @SimpleName = "SuperTest", @TopLevel = "true", @Visibility = "package"] @@ -617,7 +617,7 @@ | +- Block[@Size = "0", @containsComment = "false"] +- IfStatement[@Else = "false"] | +- MethodCall[@CompileTimeConstant = "false", @Image = "equals", @MethodName = "equals", @ParenthesisDepth = "0", @Parenthesized = "false"] - | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "a", @Empty = "false", @Image = ""a"", @Length = "1", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "a", @Empty = "false", @Image = "\"a\"", @Length = "1", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | | +- ArgumentList[@Size = "1"] | | +- MethodCall[@CompileTimeConstant = "false", @Image = "getName", @MethodName = "getName", @ParenthesisDepth = "0", @Parenthesized = "false"] | | +- ClassLiteral[@CompileTimeConstant = "false", @ParenthesisDepth = "1", @Parenthesized = "true"] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases17.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases17.txt index 968bad85f9..698aeedd4d 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases17.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases17.txt @@ -249,7 +249,7 @@ | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = "true", @Name = "dayOfWeekArg"] | | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "dayOfWeekArg", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"] - | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Wednesday", @Empty = "false", @Image = ""Wednesday"", @Length = "9", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Wednesday", @Empty = "false", @Image = "\"Wednesday\"", @Length = "9", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | +- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "false", @TypeInferred = "false", @Visibility = "local"] | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"] @@ -259,44 +259,44 @@ | | +- VariableAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "dayOfWeekArg", @Name = "dayOfWeekArg", @ParenthesisDepth = "0", @Parenthesized = "false"] | | +- SwitchFallthroughBranch[@Default = "false"] | | | +- SwitchLabel[@Default = "false"] - | | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Monday", @Empty = "false", @Image = ""Monday"", @Length = "6", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Monday", @Empty = "false", @Image = "\"Monday\"", @Length = "6", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | | | +- ExpressionStatement[] | | | | +- AssignmentExpression[@CompileTimeConstant = "false", @Compound = "false", @Operator = "=", @ParenthesisDepth = "0", @Parenthesized = "false"] | | | | +- VariableAccess[@AccessType = "WRITE", @CompileTimeConstant = "false", @Image = "typeOfDay", @Name = "typeOfDay", @ParenthesisDepth = "0", @Parenthesized = "false"] - | | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Start of work week", @Empty = "false", @Image = ""Start of work week"", @Length = "18", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Start of work week", @Empty = "false", @Image = "\"Start of work week\"", @Length = "18", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | | | +- BreakStatement[@Label = null] | | +- SwitchFallthroughBranch[@Default = "false"] | | | +- SwitchLabel[@Default = "false"] - | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Tuesday", @Empty = "false", @Image = ""Tuesday"", @Length = "7", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Tuesday", @Empty = "false", @Image = "\"Tuesday\"", @Length = "7", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | | +- SwitchFallthroughBranch[@Default = "false"] | | | +- SwitchLabel[@Default = "false"] - | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Wednesday", @Empty = "false", @Image = ""Wednesday"", @Length = "9", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Wednesday", @Empty = "false", @Image = "\"Wednesday\"", @Length = "9", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | | +- SwitchFallthroughBranch[@Default = "false"] | | | +- SwitchLabel[@Default = "false"] - | | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Thursday", @Empty = "false", @Image = ""Thursday"", @Length = "8", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Thursday", @Empty = "false", @Image = "\"Thursday\"", @Length = "8", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | | | +- ExpressionStatement[] | | | | +- AssignmentExpression[@CompileTimeConstant = "false", @Compound = "false", @Operator = "=", @ParenthesisDepth = "0", @Parenthesized = "false"] | | | | +- VariableAccess[@AccessType = "WRITE", @CompileTimeConstant = "false", @Image = "typeOfDay", @Name = "typeOfDay", @ParenthesisDepth = "0", @Parenthesized = "false"] - | | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Midweek", @Empty = "false", @Image = ""Midweek"", @Length = "7", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Midweek", @Empty = "false", @Image = "\"Midweek\"", @Length = "7", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | | | +- BreakStatement[@Label = null] | | +- SwitchFallthroughBranch[@Default = "false"] | | | +- SwitchLabel[@Default = "false"] - | | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Friday", @Empty = "false", @Image = ""Friday"", @Length = "6", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Friday", @Empty = "false", @Image = "\"Friday\"", @Length = "6", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | | | +- ExpressionStatement[] | | | | +- AssignmentExpression[@CompileTimeConstant = "false", @Compound = "false", @Operator = "=", @ParenthesisDepth = "0", @Parenthesized = "false"] | | | | +- VariableAccess[@AccessType = "WRITE", @CompileTimeConstant = "false", @Image = "typeOfDay", @Name = "typeOfDay", @ParenthesisDepth = "0", @Parenthesized = "false"] - | | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "End of work week", @Empty = "false", @Image = ""End of work week"", @Length = "16", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "End of work week", @Empty = "false", @Image = "\"End of work week\"", @Length = "16", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | | | +- BreakStatement[@Label = null] | | +- SwitchFallthroughBranch[@Default = "false"] | | | +- SwitchLabel[@Default = "false"] - | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Saturday", @Empty = "false", @Image = ""Saturday"", @Length = "8", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Saturday", @Empty = "false", @Image = "\"Saturday\"", @Length = "8", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | | +- SwitchFallthroughBranch[@Default = "false"] | | | +- SwitchLabel[@Default = "false"] - | | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Sunday", @Empty = "false", @Image = ""Sunday"", @Length = "6", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Sunday", @Empty = "false", @Image = "\"Sunday\"", @Length = "6", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | | | +- ExpressionStatement[] | | | | +- AssignmentExpression[@CompileTimeConstant = "false", @Compound = "false", @Operator = "=", @ParenthesisDepth = "0", @Parenthesized = "false"] | | | | +- VariableAccess[@AccessType = "WRITE", @CompileTimeConstant = "false", @Image = "typeOfDay", @Name = "typeOfDay", @ParenthesisDepth = "0", @Parenthesized = "false"] - | | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Weekend", @Empty = "false", @Image = ""Weekend"", @Length = "7", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Weekend", @Empty = "false", @Image = "\"Weekend\"", @Length = "7", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | | | +- BreakStatement[@Label = null] | | +- SwitchFallthroughBranch[@Default = "true"] | | +- SwitchLabel[@Default = "true"] @@ -305,7 +305,7 @@ | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "IllegalArgumentException"] | | +- ArgumentList[@Size = "1"] | | +- InfixExpression[@CompileTimeConstant = "false", @Operator = "+", @ParenthesisDepth = "0", @Parenthesized = "false"] - | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Invalid day of the week: ", @Empty = "false", @Image = ""Invalid day of the week: "", @Length = "25", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Invalid day of the week: ", @Empty = "false", @Image = "\"Invalid day of the week: \"", @Length = "25", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | | +- VariableAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "dayOfWeekArg", @Name = "dayOfWeekArg", @ParenthesisDepth = "0", @Parenthesized = "false"] | +- ReturnStatement[] | +- VariableAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "typeOfDay", @Name = "typeOfDay", @ParenthesisDepth = "0", @Parenthesized = "false"] @@ -358,7 +358,7 @@ | | +- MethodCall[@CompileTimeConstant = "false", @Image = "add", @MethodName = "add", @ParenthesisDepth = "0", @Parenthesized = "false"] | | +- VariableAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "list", @Name = "list", @ParenthesisDepth = "0", @Parenthesized = "false"] | | +- ArgumentList[@Size = "1"] - | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "A", @Empty = "false", @Image = ""A"", @Length = "1", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "A", @Empty = "false", @Image = "\"A\"", @Length = "1", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | +- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "false", @TypeInferred = "false", @Visibility = "local"] | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "List"] @@ -387,7 +387,7 @@ | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "MyClass"] | | +- TypeArguments[@Diamond = "true", @Size = "0"] | +- ArgumentList[@Size = "1"] - | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "", @Empty = "true", @Image = """", @Length = "0", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "", @Empty = "true", @Image = "\"\"", @Length = "0", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] +- MethodDeclaration[@Abstract = "false", @Arity = "0", @EffectiveVisibility = "public", @Image = "theTryWithResourcesStatement", @Name = "theTryWithResourcesStatement", @Overridden = "false", @Varargs = "false", @Visibility = "public", @Void = "true"] | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] | +- VoidType[] @@ -400,7 +400,7 @@ | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = "true", @Name = "path"] | | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "path", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"] - | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "/foo", @Empty = "false", @Image = ""/foo"", @Length = "4", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "/foo", @Empty = "false", @Image = "\"/foo\"", @Length = "4", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | +- TryStatement[@TryWithResources = "true"] | | +- ResourceList[@Size = "1", @TrailingSemiColon = "false"] | | | +- Resource[@ConciseResource = "false", @StableName = "br"] @@ -430,13 +430,13 @@ | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = "true", @Name = "outputFileName"] | | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "outputFileName", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"] - | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "/foo-out", @Empty = "false", @Image = ""/foo-out"", @Length = "8", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "/foo-out", @Empty = "false", @Image = "\"/foo-out\"", @Length = "8", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | +- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "false", @TypeInferred = "false", @Visibility = "local"] | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"] | | +- VariableDeclarator[@Initializer = "true", @Name = "zipFileName"] | | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "zipFileName", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"] - | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "/foo.zip", @Empty = "false", @Image = ""/foo.zip"", @Length = "8", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "/foo.zip", @Empty = "false", @Image = "\"/foo.zip\"", @Length = "8", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | +- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "false", @TypeInferred = "false", @Visibility = "local"] | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | | +- ClassOrInterfaceType[@FullyQualified = "true", @SimpleName = "Charset"] @@ -446,7 +446,7 @@ | | +- TypeExpression[@CompileTimeConstant = "false", @ParenthesisDepth = "0", @Parenthesized = "false"] | | | +- ClassOrInterfaceType[@FullyQualified = "true", @SimpleName = "Charset"] | | +- ArgumentList[@Size = "1"] - | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "US-ASCII", @Empty = "false", @Image = ""US-ASCII"", @Length = "8", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "US-ASCII", @Empty = "false", @Image = "\"US-ASCII\"", @Length = "8", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | +- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "false", @TypeInferred = "false", @Visibility = "local"] | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | | +- ClassOrInterfaceType[@FullyQualified = "true", @SimpleName = "Path"] @@ -508,7 +508,7 @@ | | +- TypeExpression[@CompileTimeConstant = "false", @ParenthesisDepth = "0", @Parenthesized = "false"] | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "System"] | | +- ArgumentList[@Size = "1"] - | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "line.separator", @Empty = "false", @Image = ""line.separator"", @Length = "14", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "line.separator", @Empty = "false", @Image = "\"line.separator\"", @Length = "14", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | +- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "false", @TypeInferred = "false", @Visibility = "local"] | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"] @@ -547,7 +547,7 @@ | | | +- ConstructorCall[@AnonymousClass = "false", @CompileTimeConstant = "false", @DiamondTypeArgs = "false", @MethodName = "new", @ParenthesisDepth = "0", @Parenthesized = "false", @QualifiedInstanceCreation = "false"] | | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "File"] | | | | +- ArgumentList[@Size = "1"] - | | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "foo", @Empty = "false", @Image = ""foo"", @Length = "3", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "foo", @Empty = "false", @Image = "\"foo\"", @Length = "3", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | | | +- ArgumentList[@Size = "0"] | | +- Block[@Size = "1", @containsComment = "false"] | | +- ThrowStatement[] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases18.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases18.txt index 00a3930c96..934e32b8a6 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases18.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/ParserCornerCases18.txt @@ -33,7 +33,7 @@ | | | | +- VariableAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "f", @Name = "f", @ParenthesisDepth = "0", @Parenthesized = "false"] | | | | +- ArgumentList[@Size = "0"] | | | +- ArgumentList[@Size = "1"] - | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = ".java", @Empty = "false", @Image = "".java"", @Length = "5", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = ".java", @Empty = "false", @Image = "\".java\"", @Length = "5", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | | +- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "false", @TypeInferred = "false", @Visibility = "local"] | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "FileFilter"] @@ -49,7 +49,7 @@ | | | | +- VariableAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "f", @Name = "f", @ParenthesisDepth = "0", @Parenthesized = "false"] | | | | +- ArgumentList[@Size = "0"] | | | +- ArgumentList[@Size = "1"] - | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = ".java", @Empty = "false", @Image = "".java"", @Length = "5", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = ".java", @Empty = "false", @Image = "\".java\"", @Length = "5", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | | +- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "false", @TypeInferred = "false", @Visibility = "local"] | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "FileFilter"] @@ -65,7 +65,7 @@ | | | | +- VariableAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "f", @Name = "f", @ParenthesisDepth = "0", @Parenthesized = "false"] | | | | +- ArgumentList[@Size = "0"] | | | +- ArgumentList[@Size = "1"] - | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = ".java", @Empty = "false", @Image = "".java"", @Length = "5", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = ".java", @Empty = "false", @Image = "\".java\"", @Length = "5", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | | +- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "false", @TypeInferred = "false", @Visibility = "local"] | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "FileFilter"] @@ -81,7 +81,7 @@ | | | | +- VariableAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "f", @Name = "f", @ParenthesisDepth = "0", @Parenthesized = "false"] | | | | +- ArgumentList[@Size = "0"] | | | +- ArgumentList[@Size = "1"] - | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = ".java", @Empty = "false", @Image = "".java"", @Length = "5", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = ".java", @Empty = "false", @Image = "\".java\"", @Length = "5", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | | +- ExpressionStatement[] | | | +- MethodCall[@CompileTimeConstant = "false", @Image = "forEach", @MethodName = "forEach", @ParenthesisDepth = "0", @Parenthesized = "false"] | | | +- MethodCall[@CompileTimeConstant = "false", @Image = "parallel", @MethodName = "parallel", @ParenthesisDepth = "0", @Parenthesized = "false"] @@ -148,7 +148,7 @@ | | | | +- VariableAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "f", @Name = "f", @ParenthesisDepth = "0", @Parenthesized = "false"] | | | | +- ArgumentList[@Size = "0"] | | | +- ArgumentList[@Size = "1"] - | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "q", @Empty = "false", @Image = ""q"", @Length = "1", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "q", @Empty = "false", @Image = "\"q\"", @Length = "1", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | | +- ExpressionStatement[] | | | +- MethodCall[@CompileTimeConstant = "false", @Image = "filterFiles", @MethodName = "filterFiles", @ParenthesisDepth = "0", @Parenthesized = "false"] | | | +- ArgumentList[@Size = "1"] @@ -184,7 +184,7 @@ | | | | +- VariableAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "f", @Name = "f", @ParenthesisDepth = "0", @Parenthesized = "false"] | | | | +- ArgumentList[@Size = "0"] | | | +- ArgumentList[@Size = "1"] - | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "q", @Empty = "false", @Image = ""q"", @Length = "1", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "q", @Empty = "false", @Image = "\"q\"", @Length = "1", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | | +- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "false", @TypeInferred = "false", @Visibility = "local"] | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"] @@ -198,7 +198,7 @@ | | | +- TypeExpression[@CompileTimeConstant = "false", @ParenthesisDepth = "0", @Parenthesized = "false"] | | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "System"] | | | +- ArgumentList[@Size = "1"] - | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "user.name", @Empty = "false", @Image = ""user.name"", @Length = "9", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "user.name", @Empty = "false", @Image = "\"user.name\"", @Length = "9", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | | +- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "false", @TypeInferred = "false", @Visibility = "local"] | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "Callable"] @@ -208,7 +208,7 @@ | | | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "c", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"] | | | +- LambdaExpression[@BlockBody = "false", @CompileTimeConstant = "false", @ExpressionBody = "true", @ParenthesisDepth = "0", @Parenthesized = "false"] | | | +- LambdaParameterList[@Size = "0"] - | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "done", @Empty = "false", @Image = ""done"", @Length = "4", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "done", @Empty = "false", @Image = "\"done\"", @Length = "4", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | | +- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "false", @TypeInferred = "false", @Visibility = "local"] | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "Runnable"] @@ -223,7 +223,7 @@ | | | | +- TypeExpression[@CompileTimeConstant = "false", @ParenthesisDepth = "0", @Parenthesized = "false"] | | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "System"] | | | +- ArgumentList[@Size = "1"] - | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "done", @Empty = "false", @Image = ""done"", @Length = "4", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "done", @Empty = "false", @Image = "\"done\"", @Length = "4", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | | +- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "false", @TypeInferred = "false", @Visibility = "local"] | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "Supplier"] @@ -242,7 +242,7 @@ | | | | +- TypeExpression[@CompileTimeConstant = "false", @ParenthesisDepth = "0", @Parenthesized = "false"] | | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "System"] | | | +- ArgumentList[@Size = "1"] - | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "hi", @Empty = "false", @Image = ""hi"", @Length = "2", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "hi", @Empty = "false", @Image = "\"hi\"", @Length = "2", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | | +- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "false", @TypeInferred = "false", @Visibility = "local"] | | | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | | | +- PrimitiveType[@Kind = "boolean"] @@ -282,7 +282,7 @@ | | | | +- TypeExpression[@CompileTimeConstant = "false", @ParenthesisDepth = "0", @Parenthesized = "false"] | | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "System"] | | | +- ArgumentList[@Size = "1"] - | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "hi", @Empty = "false", @Image = ""hi"", @Length = "2", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "hi", @Empty = "false", @Image = "\"hi\"", @Length = "2", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | | +- ExpressionStatement[] | | | +- MethodCall[@CompileTimeConstant = "false", @Image = "run", @MethodName = "run", @ParenthesisDepth = "0", @Parenthesized = "false"] | | | +- FieldAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "r1", @Name = "r1", @ParenthesisDepth = "0", @Parenthesized = "false"] @@ -513,7 +513,7 @@ | | | +- TypeExpression[@CompileTimeConstant = "false", @ParenthesisDepth = "0", @Parenthesized = "false"] | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "System"] | | +- ArgumentList[@Size = "1"] - | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "later", @Empty = "false", @Image = ""later"", @Length = "5", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "later", @Empty = "false", @Image = "\"later\"", @Length = "5", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | +- MethodDeclaration[@Abstract = "false", @Arity = "1", @EffectiveVisibility = "private", @Image = "doPrivileged", @Name = "doPrivileged", @Overridden = "false", @Varargs = "false", @Visibility = "private", @Void = "false"] | | +- ModifierList[@EffectiveModifiers = "{private}", @ExplicitModifiers = "{private}"] | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"] @@ -709,7 +709,7 @@ | | | +- TypeExpression[@CompileTimeConstant = "false", @ParenthesisDepth = "0", @Parenthesized = "false"] | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "System"] | | +- ArgumentList[@Size = "1"] - | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "run", @Empty = "false", @Image = ""run"", @Length = "3", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "run", @Empty = "false", @Image = "\"run\"", @Length = "3", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | +- MethodDeclaration[@Abstract = "false", @Arity = "0", @EffectiveVisibility = "public", @Image = "typeAnnotations", @Name = "typeAnnotations", @Overridden = "false", @Varargs = "false", @Visibility = "public", @Void = "true"] | | +- ModifierList[@EffectiveModifiers = "{public}", @ExplicitModifiers = "{public}"] | | +- VoidType[] @@ -1092,4 +1092,4 @@ | +- TypeExpression[@CompileTimeConstant = "false", @ParenthesisDepth = "0", @Parenthesized = "false"] | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "System"] +- ArgumentList[@Size = "1"] - +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "", @Empty = "true", @Image = """", @Length = "0", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "", @Empty = "true", @Image = "\"\"", @Length = "0", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/SwitchStatements.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/SwitchStatements.txt index bcba0a3909..1f72870a4c 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/SwitchStatements.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/SwitchStatements.txt @@ -33,7 +33,7 @@ | | | +- TypeExpression[@CompileTimeConstant = "false", @ParenthesisDepth = "0", @Parenthesized = "false"] | | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "System"] | | +- ArgumentList[@Size = "1"] - | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "1", @Empty = "false", @Image = ""1"", @Length = "1", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "1", @Empty = "false", @Image = "\"1\"", @Length = "1", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] | +- BreakStatement[@Label = null] +- SwitchFallthroughBranch[@Default = "true"] +- SwitchLabel[@Default = "true"] diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java15/TextBlocks.txt b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java15/TextBlocks.txt index 364cba52b2..63e3d9eac1 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java15/TextBlocks.txt +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/ast/jdkversiontests/java15/TextBlocks.txt @@ -23,18 +23,7 @@ | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"] | +- VariableDeclarator[@Initializer = "true", @Name = "html"] | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "html", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"] - | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = " -
-Hello, world
- - -", @Empty = "false", @Image = """" - - -Hello, world
- - - """", @Length = "66", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "true"] + | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "\n \nHello, world
\n \n\n", @Empty = "false", @Image = "\"\"\"\n \n \nHello, world
\n \n \n \"\"\"", @Length = "66", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "true"] +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = "false", @Image = "println", @MethodName = "println", @ParenthesisDepth = "0", @Parenthesized = "false"] | +- FieldAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "out", @Name = "out", @ParenthesisDepth = "0", @Parenthesized = "false"] @@ -47,14 +36,7 @@ | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"] | +- VariableDeclarator[@Initializer = "true", @Name = "query"] | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "query", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"] - | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "SELECT `EMP_ID`, `LAST_NAME` FROM `EMPLOYEE_TB` -WHERE `CITY` = 'INDIANAPOLIS' -ORDER BY `EMP_ID`, `LAST_NAME`; -", @Empty = "false", @Image = """" - SELECT `EMP_ID`, `LAST_NAME` FROM `EMPLOYEE_TB` - WHERE `CITY` = 'INDIANAPOLIS' - ORDER BY `EMP_ID`, `LAST_NAME`; - """", @Length = "110", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "true"] + | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "SELECT `EMP_ID`, `LAST_NAME` FROM `EMPLOYEE_TB`\nWHERE `CITY` = \'INDIANAPOLIS\'\nORDER BY `EMP_ID`, `LAST_NAME`;\n", @Empty = "false", @Image = "\"\"\"\n SELECT `EMP_ID`, `LAST_NAME` FROM `EMPLOYEE_TB`\n WHERE `CITY` = \'INDIANAPOLIS\'\n ORDER BY `EMP_ID`, `LAST_NAME`;\n \"\"\"", @Length = "110", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "true"] +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = "false", @Image = "println", @MethodName = "println", @ParenthesisDepth = "0", @Parenthesized = "false"] | +- FieldAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "out", @Name = "out", @ParenthesisDepth = "0", @Parenthesized = "false"] @@ -72,7 +54,7 @@ ORDER BY `EMP_ID`, `LAST_NAME`; | | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "ScriptEngineManager"] | | +- ArgumentList[@Size = "0"] | +- ArgumentList[@Size = "1"] - | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "js", @Empty = "false", @Image = ""js"", @Length = "2", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "js", @Empty = "false", @Image = "\"js\"", @Length = "2", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] +- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "false", @TypeInferred = "false", @Visibility = "local"] | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "Object"] @@ -81,35 +63,13 @@ ORDER BY `EMP_ID`, `LAST_NAME`; | +- MethodCall[@CompileTimeConstant = "false", @Image = "eval", @MethodName = "eval", @ParenthesisDepth = "0", @Parenthesized = "false"] | +- VariableAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "engine", @Name = "engine", @ParenthesisDepth = "0", @Parenthesized = "false"] | +- ArgumentList[@Size = "1"] - | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "function hello() { - print('"Hello, world"'); -} - -hello(); -", @Empty = "false", @Image = """" - function hello() { - print('"Hello, world"'); - } - - hello(); - """", @Length = "60", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "true"] + | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "function hello() {\n print(\'\"Hello, world\"\');\n}\n\nhello();\n", @Empty = "false", @Image = "\"\"\"\n function hello() {\n print(\'\"Hello, world\"\');\n }\n \n hello();\n \"\"\"", @Length = "60", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "true"] +- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "false", @TypeInferred = "false", @Visibility = "local"] | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"] | +- VariableDeclarator[@Initializer = "true", @Name = "htmlWithEscapes"] | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "htmlWithEscapes", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"] - | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = " - -Hello, world
- - -", @Empty = "false", @Image = """" - - -Hello, world
- - - """", @Length = "71", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "true"] + | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "\r\n \r\nHello, world
\r\n \r\n\r\n", @Empty = "false", @Image = "\"\"\"\n \\r\n \\r\nHello, world
\\r\n \\r\n \\r\n \"\"\"", @Length = "71", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "true"] +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = "false", @Image = "println", @MethodName = "println", @ParenthesisDepth = "0", @Parenthesized = "false"] | +- FieldAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "out", @Name = "out", @ParenthesisDepth = "0", @Parenthesized = "false"] @@ -122,91 +82,61 @@ hello(); | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"] | +- VariableDeclarator[@Initializer = "true", @Name = "season"] | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "season", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"] - | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "winter", @Empty = "false", @Image = """" - winter"""", @Length = "6", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "true"] + | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "winter", @Empty = "false", @Image = "\"\"\"\n winter\"\"\"", @Length = "6", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "true"] +- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "false", @TypeInferred = "false", @Visibility = "local"] | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"] | +- VariableDeclarator[@Initializer = "true", @Name = "period"] | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "period", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"] - | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "winter -", @Empty = "false", @Image = """" - winter - """", @Length = "7", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "true"] + | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "winter\n", @Empty = "false", @Image = "\"\"\"\n winter\n \"\"\"", @Length = "7", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "true"] +- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "false", @TypeInferred = "false", @Visibility = "local"] | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"] | +- VariableDeclarator[@Initializer = "true", @Name = "greeting"] | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "greeting", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"] - | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Hi, "Bob" -", @Empty = "false", @Image = """" - Hi, "Bob" - """", @Length = "10", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "true"] + | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Hi, \"Bob\"\n", @Empty = "false", @Image = "\"\"\"\n Hi, \"Bob\"\n \"\"\"", @Length = "10", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "true"] +- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "false", @TypeInferred = "false", @Visibility = "local"] | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"] | +- VariableDeclarator[@Initializer = "true", @Name = "salutation"] | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "salutation", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"] - | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Hi, - "Bob" -", @Empty = "false", @Image = """" - Hi, - "Bob" - """", @Length = "11", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "true"] + | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Hi,\n \"Bob\"\n", @Empty = "false", @Image = "\"\"\"\n Hi,\n \"Bob\"\n \"\"\"", @Length = "11", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "true"] +- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "false", @TypeInferred = "false", @Visibility = "local"] | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"] | +- VariableDeclarator[@Initializer = "true", @Name = "empty"] | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "empty", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"] - | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "", @Empty = "true", @Image = """" - """", @Length = "0", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "true"] + | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "", @Empty = "true", @Image = "\"\"\"\n \"\"\"", @Length = "0", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "true"] +- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "false", @TypeInferred = "false", @Visibility = "local"] | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"] | +- VariableDeclarator[@Initializer = "true", @Name = "quote"] | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "quote", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"] - | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "" -", @Empty = "false", @Image = """" - " - """", @Length = "2", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "true"] + | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "\"\n", @Empty = "false", @Image = "\"\"\"\n \"\n \"\"\"", @Length = "2", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "true"] +- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "false", @TypeInferred = "false", @Visibility = "local"] | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"] | +- VariableDeclarator[@Initializer = "true", @Name = "backslash"] | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "backslash", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"] - | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = " -", @Empty = "false", @Image = """" - \ - """", @Length = "2", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "true"] + | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "\\\n", @Empty = "false", @Image = "\"\"\"\n \\\\\n \"\"\"", @Length = "2", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "true"] +- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "false", @TypeInferred = "false", @Visibility = "local"] | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"] | +- VariableDeclarator[@Initializer = "true", @Name = "normalStringLiteral"] | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "normalStringLiteral", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"] - | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "test", @Empty = "false", @Image = ""test"", @Length = "4", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] + | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "test", @Empty = "false", @Image = "\"test\"", @Length = "4", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] +- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "false", @TypeInferred = "false", @Visibility = "local"] | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"] | +- VariableDeclarator[@Initializer = "true", @Name = "code"] | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "code", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"] - | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "String text = """ - A text block inside a text block -"""; -", @Empty = "false", @Image = """" - String text = """ - A text block inside a text block - """; - """", @Length = "60", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "true"] + | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "String text = \"\"\"\n A text block inside a text block\n\"\"\";\n", @Empty = "false", @Image = "\"\"\"\n String text = \\\"\"\"\n A text block inside a text block\n \\\"\"\";\n \"\"\"", @Length = "60", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "true"] +- LocalVariableDeclaration[@EffectiveVisibility = "local", @Final = "false", @TypeInferred = "false", @Visibility = "local"] | +- ModifierList[@EffectiveModifiers = "{}", @ExplicitModifiers = "{}"] | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"] | +- VariableDeclarator[@Initializer = "true", @Name = "text"] | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "text", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"] - | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", @Empty = "false", @Image = """" - Lorem ipsum dolor sit amet, consectetur adipiscing - elit, sed do eiusmod tempor incididunt ut labore - et dolore magna aliqua. - """", @Length = "123", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "true"] + | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", @Empty = "false", @Image = "\"\"\"\n Lorem ipsum dolor sit amet, consectetur adipiscing \\\n elit, sed do eiusmod tempor incididunt ut labore \\\n et dolore magna aliqua.\\\n \"\"\"", @Length = "123", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "true"] +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = "false", @Image = "println", @MethodName = "println", @ParenthesisDepth = "0", @Parenthesized = "false"] | +- FieldAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "out", @Name = "out", @ParenthesisDepth = "0", @Parenthesized = "false"] @@ -219,14 +149,7 @@ hello(); | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"] | +- VariableDeclarator[@Initializer = "true", @Name = "colors"] | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "colors", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"] - | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "red -green -blue -", @Empty = "false", @Image = """" - red s - greens - blue s - """", @Length = "21", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "true"] + | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "red \ngreen \nblue \n", @Empty = "false", @Image = "\"\"\"\n red \\s\n green\\s\n blue \\s\n \"\"\"", @Length = "21", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "true"] +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = "false", @Image = "println", @MethodName = "println", @ParenthesisDepth = "0", @Parenthesized = "false"] | +- FieldAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "out", @Name = "out", @ParenthesisDepth = "0", @Parenthesized = "false"] @@ -239,12 +162,7 @@ blue | +- ClassOrInterfaceType[@FullyQualified = "false", @SimpleName = "String"] | +- VariableDeclarator[@Initializer = "true", @Name = "emptyLine"] | +- VariableDeclaratorId[@ArrayType = "false", @EffectiveVisibility = "local", @EnumConstant = "false", @ExceptionBlockParameter = "false", @Field = "false", @Final = "false", @FormalParameter = "false", @LambdaParameter = "false", @LocalVariable = "true", @Name = "emptyLine", @PatternBinding = "false", @RecordComponent = "false", @ResourceDeclaration = "false", @TypeInferred = "false", @Visibility = "local"] - | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = " -test -", @Empty = "false", @Image = """" - -test -"""", @Length = "6", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "true"] + | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "\ntest\n", @Empty = "false", @Image = "\"\"\"\n\ntest\n\"\"\"", @Length = "6", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "true"] +- ExpressionStatement[] | +- MethodCall[@CompileTimeConstant = "false", @Image = "println", @MethodName = "println", @ParenthesisDepth = "0", @Parenthesized = "false"] | +- FieldAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "out", @Name = "out", @ParenthesisDepth = "0", @Parenthesized = "false"] @@ -254,19 +172,14 @@ test | +- MethodCall[@CompileTimeConstant = "false", @Image = "replaceAll", @MethodName = "replaceAll", @ParenthesisDepth = "0", @Parenthesized = "false"] | +- VariableAccess[@AccessType = "READ", @CompileTimeConstant = "false", @Image = "emptyLine", @Name = "emptyLine", @ParenthesisDepth = "0", @Parenthesized = "false"] | +- ArgumentList[@Size = "2"] - | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = " -", @Empty = "false", @Image = "" -"", @Length = "1", @ParenthesisDepth = "0", @Parenthesized = "false", @TextBlock = "false"] - | +- StringLiteral[@CompileTimeConstant = "true", @ConstValue = "