@@ -28,9 +28,9 @@ class TastyPrinter[T <: Tasty with Singleton](val tasty: T) {
28
28
29
29
def visitTree (x : Tree ): Buffer = x match {
30
30
case Term .Ident (name) =>
31
- this += " Ident(" += name += " )"
31
+ this += " Ident(\" " += name += " \ " )"
32
32
case Term .Select (qualifier, name, signature) =>
33
- this += " Select(" += qualifier += " , " += name += " , " += signature += " )"
33
+ this += " Select(" += qualifier += " , \" " += name += " \ " , " += signature += " )"
34
34
case Term .This (qual) =>
35
35
this += " This(" += qual += " )"
36
36
case Term .Super (qual, mix) =>
@@ -46,7 +46,7 @@ class TastyPrinter[T <: Tasty with Singleton](val tasty: T) {
46
46
case Term .Typed (expr, tpt) =>
47
47
this += " Typed(" += expr += " , " += tpt += " )"
48
48
case Term .NamedArg (name, arg) =>
49
- this += " NamedArg(" += name += " , " += arg += " )"
49
+ this += " NamedArg(\" " += name += " \ " , " += arg += " )"
50
50
case Term .Assign (lhs, rhs) =>
51
51
this += " Assign(" += lhs += " , " += rhs += " )"
52
52
case Term .Block (stats, expr) =>
@@ -66,20 +66,20 @@ class TastyPrinter[T <: Tasty with Singleton](val tasty: T) {
66
66
case Term .Inlined (call, bindings, expansion) =>
67
67
this += " Inlined(" += call += " , " ++= bindings += " , " += expansion += " )"
68
68
case ValDef (name, tpt, rhs) =>
69
- this += " ValDef(" += name += " , " += tpt += " , " += rhs += " )"
69
+ this += " ValDef(\" " += name += " \ " , " += tpt += " , " += rhs += " )"
70
70
case DefDef (name, typeParams, paramss, returnTpt, rhs) =>
71
- this += " DefDef(" += name += " , " ++= typeParams += " , " +++= paramss += " , " += returnTpt += " , " += rhs += " )"
71
+ this += " DefDef(\" " += name += " \ " , " ++= typeParams += " , " +++= paramss += " , " += returnTpt += " , " += rhs += " )"
72
72
case TypeDef (name, rhs) =>
73
- this += " TypeDef(" += name += " , " += rhs += " )"
73
+ this += " TypeDef(\" " += name += " \ " , " += rhs += " )"
74
74
case ClassDef (name, constr, parents, self, body) =>
75
- this += " ClassDef(" += name += " , " += constr += " , "
75
+ this += " ClassDef(\" " += name += " \ " , " += constr += " , "
76
76
visitList[Parent ](parents, {
77
77
case parent @ Term () => this += parent
78
78
case parent @ TypeTree () => this += parent
79
79
})
80
80
this += " , " += self += " , " ++= body += " )"
81
81
case PackageDef (name, members) =>
82
- this += " PackageDef(" += name += " , " ++= members += " )"
82
+ this += " PackageDef(\" " += name += " \ " , " ++= members += " )"
83
83
case Import (expr, selectors) =>
84
84
this += " Import(" += expr += " , " ++= selectors += " )"
85
85
case PackageClause (pid, stats) =>
@@ -90,9 +90,9 @@ class TastyPrinter[T <: Tasty with Singleton](val tasty: T) {
90
90
case TypeTree .Synthetic () =>
91
91
this += " Synthetic()"
92
92
case TypeTree .TypeIdent (name) =>
93
- this += " TypeIdent(" += name += " )"
93
+ this += " TypeIdent(\" " += name += " \ " )"
94
94
case TypeTree .TypeSelect (qualifier, name) =>
95
- this += " TypeSelect(" += qualifier += " , " += name += " )"
95
+ this += " TypeSelect(" += qualifier += " , \" " += name += " \ " )"
96
96
case TypeTree .Singleton (ref) =>
97
97
this += " Singleton(" += ref += " )"
98
98
case TypeTree .And (left, right) =>
@@ -120,7 +120,7 @@ class TastyPrinter[T <: Tasty with Singleton](val tasty: T) {
120
120
case Pattern .Value (v) =>
121
121
this += " Value(" += v += " )"
122
122
case Pattern .Bind (name, body) =>
123
- this += " Bind(" += name += " , " += body += " )"
123
+ this += " Bind(\" " += name += " \ " , " += body += " )"
124
124
case Pattern .Unapply (fun, implicits, patterns) =>
125
125
this += " Unapply(" += fun += " , " ++= implicits += " , " ++= patterns += " )"
126
126
case Pattern .Alternative (patterns) =>
@@ -140,28 +140,28 @@ class TastyPrinter[T <: Tasty with Singleton](val tasty: T) {
140
140
case Constant .Long (value) => this += " Long(" += value += " )"
141
141
case Constant .Float (value) => this += " Float(" += value += " )"
142
142
case Constant .Double (value) => this += " Double(" += value += " )"
143
- case Constant .String (value) => this += " String(" += value += " )"
143
+ case Constant .String (value) => this += " String(\" " += value += " \ " )"
144
144
}
145
145
146
146
def visitType (x : TypeOrBounds ): Buffer = x match {
147
147
case Type .ConstantType (value) =>
148
148
this += " ConstantType(" += value += " )"
149
149
case Type .SymRef (sym, qual) =>
150
150
def visitName (sym : Definition ): Buffer = sym match {
151
- case ValDef (name, _, _) => this += " ValDef(" += name += " , _, _)"
152
- case DefDef (name, _, _, _, _) => this += " DefDef(" += name += " , _, _, _, _)"
153
- case TypeDef (name, _) => this += " TypeDef(" += name += " , _)"
154
- case ClassDef (name, _, _, _, _) => this += " ClassDef(" += name += " , _, _, _, _)"
155
- case PackageDef (name, _) => this += " PackageDef(" += name += " , _)"
151
+ case ValDef (name, _, _) => this += " ValDef(\" " += name += " \ " , _, _)"
152
+ case DefDef (name, _, _, _, _) => this += " DefDef(\" " += name += " \ " , _, _, _, _)"
153
+ case TypeDef (name, _) => this += " TypeDef(\" " += name += " \ " , _)"
154
+ case ClassDef (name, _, _, _, _) => this += " ClassDef(\" " += name += " \ " , _, _, _, _)"
155
+ case PackageDef (name, _) => this += " PackageDef(\" " += name += " \ " , _)"
156
156
case _ => this += " #"
157
157
}
158
158
this += " SymRef("
159
159
visitName(sym)
160
160
this += " , " += qual += " )"
161
161
case Type .TermRef (name, qual) =>
162
- this += " TermRef(" += name += " , " += qual += " )"
162
+ this += " TermRef(\" " += name += " \ " , " += qual += " )"
163
163
case Type .TypeRef (name, qual) =>
164
- this += " TypeRef(" += name += " , " += qual += " )"
164
+ this += " TypeRef(\" " += name += " \ " , " += qual += " )"
165
165
case Type .Refinement (parent, name, info) =>
166
166
this += " Refinement(" += parent += " , " += name += " , " += info += " )"
167
167
case Type .AppliedType (tycon, args) =>
@@ -201,7 +201,7 @@ class TastyPrinter[T <: Tasty with Singleton](val tasty: T) {
201
201
202
202
def visitId (x : Id ): Buffer = {
203
203
val Id (name) = x
204
- this += " Id(" += name += " )"
204
+ this += " Id(\" " += name += " \ " )"
205
205
}
206
206
207
207
def visitSignature (sig : Signature ): Buffer = {
0 commit comments