Skip to content

Commit 04d4d87

Browse files
committed
variable rename
1 parent f414dc8 commit 04d4d87

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

scaladoc/src/dotty/tools/scaladoc/snippets/WrappedSnippet.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ object WrappedSnippet:
3333
ps.startHide()
3434
ps.println(s"package ${packageName.getOrElse("snippets")}")
3535
imports.foreach(i => ps.println(s"import $i"))
36-
val classInfoSize = if classInfos.isEmpty then 1 else classInfos.length + (if usingQuotes then 1 else 0)
36+
val nestLevels = if classInfos.isEmpty then 1 else classInfos.length + (if usingQuotes then 1 else 0)
3737
if classInfos.isEmpty then
3838
ps.println("object Snippet {")
3939
else
@@ -46,16 +46,16 @@ object WrappedSnippet:
4646
if usingQuotes then
4747
ps.printlnWithIndent(classInfos.length * indent, "def f(using Quotes) = {")
4848
ps.endHide()
49-
str.split('\n').foreach(ps.printlnWithIndent(classInfoSize * indent, _))
49+
str.split('\n').foreach(ps.printlnWithIndent(nestLevels * indent, _))
5050
ps.startHide()
51-
(0 to classInfoSize -1).reverse.foreach( i => ps.printlnWithIndent(i * indent, "}"))
51+
(0 to nestLevels -1).reverse.foreach( i => ps.printlnWithIndent(i * indent, "}"))
5252
ps.endHide()
5353
WrappedSnippet(
5454
baos.toString,
5555
outerLineOffset,
5656
outerColumnOffset,
57-
classInfoSize + classInfos.flatMap(_.names).size + packageName.size + 2 /*Hide tokens*/,
58-
classInfoSize * indent
57+
nestLevels + classInfos.flatMap(_.names).size + packageName.size + 2 /*Hide tokens*/,
58+
nestLevels * indent
5959
)
6060

6161
extension (ps: PrintStream)

0 commit comments

Comments
 (0)