@@ -23,10 +23,18 @@ def.kt:
23
23
# 0| [CompilationUnit] def
24
24
# 0| 1: [Class] DefKt
25
25
# 46| 2: [Method] fn
26
+ #-----| 1: (Annotations)
27
+ # 45| 1: [Annotation] Annot0k
28
+ # 0| 1: [IntegerLiteral] 0
26
29
#-----| 2: (Generic Parameters)
27
30
# 46| 0: [TypeVariable] T
31
+ # 46| 3: [TypeAccess] Unit
28
32
#-----| 4: (Parameters)
29
33
# 46| 0: [Parameter] a
34
+ #-----| -1: (Annotations)
35
+ # 46| 1: [Annotation] Annot0k
36
+ # 0| 1: [IntegerLiteral] 0
37
+ # 46| 0: [TypeAccess] Annot0k
30
38
# 46| 5: [BlockStmt] { ... }
31
39
# 47| 0: [ExprStmt] <Expr>;
32
40
# 47| 0: [MethodAccess] println(...)
@@ -43,43 +51,102 @@ def.kt:
43
51
# 53| -1: [TypeAccess] int
44
52
# 57| 0: [IntegerLiteral] 5
45
53
# 57| 4: [Method] getP
54
+ #-----| 1: (Annotations)
55
+ # 54| 1: [Annotation] Annot0k
56
+ # 0| 1: [IntegerLiteral] 0
57
+ # 57| 3: [TypeAccess] int
46
58
# 57| 5: [BlockStmt] { ... }
47
59
# 57| 0: [ReturnStmt] return ...
48
- # 57| 0: [VarAccess] p
49
- # 57| 4: [Method] setP
60
+ # 57| 0: [VarAccess] DefKt.p
61
+ # 57| -1: [TypeAccess] DefKt
62
+ # 57| 5: [Method] setP
63
+ #-----| 1: (Annotations)
64
+ # 55| 1: [Annotation] Annot0k
65
+ # 0| 1: [IntegerLiteral] 0
66
+ # 57| 3: [TypeAccess] Unit
50
67
#-----| 4: (Parameters)
51
68
# 57| 0: [Parameter] <set-?>
69
+ # 57| 0: [TypeAccess] int
52
70
# 57| 5: [BlockStmt] { ... }
53
71
# 57| 0: [ExprStmt] <Expr>;
54
72
# 57| 0: [AssignExpr] ...=...
55
- # 57| 0: [VarAccess] p
73
+ # 57| 0: [VarAccess] DefKt.p
74
+ # 57| -1: [TypeAccess] DefKt
56
75
# 57| 1: [VarAccess] <set-?>
57
76
# 59| 6: [ExtensionMethod] myExtension
77
+ # 59| 3: [TypeAccess] Unit
58
78
#-----| 4: (Parameters)
59
79
# 59| 0: [Parameter] <this>
80
+ #-----| -1: (Annotations)
81
+ # 59| 1: [Annotation] Annot0k
82
+ # 0| 1: [IntegerLiteral] 0
83
+ # 59| 0: [TypeAccess] String
60
84
# 59| 5: [BlockStmt] { ... }
61
85
# 5| 2: [Interface] Annot0k
62
86
#-----| -3: (Annotations)
63
- # 5| 5: [Annotation] Target
87
+ # 0| 1: [Annotation] Retention
88
+ # 0| 1: [VarAccess] RetentionPolicy.RUNTIME
89
+ # 0| -1: [TypeAccess] RetentionPolicy
90
+ # 0| 2: [Annotation] Target
91
+ # 0| 1: [ArrayInit] {...}
92
+ # 0| 1: [VarAccess] ElementType.TYPE
93
+ # 0| -1: [TypeAccess] ElementType
94
+ # 0| 1: [VarAccess] ElementType.FIELD
95
+ # 0| -1: [TypeAccess] ElementType
96
+ # 0| 1: [VarAccess] ElementType.METHOD
97
+ # 0| -1: [TypeAccess] ElementType
98
+ # 0| 1: [VarAccess] ElementType.PARAMETER
99
+ # 0| -1: [TypeAccess] ElementType
100
+ # 0| 1: [VarAccess] ElementType.CONSTRUCTOR
101
+ # 0| -1: [TypeAccess] ElementType
102
+ # 0| 1: [VarAccess] ElementType.LOCAL_VARIABLE
103
+ # 0| -1: [TypeAccess] ElementType
104
+ # 0| 1: [VarAccess] ElementType.ANNOTATION_TYPE
105
+ # 0| -1: [TypeAccess] ElementType
106
+ # 0| 1: [VarAccess] ElementType.TYPE_PARAMETER
107
+ # 0| -1: [TypeAccess] ElementType
108
+ # 0| 1: [VarAccess] ElementType.TYPE_USE
109
+ # 0| -1: [TypeAccess] ElementType
110
+ # 5| 3: [Annotation] Target
64
111
# 0| 1: [ArrayInit] {...}
65
- # 0| 1: [VarAccess] CLASS
66
- # 0| 1: [VarAccess] ANNOTATION_CLASS
67
- # 0| 1: [VarAccess] TYPE_PARAMETER
68
- # 0| 1: [VarAccess] PROPERTY
69
- # 0| 1: [VarAccess] FIELD
70
- # 0| 1: [VarAccess] LOCAL_VARIABLE
71
- # 0| 1: [VarAccess] VALUE_PARAMETER
72
- # 0| 1: [VarAccess] CONSTRUCTOR
73
- # 0| 1: [VarAccess] FUNCTION
74
- # 0| 1: [VarAccess] PROPERTY_GETTER
75
- # 0| 1: [VarAccess] PROPERTY_SETTER
76
- # 0| 1: [VarAccess] TYPE
77
- # 0| 1: [VarAccess] FILE
78
- # 0| 1: [VarAccess] TYPEALIAS
112
+ # 0| 1: [VarAccess] AnnotationTarget.CLASS
113
+ # 0| -1: [TypeAccess] AnnotationTarget
114
+ # 0| 1: [VarAccess] AnnotationTarget.ANNOTATION_CLASS
115
+ # 0| -1: [TypeAccess] AnnotationTarget
116
+ # 0| 1: [VarAccess] AnnotationTarget.TYPE_PARAMETER
117
+ # 0| -1: [TypeAccess] AnnotationTarget
118
+ # 0| 1: [VarAccess] AnnotationTarget.PROPERTY
119
+ # 0| -1: [TypeAccess] AnnotationTarget
120
+ # 0| 1: [VarAccess] AnnotationTarget.FIELD
121
+ # 0| -1: [TypeAccess] AnnotationTarget
122
+ # 0| 1: [VarAccess] AnnotationTarget.LOCAL_VARIABLE
123
+ # 0| -1: [TypeAccess] AnnotationTarget
124
+ # 0| 1: [VarAccess] AnnotationTarget.VALUE_PARAMETER
125
+ # 0| -1: [TypeAccess] AnnotationTarget
126
+ # 0| 1: [VarAccess] AnnotationTarget.CONSTRUCTOR
127
+ # 0| -1: [TypeAccess] AnnotationTarget
128
+ # 0| 1: [VarAccess] AnnotationTarget.FUNCTION
129
+ # 0| -1: [TypeAccess] AnnotationTarget
130
+ # 0| 1: [VarAccess] AnnotationTarget.PROPERTY_GETTER
131
+ # 0| -1: [TypeAccess] AnnotationTarget
132
+ # 0| 1: [VarAccess] AnnotationTarget.PROPERTY_SETTER
133
+ # 0| -1: [TypeAccess] AnnotationTarget
134
+ # 0| 1: [VarAccess] AnnotationTarget.TYPE
135
+ # 0| -1: [TypeAccess] AnnotationTarget
136
+ # 0| 1: [VarAccess] AnnotationTarget.FILE
137
+ # 0| -1: [TypeAccess] AnnotationTarget
138
+ # 0| 1: [VarAccess] AnnotationTarget.TYPEALIAS
139
+ # 0| -1: [TypeAccess] AnnotationTarget
79
140
# 21| 1: [Method] a
141
+ #-----| 1: (Annotations)
142
+ # 21| 1: [Annotation] JvmName
143
+ # 0| 1: [StringLiteral] "a"
80
144
# 23| 3: [Interface] Annot1k
81
145
#-----| -3: (Annotations)
82
- # 23| 4: [Annotation] Annot0k
146
+ # 0| 1: [Annotation] Retention
147
+ # 0| 1: [VarAccess] RetentionPolicy.RUNTIME
148
+ # 0| -1: [TypeAccess] RetentionPolicy
149
+ # 23| 2: [Annotation] Annot0k
83
150
# 0| 1: [IntegerLiteral] 0
84
151
# 25| 1: [Method] a
85
152
# 26| 2: [Method] b
@@ -93,33 +160,57 @@ def.kt:
93
160
# 33| 0: [SuperConstructorInvocationStmt] super(...)
94
161
# 33| 1: [BlockStmt] { ... }
95
162
# 34| 5: [Class] Y
96
- # 0| 2: [Method] values
97
163
# 0| 2: [Method] valueOf
164
+ # 0| 3: [TypeAccess] Y
98
165
#-----| 4: (Parameters)
99
166
# 0| 0: [Parameter] value
167
+ # 0| 0: [TypeAccess] String
168
+ # 0| 3: [Method] values
169
+ # 0| 3: [TypeAccess] Y[]
170
+ # 0| 0: [TypeAccess] Y
100
171
# 34| 4: [Constructor] Y
101
172
# 34| 5: [BlockStmt] { ... }
102
173
# 34| 0: [ExprStmt] <Expr>;
103
174
# 34| 0: [ClassInstanceExpr] new Enum(...)
104
- # 34| -3: [TypeAccess] Unit
175
+ # 34| -3: [TypeAccess] Enum<Y>
105
176
# 34| 0: [TypeAccess] Y
177
+ # 34| 0: [NullLiteral] null
178
+ # 34| 1: [IntegerLiteral] 0
106
179
# 34| 1: [BlockStmt] { ... }
180
+ # 35| 5: [FieldDeclaration] Y A;
181
+ # 35| -1: [TypeAccess] Y
182
+ # 35| 0: [ClassInstanceExpr] new Y(...)
183
+ # 35| -3: [TypeAccess] Y
184
+ # 35| 6: [FieldDeclaration] Y B;
185
+ # 35| -1: [TypeAccess] Y
186
+ # 35| 0: [ClassInstanceExpr] new Y(...)
187
+ # 35| -3: [TypeAccess] Y
188
+ # 35| 7: [FieldDeclaration] Y C;
189
+ # 35| -1: [TypeAccess] Y
190
+ # 35| 0: [ClassInstanceExpr] new Y(...)
191
+ # 35| -3: [TypeAccess] Y
107
192
# 38| 6: [Class] Z
108
193
#-----| -3: (Annotations)
109
194
# 38| 1: [Annotation] Annot0k
110
195
# 0| 1: [IntegerLiteral] 1
111
196
# 39| 2: [Annotation] Annot1k
112
197
# 0| 1: [IntegerLiteral] 2
113
- # 0| 1: [StringLiteral] ab
198
+ # 0| 1: [StringLiteral] "ab"
114
199
# 0| 1: [TypeLiteral] X.class
115
200
# 0| 0: [TypeAccess] X
116
- # 0| 1: [VarAccess] B
201
+ # 0| 1: [VarAccess] Y.B
202
+ # 0| -1: [TypeAccess] Y
117
203
# 0| 1: [ArrayInit] {...}
118
- # 0| 1: [VarAccess] C
119
- # 0| 1: [VarAccess] A
204
+ # 0| 1: [VarAccess] Y.C
205
+ # 0| -1: [TypeAccess] Y
206
+ # 0| 1: [VarAccess] Y.A
207
+ # 0| -1: [TypeAccess] Y
120
208
# 0| 1: [Annotation] Annot0k
121
209
# 0| 1: [IntegerLiteral] 1
122
210
# 42| 1: [Constructor] Z
211
+ #-----| 1: (Annotations)
212
+ # 41| 1: [Annotation] Annot0k
213
+ # 0| 1: [IntegerLiteral] 0
123
214
# 41| 5: [BlockStmt] { ... }
124
215
# 42| 0: [SuperConstructorInvocationStmt] super(...)
125
216
# 42| 1: [BlockStmt] { ... }
0 commit comments