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 @@ -327,13 +327,13 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
327
327
printTree(rhs)
328
328
329
329
case Term .Block (stats0, expr) =>
330
- def isLoopEntryPoint (tree : Tree ): Boolean = tree match {
330
+ def shouldNotBePrinted (tree : Tree ): Boolean = tree match {
331
331
case Term .Apply (Term .Ident (" while$" | " doWhile$" ), _) => true
332
332
case tree @ ValDef (_, _, _) => tree.flags.isObject
333
333
case _ => false
334
334
}
335
335
336
- val stats = stats0.filterNot(isLoopEntryPoint )
336
+ val stats = stats0.filterNot(shouldNotBePrinted )
337
337
338
338
expr match {
339
339
case Term .Lambda (_, _) =>
@@ -347,7 +347,7 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
347
347
case _ =>
348
348
this += " {"
349
349
val (stats1, expr1) =
350
- if (isLoopEntryPoint (expr)) (stats.init, stats.last)
350
+ if (shouldNotBePrinted (expr)) (stats.init, stats.last)
351
351
else (stats, expr)
352
352
indented {
353
353
printStats(stats1, expr1)
You can’t perform that action at this time.
0 commit comments