@@ -27,43 +27,43 @@ class TastyPrinter[T <: Tasty with Singleton](val tasty: T) {
27
27
def result (): String = sb.result()
28
28
29
29
def visitTree (x : Tree ): Buffer = x match {
30
- case Ident (name) =>
30
+ case Term . Ident (name) =>
31
31
this += " Ident(" += name += " )"
32
- case Select (qualifier, name, signature) =>
32
+ case Term . Select (qualifier, name, signature) =>
33
33
this += " Select(" += qualifier += " , " += name += " , " += signature += " )"
34
- case This (qual) =>
34
+ case Term . This (qual) =>
35
35
this += " This(" += qual += " )"
36
- case Super (qual, mix) =>
36
+ case Term . Super (qual, mix) =>
37
37
this += " TypeApply(" += qual += " , " += mix += " )"
38
- case Apply (fun, args) =>
38
+ case Term . Apply (fun, args) =>
39
39
this += " Apply(" += fun += " , " ++= args += " )"
40
- case TypeApply (fun, args) =>
40
+ case Term . TypeApply (fun, args) =>
41
41
this += " TypeApply(" += fun += " , " ++= args += " )"
42
- case Literal (const) =>
42
+ case Term . Literal (const) =>
43
43
this += " Literal(" += const += " )"
44
- case New (tpt) =>
44
+ case Term . New (tpt) =>
45
45
this += " New(" += tpt += " )"
46
- case Typed (expr, tpt) =>
46
+ case Term . Typed (expr, tpt) =>
47
47
this += " Typed(" += expr += " , " += tpt += " )"
48
- case NamedArg (name, arg) =>
48
+ case Term . NamedArg (name, arg) =>
49
49
this += " NamedArg(" += name += " , " += arg += " )"
50
- case Assign (lhs, rhs) =>
50
+ case Term . Assign (lhs, rhs) =>
51
51
this += " Assign(" += lhs += " , " += rhs += " )"
52
- case Block (stats, expr) =>
52
+ case Term . Block (stats, expr) =>
53
53
this += " Block(" ++= stats += " , " += expr += " )"
54
- case If (cond, thenp, elsep) =>
54
+ case Term . If (cond, thenp, elsep) =>
55
55
this += " If(" += cond += " , " += thenp += " , " += elsep += " )"
56
- case Lambda (meth, tpt) =>
56
+ case Term . Lambda (meth, tpt) =>
57
57
this += " Lambda(" += meth += " , " += tpt += " )"
58
- case Match (selector, cases) =>
58
+ case Term . Match (selector, cases) =>
59
59
this += " Match(" += selector += " , " ++= cases += " )"
60
- case Return (expr) =>
60
+ case Term . Return (expr) =>
61
61
this += " Return(" += expr += " )"
62
- case Try (block, handlers, finalizer) =>
62
+ case Term . Try (block, handlers, finalizer) =>
63
63
this += " Try(" += block += " , " ++= handlers += " , " += finalizer += " )"
64
- case Repeated (elems) =>
64
+ case Term . Repeated (elems) =>
65
65
this += " Repeated(" ++= elems += " )"
66
- case Inlined (call, bindings, expansion) =>
66
+ case Term . Inlined (call, bindings, expansion) =>
67
67
this += " Inlined(" += call += " , " ++= bindings += " , " += expansion += " )"
68
68
case ValDef (name, tpt, rhs) =>
69
69
this += " ValDef(" += name += " , " += tpt += " , " += rhs += " )"
@@ -87,25 +87,25 @@ class TastyPrinter[T <: Tasty with Singleton](val tasty: T) {
87
87
}
88
88
89
89
def visitTypeTree (x : TypeOrBoundsTree ): Buffer = x match {
90
- case Synthetic () =>
90
+ case TypeTree . Synthetic () =>
91
91
this += " Synthetic()"
92
- case TypeIdent (name) =>
92
+ case TypeTree . TypeIdent (name) =>
93
93
this += " TypeIdent(" += name += " )"
94
- case TypeSelect (qualifier, name) =>
94
+ case TypeTree . TypeSelect (qualifier, name) =>
95
95
this += " TypeSelect(" += qualifier += " , " += name += " )"
96
- case Singleton (ref) =>
96
+ case TypeTree . Singleton (ref) =>
97
97
this += " Singleton(" += ref += " )"
98
- case And (left, right) =>
98
+ case TypeTree . And (left, right) =>
99
99
this += " And(" += left += " , " += right += " )"
100
- case Or (left, right) =>
100
+ case TypeTree . Or (left, right) =>
101
101
this += " Or(" += left += " , " += right += " )"
102
- case Refined (tpt, refinements) =>
102
+ case TypeTree . Refined (tpt, refinements) =>
103
103
this += " Refined(" += tpt += " , " ++= refinements += " )"
104
- case Applied (tpt, args) =>
104
+ case TypeTree . Applied (tpt, args) =>
105
105
this += " Applied(" += tpt += " , " ++= args += " )"
106
- case ByName (result) =>
106
+ case TypeTree . ByName (result) =>
107
107
this += " ByName(" += result += " )"
108
- case Annotated (arg, annot) =>
108
+ case TypeTree . Annotated (arg, annot) =>
109
109
this += " Annotated(" += arg += " , " += annot += " )"
110
110
case TypeBoundsTree (lo, hi) =>
111
111
this += " TypeBoundsTree(" += lo += " , " += hi += " )"
@@ -117,15 +117,15 @@ class TastyPrinter[T <: Tasty with Singleton](val tasty: T) {
117
117
}
118
118
119
119
def visitPattern (x : Pattern ): Buffer = x match {
120
- case Value (v) =>
120
+ case Pattern . Value (v) =>
121
121
this += " Value(" += v += " )"
122
- case Bind (name, body) =>
122
+ case Pattern . Bind (name, body) =>
123
123
this += " Bind(" += name += " , " += body += " )"
124
- case Unapply (fun, implicits, patterns) =>
124
+ case Pattern . Unapply (fun, implicits, patterns) =>
125
125
this += " Unapply(" += fun += " , " ++= implicits += " , " ++= patterns += " )"
126
- case Alternative (patterns) =>
126
+ case Pattern . Alternative (patterns) =>
127
127
this += " Alternative(" ++= patterns += " )"
128
- case TypeTest (tpt) =>
128
+ case Pattern . TypeTest (tpt) =>
129
129
this += " TypeTest(" += tpt += " )"
130
130
}
131
131
@@ -144,9 +144,9 @@ class TastyPrinter[T <: Tasty with Singleton](val tasty: T) {
144
144
}
145
145
146
146
def visitType (x : TypeOrBounds ): Buffer = x match {
147
- case ConstantType (value) =>
147
+ case Type . ConstantType (value) =>
148
148
this += " ConstantType(" += value += " )"
149
- case SymRef (sym, qual) =>
149
+ case Type . SymRef (sym, qual) =>
150
150
def visitName (sym : Definition ): Buffer = sym match {
151
151
case ValDef (name, _, _) => this += name
152
152
case DefDef (name, _, _, _, _) => this += name
@@ -158,33 +158,33 @@ class TastyPrinter[T <: Tasty with Singleton](val tasty: T) {
158
158
this += " SymRef("
159
159
visitName(sym)
160
160
this += " , " += qual += " )"
161
- case TermRef (name, qual) =>
161
+ case Type . TermRef (name, qual) =>
162
162
this += " TermRef(" += name += " , " += qual += " )"
163
- case TypeRef (name, qual) =>
163
+ case Type . TypeRef (name, qual) =>
164
164
this += " TypeRef(" += name += " , " += qual += " )"
165
- case Refinement (parent, name, info) =>
165
+ case Type . Refinement (parent, name, info) =>
166
166
this += " Refinement(" += parent += " , " += name += " , " += info += " )"
167
- case AppliedType (tycon, args) =>
167
+ case Type . AppliedType (tycon, args) =>
168
168
this += " AppliedType(" += tycon += " , " ++= args += " )"
169
- case AnnotatedType (underlying, annot) =>
169
+ case Type . AnnotatedType (underlying, annot) =>
170
170
this += " AnnotatedType(" += underlying += " , " += annot += " )"
171
- case AndType (left, right) =>
171
+ case Type . AndType (left, right) =>
172
172
this += " AndType(" += left += " , " += right += " )"
173
- case OrType (left, right) =>
173
+ case Type . OrType (left, right) =>
174
174
this += " OrType(" += left += " , " += right += " )"
175
- case ByNameType (underlying) =>
175
+ case Type . ByNameType (underlying) =>
176
176
this += " ByNameType(" += underlying += " )"
177
- case ParamRef (binder, idx) =>
177
+ case Type . ParamRef (binder, idx) =>
178
178
this += " ParamRef(" += binder+= " , " += idx += " )"
179
- case ThisType (tp) =>
179
+ case Type . ThisType (tp) =>
180
180
this += " ThisType(" += tp += " )"
181
- case RecursiveThis (binder) =>
181
+ case Type . RecursiveThis (binder) =>
182
182
this += " RecursiveThis(" += binder += " )"
183
- case MethodType (argNames, argTypes, resType) =>
183
+ case Type . MethodType (argNames, argTypes, resType) =>
184
184
this += " MethodType(" ++= argNames += " , " ++= argTypes += " , " += resType += " )"
185
- case PolyType (argNames, argBounds, resType) =>
185
+ case Type . PolyType (argNames, argBounds, resType) =>
186
186
this += " PolyType(" ++= argNames += " , " ++= argBounds += " , " += resType += " )"
187
- case TypeLambda (argNames, argBounds, resType) =>
187
+ case Type . TypeLambda (argNames, argBounds, resType) =>
188
188
this += " TypeLambda(" ++= argNames += " , " ++= argBounds += " , " += resType += " )"
189
189
case TypeBounds (lo, hi) =>
190
190
this += " TypeBounds(" += lo += " , " += hi += " )"
@@ -193,10 +193,10 @@ class TastyPrinter[T <: Tasty with Singleton](val tasty: T) {
193
193
}
194
194
195
195
def visitModifier (x : Modifier ): Buffer = x match {
196
- case Flags (flags) => this += " Flags(" += flags.toString += " )"
197
- case QualifiedPrivate (tp) => this += " QualifiedPrivate(" += tp += " )"
198
- case QualifiedProtected (tp) => this += " QualifiedProtected(" += tp += " )"
199
- case Annotation (tree) => this += " Annotation(" += tree += " )"
196
+ case Modifier . Flags (flags) => this += " Flags(" += flags.toString += " )"
197
+ case Modifier . QualifiedPrivate (tp) => this += " QualifiedPrivate(" += tp += " )"
198
+ case Modifier . QualifiedProtected (tp) => this += " QualifiedProtected(" += tp += " )"
199
+ case Modifier . Annotation (tree) => this += " Annotation(" += tree += " )"
200
200
}
201
201
202
202
def visitId (x : Id ): Buffer = {
0 commit comments