Files
codeql/java/ql/test-kotlin2/library-tests/stmts/PrintAst.expected

199 lines
8.8 KiB
Plaintext

stmts.kt:
# 0| [CompilationUnit] stmts
# 0| 1: [Class] StmtsKt
# 2| 1: [Method] topLevelMethod
# 2| 3: [TypeAccess] int
#-----| 4: (Parameters)
# 2| 0: [Parameter] x
# 2| 0: [TypeAccess] int
# 2| 1: [Parameter] y
# 2| 0: [TypeAccess] int
# 2| 5: [BlockStmt] { ... }
# 3| 0: [ExprStmt] <Expr>;
# 3| 0: [WhenExpr] when ...
# 3| 0: [WhenBranch] ... -> ...
# 3| 0: [GTExpr] ... > ...
# 3| 0: [VarAccess] x
# 3| 1: [VarAccess] y
# 3| 1: [BlockStmt] { ... }
# 4| 1: [WhenBranch] ... -> ...
# 4| 0: [LTExpr] ... < ...
# 4| 0: [VarAccess] x
# 4| 1: [VarAccess] y
# 4| 1: [BlockStmt] { ... }
# 5| 2: [WhenBranch] ... -> ...
# 5| 0: [BooleanLiteral] true
# 5| 1: [BlockStmt] { ... }
# 7| 1: [WhileStmt] while (...)
# 7| 0: [GTExpr] ... > ...
# 7| 0: [VarAccess] x
# 7| 1: [VarAccess] y
# 8| 1: [ReturnStmt] return ...
# 8| 0: [VarAccess] x
# 9| 2: [WhileStmt] while (...)
# 9| 0: [LTExpr] ... < ...
# 9| 0: [VarAccess] x
# 9| 1: [VarAccess] y
# 9| 1: [BlockStmt] { ... }
# 10| 0: [ReturnStmt] return ...
# 10| 0: [VarAccess] y
# 12| 3: [BlockStmt] { ... }
# 12| 0: [DoStmt] do ... while (...)
# 14| 0: [LTExpr] ... < ...
# 14| 0: [VarAccess] x
# 14| 1: [VarAccess] y
# 12| 1: [BlockStmt] { ... }
# 13| 0: [ReturnStmt] return ...
# 13| 0: [VarAccess] y
# 15| 4: [LocalVariableDeclStmt] var ...;
# 15| 1: [LocalVariableDeclExpr] z
# 15| 0: [IntegerLiteral] 3
# 17| 5: [LocalVariableDeclStmt] var ...;
# 17| 1: [LocalVariableDeclExpr] q2
# 17| 0: [WhenExpr] when ...
# 17| 0: [WhenBranch] ... -> ...
# 17| 0: [BooleanLiteral] true
# 17| 1: [BlockStmt] { ... }
# 17| 0: [ExprStmt] <Expr>;
# 17| 0: [AssignExpr] ...=...
# 17| 0: [VarAccess] z
# 17| 1: [IntegerLiteral] 4
# 17| 1: [WhenBranch] ... -> ...
# 17| 0: [BooleanLiteral] true
# 17| 1: [BlockStmt] { ... }
# 17| 0: [ExprStmt] <Expr>;
# 17| 0: [AssignExpr] ...=...
# 17| 0: [VarAccess] z
# 17| 1: [IntegerLiteral] 5
# 18| 6: [LocalVariableDeclStmt] var ...;
# 18| 1: [LocalVariableDeclExpr] q3
# 18| 0: [WhenExpr] when ...
# 18| 0: [WhenBranch] ... -> ...
# 18| 0: [BooleanLiteral] true
# 18| 1: [ExprStmt] <Expr>;
# 18| 0: [AssignExpr] ...=...
# 18| 0: [VarAccess] z
# 18| 1: [IntegerLiteral] 4
# 18| 1: [WhenBranch] ... -> ...
# 18| 0: [BooleanLiteral] true
# 18| 1: [ExprStmt] <Expr>;
# 18| 0: [AssignExpr] ...=...
# 18| 0: [VarAccess] z
# 18| 1: [IntegerLiteral] 5
# 19| 7: [ReturnStmt] return ...
# 19| 0: [AddExpr] ... + ...
# 19| 0: [VarAccess] x
# 19| 1: [VarAccess] y
# 22| 2: [Method] loops
# 22| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 22| 0: [Parameter] x
# 22| 0: [TypeAccess] int
# 22| 1: [Parameter] y
# 22| 0: [TypeAccess] int
# 22| 5: [BlockStmt] { ... }
# 23| 0: [LabeledStmt] <Label>: ...
# 23| 0: [WhileStmt] while (...)
# 23| 0: [LTExpr] ... < ...
# 23| 0: [VarAccess] x
# 23| 1: [IntegerLiteral] 100
# 23| 1: [BlockStmt] { ... }
# 24| 0: [BlockStmt] { ... }
# 24| 0: [DoStmt] do ... while (...)
# 26| 0: [GTExpr] ... > ...
# 26| 0: [VarAccess] y
# 26| 1: [IntegerLiteral] 100
# 24| 1: [BlockStmt] { ... }
# 25| 0: [ExprStmt] <Expr>;
# 25| 0: [WhenExpr] when ...
# 25| 0: [WhenBranch] ... -> ...
# 25| 0: [GTExpr] ... > ...
# 25| 0: [VarAccess] x
# 25| 1: [VarAccess] y
# 25| 1: [BreakStmt] break
# 28| 1: [WhileStmt] while (...)
# 28| 0: [GTExpr] ... > ...
# 28| 0: [VarAccess] x
# 28| 1: [VarAccess] y
# 29| 1: [ContinueStmt] continue
# 31| 2: [EnhancedForStmt] for (... : ...)
#-----| 0: (Single Local Variable Declaration)
# 31| 1: [LocalVariableDeclExpr] i
# 31| 1: [MethodCall] rangeTo(...)
# 31| -1: [VarAccess] x
# 31| 0: [VarAccess] y
# 31| 2: [BlockStmt] { ... }
# 32| 0: [ExprStmt] <Expr>;
# 32| 0: [WhenExpr] when ...
# 32| 0: [WhenBranch] ... -> ...
# 32| 0: [GTExpr] ... > ...
# 32| 0: [VarAccess] x
# 32| 1: [VarAccess] y
# 32| 1: [BreakStmt] break
# 35| 3: [LabeledStmt] <Label>: ...
# 35| 0: [EnhancedForStmt] for (... : ...)
#-----| 0: (Single Local Variable Declaration)
# 35| 1: [LocalVariableDeclExpr] i
# 35| 1: [MethodCall] rangeTo(...)
# 35| -1: [VarAccess] x
# 35| 0: [VarAccess] y
# 35| 2: [BlockStmt] { ... }
# 36| 0: [BlockStmt] { ... }
# 36| 0: [DoStmt] do ... while (...)
# 38| 0: [GTExpr] ... > ...
# 38| 0: [VarAccess] y
# 38| 1: [IntegerLiteral] 100
# 36| 1: [BlockStmt] { ... }
# 37| 0: [ExprStmt] <Expr>;
# 37| 0: [WhenExpr] when ...
# 37| 0: [WhenBranch] ... -> ...
# 37| 0: [GTExpr] ... > ...
# 37| 0: [VarAccess] x
# 37| 1: [VarAccess] y
# 37| 1: [BreakStmt] break
# 41| 4: [EnhancedForStmt] for (... : ...)
#-----| 0: (Single Local Variable Declaration)
# 41| 1: [LocalVariableDeclExpr] <destruct>
# 41| 1: [MethodCall] withIndex(...)
# 41| -2: [TypeAccess] Integer
# 41| -1: [TypeAccess] CollectionsKt
# 41| 0: [MethodCall] rangeTo(...)
# 41| -1: [VarAccess] x
# 41| 0: [VarAccess] y
# 41| 2: [BlockStmt] { ... }
# 41| 0: [LocalVariableDeclStmt] var ...;
# 41| 1: [LocalVariableDeclExpr] v
# 41| 0: [MethodCall] component1(...)
# 41| -1: [VarAccess] <destruct>
# 41| 1: [LocalVariableDeclStmt] var ...;
# 41| 1: [LocalVariableDeclExpr] i
# 41| 0: [MethodCall] component2(...)
# 41| -1: [VarAccess] <destruct>
# 41| 2: [BlockStmt] { ... }
# 42| 0: [ExprStmt] <Expr>;
# 42| 0: [WhenExpr] when ...
# 42| 0: [WhenBranch] ... -> ...
# 42| 0: [GTExpr] ... > ...
# 42| 0: [VarAccess] x
# 42| 1: [VarAccess] y
# 42| 1: [BreakStmt] break
# 46| 3: [Method] exceptions
# 46| 3: [TypeAccess] int
# 46| 5: [BlockStmt] { ... }
# 47| 0: [TryStmt] try ...
# 53| -2: [BlockStmt] { ... }
# 54| 0: [ReturnStmt] return ...
# 54| 0: [IntegerLiteral] 2
# 47| -1: [BlockStmt] { ... }
# 48| 0: [ThrowStmt] throw ...
# 48| 0: [ClassInstanceExpr] new Exception(...)
# 48| -3: [TypeAccess] Exception
# 48| 0: [StringLiteral] "Foo"
# 50| 0: [CatchClause] catch (...)
#-----| 0: (Single Local Variable Declaration)
# 50| 0: [TypeAccess] Exception
# 50| 1: [LocalVariableDeclExpr] e
# 50| 1: [BlockStmt] { ... }
# 51| 0: [ReturnStmt] return ...
# 51| 0: [IntegerLiteral] 1