@@ -124,11 +124,11 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
124
124
atPrec(InfixPrec ) { argText(args.head) }
125
125
else
126
126
toTextTuple(args.init)
127
- (keywordStr (" implicit " ) provided isImplicit) ~ argStr ~ " => " ~ argText(args.last)
127
+ (keywordText (" implicit " ) provided isImplicit) ~ argStr ~ " => " ~ argText(args.last)
128
128
}
129
129
130
130
def toTextDependentFunction (appType : MethodType ): Text = {
131
- (" implicit " provided appType.isImplicitMethod) ~
131
+ (keywordText( " implicit " ) provided appType.isImplicitMethod) ~
132
132
" (" ~ paramsText(appType) ~ " ) => " ~ toText(appType.resultType)
133
133
}
134
134
@@ -185,7 +185,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
185
185
withoutPos(super .toText(tp))
186
186
case tp : SelectionProto =>
187
187
return " ?{ " ~ toText(tp.name) ~
188
- (" " provided ! tp.name.toSimpleName.last.isLetterOrDigit) ~
188
+ (Str ( " " ) provided ! tp.name.toSimpleName.last.isLetterOrDigit) ~
189
189
" : " ~ toText(tp.memberProto) ~ " }"
190
190
case tp : ViewProto =>
191
191
return toText(tp.argType) ~ " ?=>? " ~ toText(tp.resultType)
@@ -271,7 +271,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
271
271
if (homogenizedView && mods.flags.isTypeFlags) flagMask &~= Implicit // drop implicit from classes
272
272
val flags = mods.flags & flagMask
273
273
val flagsText = if (flags.isEmpty) " " else keywordStr((mods.flags & flagMask).toString)
274
- Text (mods.annotations.map(annotText), " " ) ~~ flagsText ~~ (kw provided ! suppressKw)
274
+ Text (mods.annotations.map(annotText), " " ) ~~ flagsText ~~ (Str (kw) provided ! suppressKw)
275
275
}
276
276
277
277
def varianceText (mods : untpd.Modifiers ) =
@@ -342,7 +342,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
342
342
343
343
val bodyText = " {" ~~ selfText ~~ toTextGlobal(primaryConstrs ::: body, " \n " ) ~ " }"
344
344
345
- prefix ~ (keywordStr (" extends" ) provided ! ofNew) ~~ parentsText ~~ bodyText
345
+ prefix ~ (keywordText (" extends" ) provided ! ofNew) ~~ parentsText ~~ bodyText
346
346
}
347
347
348
348
def toTextPackageId (pid : Tree ): Text =
@@ -411,7 +411,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
411
411
blockText(stats :+ expr)
412
412
case If (cond, thenp, elsep) =>
413
413
changePrec(GlobalPrec ) {
414
- keywordStr(" if " ) ~ toText(cond) ~ (keywordStr (" then" ) provided ! cond.isInstanceOf [Parens ]) ~~ toText(thenp) ~ optText(elsep)(keywordStr(" else " ) ~ _)
414
+ keywordStr(" if " ) ~ toText(cond) ~ (keywordText (" then" ) provided ! cond.isInstanceOf [Parens ]) ~~ toText(thenp) ~ optText(elsep)(keywordStr(" else " ) ~ _)
415
415
}
416
416
case Closure (env, ref, target) =>
417
417
" closure(" ~ (toTextGlobal(env, " , " ) ~ " | " provided env.nonEmpty) ~
0 commit comments