File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
library/src/scala/tasty/util Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -347,13 +347,13 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
347
347
printTree(rhs)
348
348
349
349
case Term .Block (stats0, expr) =>
350
- def isLoopEntryPoint (tree : Tree ): Boolean = tree match {
350
+ def shouldNotBePrinted (tree : Tree ): Boolean = tree match {
351
351
case Term .Apply (Term .Ident (" while$" | " doWhile$" ), _) => true
352
352
case tree @ ValDef (_, _, _) => tree.flags.isObject
353
353
case _ => false
354
354
}
355
355
356
- val stats = stats0.filterNot(isLoopEntryPoint )
356
+ val stats = stats0.filterNot(shouldNotBePrinted )
357
357
358
358
expr match {
359
359
case Term .Lambda (_, _) =>
@@ -367,7 +367,7 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
367
367
case _ =>
368
368
this += " {"
369
369
val (stats1, expr1) =
370
- if (isLoopEntryPoint (expr)) (stats.init, stats.last)
370
+ if (shouldNotBePrinted (expr)) (stats.init, stats.last)
371
371
else (stats, expr)
372
372
indented {
373
373
printStats(stats1, expr1)
You can’t perform that action at this time.
0 commit comments