Java: Improve PrintAst tests and rename things

Add tests for `EnhcancedForStmt`s and `InstanceOfExpr`s.
Rename LocalVarDeclParent to SingleLocalVarDeclParent
This commit is contained in:
Joe
2020-09-25 11:19:13 +01:00
parent 9c8a468237
commit 5256c0ba39
5 changed files with 74 additions and 22 deletions

View File

@@ -21,7 +21,7 @@ MultiCatch.java:
# 14| 0: [ClassInstanceExpr] new SQLException(...)
# 14| -3: [TypeAccess] SQLException
# 15| 0: [CatchClause] stmt
#-----| 0: (Local Variable Declaration)
#-----| 0: (Single Local Variable Declaration)
# 15| 0: [UnionTypeAccess] ...|...
# 15| 0: [TypeAccess] IOException
# 15| 1: [TypeAccess] SQLException
@@ -56,7 +56,7 @@ MultiCatch.java:
# 30| 0: [ClassInstanceExpr] new Exception(...)
# 30| -3: [TypeAccess] Exception
# 31| 0: [CatchClause] stmt
#-----| 0: (Local Variable Declaration)
#-----| 0: (Single Local Variable Declaration)
# 31| 0: [UnionTypeAccess] ...|...
# 31| 0: [TypeAccess] IOException
# 31| 1: [TypeAccess] SQLException
@@ -71,7 +71,7 @@ MultiCatch.java:
# 39| 0: [ClassInstanceExpr] new IOException(...)
# 39| -3: [TypeAccess] IOException
# 40| 0: [CatchClause] stmt
#-----| 0: (Local Variable Declaration)
#-----| 0: (Single Local Variable Declaration)
# 40| 0: [TypeAccess] Exception
# 40| 1: [LocalVariableDeclExpr] e
# 41| 1: [BlockStmt] stmt