Skip to content

Commit 9bd9db6

Browse files
committed
Name the flag for statSepOrEnd
1 parent f29eea7 commit 9bd9db6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler/src/dotty/tools/dotc/parsing/Parsers.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3877,7 +3877,7 @@ object Parsers {
38773877
stats +++= defOrDcl(in.offset, defAnnotsMods(modifierTokens))
38783878
else
38793879
empty = true
3880-
statSepOrEnd(stats, empty, "toplevel definition")
3880+
statSepOrEnd(stats, noPrevStat = empty, "toplevel definition")
38813881
do ()
38823882
stats.toList
38833883
}
@@ -3927,7 +3927,7 @@ object Parsers {
39273927
stats += expr1()
39283928
else
39293929
empty = true
3930-
statSepOrEnd(stats, empty)
3930+
statSepOrEnd(stats, noPrevStat = empty)
39313931
do ()
39323932
(self, if stats.isEmpty then List(EmptyTree) else stats.toList)
39333933
}
@@ -3966,7 +3966,7 @@ object Parsers {
39663966
stats ++= checkLegal(defOrDcl(in.offset, Modifiers()))
39673967
var what = "declaration"
39683968
if inFunReturnType then what += " (possible cause: missing `=` in front of current method body)"
3969-
statSepOrEnd(stats, !dclFound, what)
3969+
statSepOrEnd(stats, noPrevStat = !dclFound, what)
39703970
do ()
39713971
stats.toList
39723972
}
@@ -4005,7 +4005,7 @@ object Parsers {
40054005
stats +++= localDef(in.offset)
40064006
else
40074007
empty = true
4008-
statSepOrEnd(stats, empty, altEnd = CASE)
4008+
statSepOrEnd(stats, noPrevStat = empty, altEnd = CASE)
40094009
do ()
40104010
stats.toList
40114011
}

0 commit comments

Comments
 (0)