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