Skip to content

Commit cf8afc4

Browse files
committed
Rename method to align with change
1 parent 8bbdb0b commit cf8afc4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/src/scala/tasty/util/ShowSourceCode.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,13 +347,13 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
347347
printTree(rhs)
348348

349349
case Term.Block(stats0, expr) =>
350-
def isLoopEntryPoint(tree: Tree): Boolean = tree match {
350+
def shouldNotBePrinted(tree: Tree): Boolean = tree match {
351351
case Term.Apply(Term.Ident("while$" | "doWhile$"), _) => true
352352
case tree @ ValDef(_, _, _) => tree.flags.isObject
353353
case _ => false
354354
}
355355

356-
val stats = stats0.filterNot(isLoopEntryPoint)
356+
val stats = stats0.filterNot(shouldNotBePrinted)
357357

358358
expr match {
359359
case Term.Lambda(_, _) =>
@@ -367,7 +367,7 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
367367
case _ =>
368368
this += "{"
369369
val (stats1, expr1) =
370-
if (isLoopEntryPoint(expr)) (stats.init, stats.last)
370+
if (shouldNotBePrinted(expr)) (stats.init, stats.last)
371371
else (stats, expr)
372372
indented {
373373
printStats(stats1, expr1)

0 commit comments

Comments
 (0)