@@ -25,58 +25,58 @@ class ShowExtractors[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
25
25
26
26
def visitTree (x : Tree ): Buffer = x match {
27
27
case Term .Ident (name) =>
28
- this += " Ident(" += name += " )"
28
+ this += " Term. Ident(\" " += name += " \ " )"
29
29
case Term .Select (qualifier, name, signature) =>
30
- this += " Select(" += qualifier += " , " += name += " , " += signature += " )"
30
+ this += " Term. Select(" += qualifier += " , \" " += name += " \ " , " += signature += " )"
31
31
case Term .This (qual) =>
32
- this += " This(" += qual += " )"
32
+ this += " Term. This(" += qual += " )"
33
33
case Term .Super (qual, mix) =>
34
- this += " TypeApply(" += qual += " , " += mix += " )"
34
+ this += " Term. TypeApply(" += qual += " , " += mix += " )"
35
35
case Term .Apply (fun, args) =>
36
- this += " Apply(" += fun += " , " ++= args += " )"
36
+ this += " Term. Apply(" += fun += " , " ++= args += " )"
37
37
case Term .TypeApply (fun, args) =>
38
- this += " TypeApply(" += fun += " , " ++= args += " )"
38
+ this += " Term. TypeApply(" += fun += " , " ++= args += " )"
39
39
case Term .Literal (const) =>
40
- this += " Literal(" += const += " )"
40
+ this += " Term. Literal(" += const += " )"
41
41
case Term .New (tpt) =>
42
- this += " New(" += tpt += " )"
42
+ this += " Term. New(" += tpt += " )"
43
43
case Term .Typed (expr, tpt) =>
44
- this += " Typed(" += expr += " , " += tpt += " )"
44
+ this += " Term. Typed(" += expr += " , " += tpt += " )"
45
45
case Term .NamedArg (name, arg) =>
46
- this += " NamedArg(" += name += " , " += arg += " )"
46
+ this += " Term. NamedArg(\" " += name += " \ " , " += arg += " )"
47
47
case Term .Assign (lhs, rhs) =>
48
- this += " Assign(" += lhs += " , " += rhs += " )"
48
+ this += " Term. Assign(" += lhs += " , " += rhs += " )"
49
49
case Term .Block (stats, expr) =>
50
- this += " Block(" ++= stats += " , " += expr += " )"
50
+ this += " Term. Block(" ++= stats += " , " += expr += " )"
51
51
case Term .If (cond, thenp, elsep) =>
52
- this += " If(" += cond += " , " += thenp += " , " += elsep += " )"
52
+ this += " Term. If(" += cond += " , " += thenp += " , " += elsep += " )"
53
53
case Term .Lambda (meth, tpt) =>
54
- this += " Lambda(" += meth += " , " += tpt += " )"
54
+ this += " Term. Lambda(" += meth += " , " += tpt += " )"
55
55
case Term .Match (selector, cases) =>
56
- this += " Match(" += selector += " , " ++= cases += " )"
56
+ this += " Term. Match(" += selector += " , " ++= cases += " )"
57
57
case Term .Return (expr) =>
58
- this += " Return(" += expr += " )"
58
+ this += " Term. Return(" += expr += " )"
59
59
case Term .Try (block, handlers, finalizer) =>
60
- this += " Try(" += block += " , " ++= handlers += " , " += finalizer += " )"
60
+ this += " Term. Try(" += block += " , " ++= handlers += " , " += finalizer += " )"
61
61
case Term .Repeated (elems) =>
62
- this += " Repeated(" ++= elems += " )"
62
+ this += " Term. Repeated(" ++= elems += " )"
63
63
case Term .Inlined (call, bindings, expansion) =>
64
- this += " Inlined(" += call += " , " ++= bindings += " , " += expansion += " )"
64
+ this += " Term. Inlined(" += call += " , " ++= bindings += " , " += expansion += " )"
65
65
case ValDef (name, tpt, rhs) =>
66
- this += " ValDef(" += name += " , " += tpt += " , " += rhs += " )"
66
+ this += " ValDef(\" " += name += " \ " , " += tpt += " , " += rhs += " )"
67
67
case DefDef (name, typeParams, paramss, returnTpt, rhs) =>
68
- this += " DefDef(" += name += " , " ++= typeParams += " , " +++= paramss += " , " += returnTpt += " , " += rhs += " )"
68
+ this += " DefDef(\" " += name += " \ " , " ++= typeParams += " , " +++= paramss += " , " += returnTpt += " , " += rhs += " )"
69
69
case TypeDef (name, rhs) =>
70
- this += " TypeDef(" += name += " , " += rhs += " )"
70
+ this += " TypeDef(\" " += name += " \ " , " += rhs += " )"
71
71
case ClassDef (name, constr, parents, self, body) =>
72
- this += " ClassDef(" += name += " , " += constr += " , "
72
+ this += " ClassDef(\" " += name += " \ " , " += constr += " , "
73
73
visitList[Parent ](parents, {
74
74
case parent @ Term () => this += parent
75
75
case parent @ TypeTree () => this += parent
76
76
})
77
77
this += " , " += self += " , " ++= body += " )"
78
78
case PackageDef (name, members) =>
79
- this += " PackageDef(" += name += " , " ++= members += " )"
79
+ this += " PackageDef(\" " += name += " \ " , " ++= members += " )"
80
80
case Import (expr, selectors) =>
81
81
this += " Import(" += expr += " , " ++= selectors += " )"
82
82
case PackageClause (pid, stats) =>
@@ -85,25 +85,25 @@ class ShowExtractors[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
85
85
86
86
def visitTypeTree (x : TypeOrBoundsTree ): Buffer = x match {
87
87
case TypeTree .Synthetic () =>
88
- this += " Synthetic()"
88
+ this += " TypeTree. Synthetic()"
89
89
case TypeTree .TypeIdent (name) =>
90
- this += " TypeIdent(" += name += " )"
90
+ this += " TypeTree. TypeIdent(\" " += name += " \ " )"
91
91
case TypeTree .TypeSelect (qualifier, name) =>
92
- this += " TypeSelect(" += qualifier += " , " += name += " )"
92
+ this += " TypeTree. TypeSelect(" += qualifier += " , \" " += name += " \ " )"
93
93
case TypeTree .Singleton (ref) =>
94
- this += " Singleton(" += ref += " )"
94
+ this += " TypeTree. Singleton(" += ref += " )"
95
95
case TypeTree .And (left, right) =>
96
- this += " And(" += left += " , " += right += " )"
96
+ this += " TypeTree. And(" += left += " , " += right += " )"
97
97
case TypeTree .Or (left, right) =>
98
- this += " Or(" += left += " , " += right += " )"
98
+ this += " TypeTree. Or(" += left += " , " += right += " )"
99
99
case TypeTree .Refined (tpt, refinements) =>
100
- this += " Refined(" += tpt += " , " ++= refinements += " )"
100
+ this += " TypeTree. Refined(" += tpt += " , " ++= refinements += " )"
101
101
case TypeTree .Applied (tpt, args) =>
102
- this += " Applied(" += tpt += " , " ++= args += " )"
102
+ this += " TypeTree. Applied(" += tpt += " , " ++= args += " )"
103
103
case TypeTree .ByName (result) =>
104
- this += " ByName(" += result += " )"
104
+ this += " TypeTree. ByName(" += result += " )"
105
105
case TypeTree .Annotated (arg, annot) =>
106
- this += " Annotated(" += arg += " , " += annot += " )"
106
+ this += " TypeTree. Annotated(" += arg += " , " += annot += " )"
107
107
case TypeBoundsTree (lo, hi) =>
108
108
this += " TypeBoundsTree(" += lo += " , " += hi += " )"
109
109
}
@@ -115,90 +115,90 @@ class ShowExtractors[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
115
115
116
116
def visitPattern (x : Pattern ): Buffer = x match {
117
117
case Pattern .Value (v) =>
118
- this += " Value(" += v += " )"
118
+ this += " Pattern. Value(" += v += " )"
119
119
case Pattern .Bind (name, body) =>
120
- this += " Bind(" += name += " , " += body += " )"
120
+ this += " Pattern. Bind(\" " += name += " \ " , " += body += " )"
121
121
case Pattern .Unapply (fun, implicits, patterns) =>
122
- this += " Unapply(" += fun += " , " ++= implicits += " , " ++= patterns += " )"
122
+ this += " Pattern. Unapply(" += fun += " , " ++= implicits += " , " ++= patterns += " )"
123
123
case Pattern .Alternative (patterns) =>
124
- this += " Alternative(" ++= patterns += " )"
124
+ this += " Pattern. Alternative(" ++= patterns += " )"
125
125
case Pattern .TypeTest (tpt) =>
126
- this += " TypeTest(" += tpt += " )"
126
+ this += " Pattern. TypeTest(" += tpt += " )"
127
127
}
128
128
129
129
def visitConstant (x : Constant ): Buffer = x match {
130
- case Constant .Unit () => this += " Unit()"
131
- case Constant .Null () => this += " Null()"
132
- case Constant .Boolean (value) => this += " Boolean(" += value += " )"
133
- case Constant .Byte (value) => this += " Byte(" += value += " )"
134
- case Constant .Short (value) => this += " Short(" += value += " )"
135
- case Constant .Char (value) => this += " Char(" += value += " )"
136
- case Constant .Int (value) => this += " Int(" += value.toString += " )"
137
- case Constant .Long (value) => this += " Long(" += value += " )"
138
- case Constant .Float (value) => this += " Float(" += value += " )"
139
- case Constant .Double (value) => this += " Double(" += value += " )"
140
- case Constant .String (value) => this += " String(" += value += " )"
130
+ case Constant .Unit () => this += " Constant. Unit()"
131
+ case Constant .Null () => this += " Constant. Null()"
132
+ case Constant .Boolean (value) => this += " Constant. Boolean(" += value += " )"
133
+ case Constant .Byte (value) => this += " Constant. Byte(" += value += " )"
134
+ case Constant .Short (value) => this += " Constant. Short(" += value += " )"
135
+ case Constant .Char (value) => this += " Constant. Char(" += value += " )"
136
+ case Constant .Int (value) => this += " Constant. Int(" += value.toString += " )"
137
+ case Constant .Long (value) => this += " Constant. Long(" += value += " )"
138
+ case Constant .Float (value) => this += " Constant. Float(" += value += " )"
139
+ case Constant .Double (value) => this += " Constant. Double(" += value += " )"
140
+ case Constant .String (value) => this += " Constant. String(\" " += value += " \ " )"
141
141
}
142
142
143
143
def visitType (x : TypeOrBounds ): Buffer = x match {
144
144
case Type .ConstantType (value) =>
145
- this += " ConstantType(" += value += " )"
145
+ this += " Type. ConstantType(" += value += " )"
146
146
case Type .SymRef (sym, qual) =>
147
147
def visitName (sym : Definition ): Buffer = sym match {
148
- case ValDef (name, _, _) => this += name
149
- case DefDef (name, _, _, _, _) => this += name
150
- case TypeDef (name, _) => this += name
151
- case ClassDef (name, _, _, _, _) => this += name
152
- case PackageDef (name, _) => this += name
148
+ case ValDef (name, _, _) => this += " ValDef( \" " += name += " \" , _, _) "
149
+ case DefDef (name, _, _, _, _) => this += " DefDef( \" " += name += " \" , _, _, _, _) "
150
+ case TypeDef (name, _) => this += " TypeDef( \" " += name += " \" , _) "
151
+ case ClassDef (name, _, _, _, _) => this += " ClassDef( \" " += name += " \" , _, _, _, _) "
152
+ case PackageDef (name, _) => this += " PackageDef( \" " += name += " \" , _) "
153
153
case _ => this += " #"
154
154
}
155
- this += " SymRef("
155
+ this += " Type. SymRef("
156
156
visitName(sym)
157
157
this += " , " += qual += " )"
158
158
case Type .TermRef (name, qual) =>
159
- this += " TermRef(" += name += " , " += qual += " )"
159
+ this += " Type. TermRef(\" " += name += " \ " , " += qual += " )"
160
160
case Type .TypeRef (name, qual) =>
161
- this += " TypeRef(" += name += " , " += qual += " )"
161
+ this += " Type. TypeRef(\" " += name += " \ " , " += qual += " )"
162
162
case Type .Refinement (parent, name, info) =>
163
- this += " Refinement(" += parent += " , " += name += " , " += info += " )"
163
+ this += " Type. Refinement(" += parent += " , " += name += " , " += info += " )"
164
164
case Type .AppliedType (tycon, args) =>
165
- this += " AppliedType(" += tycon += " , " ++= args += " )"
165
+ this += " Type. AppliedType(" += tycon += " , " ++= args += " )"
166
166
case Type .AnnotatedType (underlying, annot) =>
167
- this += " AnnotatedType(" += underlying += " , " += annot += " )"
167
+ this += " Type. AnnotatedType(" += underlying += " , " += annot += " )"
168
168
case Type .AndType (left, right) =>
169
- this += " AndType(" += left += " , " += right += " )"
169
+ this += " Type. AndType(" += left += " , " += right += " )"
170
170
case Type .OrType (left, right) =>
171
- this += " OrType(" += left += " , " += right += " )"
171
+ this += " Type. OrType(" += left += " , " += right += " )"
172
172
case Type .ByNameType (underlying) =>
173
- this += " ByNameType(" += underlying += " )"
173
+ this += " Type. ByNameType(" += underlying += " )"
174
174
case Type .ParamRef (binder, idx) =>
175
- this += " ParamRef(" += binder+= " , " += idx += " )"
175
+ this += " Type. ParamRef(" += binder+= " , " += idx += " )"
176
176
case Type .ThisType (tp) =>
177
- this += " ThisType(" += tp += " )"
177
+ this += " Type. ThisType(" += tp += " )"
178
178
case Type .RecursiveThis (binder) =>
179
- this += " RecursiveThis(" += binder += " )"
179
+ this += " Type. RecursiveThis(" += binder += " )"
180
180
case Type .MethodType (argNames, argTypes, resType) =>
181
- this += " MethodType(" ++= argNames += " , " ++= argTypes += " , " += resType += " )"
181
+ this += " Type. MethodType(" ++= argNames += " , " ++= argTypes += " , " += resType += " )"
182
182
case Type .PolyType (argNames, argBounds, resType) =>
183
- this += " PolyType(" ++= argNames += " , " ++= argBounds += " , " += resType += " )"
183
+ this += " Type. PolyType(" ++= argNames += " , " ++= argBounds += " , " += resType += " )"
184
184
case Type .TypeLambda (argNames, argBounds, resType) =>
185
- this += " TypeLambda(" ++= argNames += " , " ++= argBounds += " , " += resType += " )"
185
+ this += " Type. TypeLambda(" ++= argNames += " , " ++= argBounds += " , " += resType += " )"
186
186
case TypeBounds (lo, hi) =>
187
187
this += " TypeBounds(" += lo += " , " += hi += " )"
188
188
case NoPrefix () =>
189
- this += " NoPrefix"
189
+ this += " NoPrefix() "
190
190
}
191
191
192
192
def visitModifier (x : Modifier ): Buffer = x match {
193
- case Modifier .Flags (flags) => this += " Flags(" += flags.toString += " )"
194
- case Modifier .QualifiedPrivate (tp) => this += " QualifiedPrivate(" += tp += " )"
195
- case Modifier .QualifiedProtected (tp) => this += " QualifiedProtected(" += tp += " )"
196
- case Modifier .Annotation (tree) => this += " Annotation(" += tree += " )"
193
+ case Modifier .Flags (flags) => this += " Modifier. Flags(" += flags.toString += " )"
194
+ case Modifier .QualifiedPrivate (tp) => this += " Modifier. QualifiedPrivate(" += tp += " )"
195
+ case Modifier .QualifiedProtected (tp) => this += " Modifier. QualifiedProtected(" += tp += " )"
196
+ case Modifier .Annotation (tree) => this += " Modifier. Annotation(" += tree += " )"
197
197
}
198
198
199
199
def visitId (x : Id ): Buffer = {
200
200
val Id (name) = x
201
- this += " Id(" += name += " )"
201
+ this += " Id(\" " += name += " \ " )"
202
202
}
203
203
204
204
def visitSignature (sig : Signature ): Buffer = {
0 commit comments