@@ -72,8 +72,9 @@ object Parsers {
7272 if source.isSelfContained then new ScriptParser (source)
7373 else new Parser (source)
7474
75- private val InCase : Region => Region = Scanners .InCase .apply
76- private val InCond : Region => Region = Scanners .InBraces .apply
75+ private val InCase : Region => Region = Scanners .InCase (_)
76+ private val InCond : Region => Region = Scanners .InParens (LPAREN , _)
77+ private val InFor : Region => Region = Scanners .InBraces (_)
7778
7879 abstract class ParserCommon (val source : SourceFile )(using Context ) {
7980
@@ -167,7 +168,7 @@ object Parsers {
167168 class Parser (source : SourceFile )(using Context ) extends ParserCommon (source) {
168169
169170 val in : Scanner = new Scanner (source)
170- // in.debugTokenStream = true // uncomment to see the token stream of the standard scanner, but not syntax highlighting
171+ // in.debugTokenStream = true // uncomment to see the token stream of the standard scanner, but not syntax highlighting
171172
172173 /** This is the general parse entry point.
173174 * Overridden by ScriptParser
@@ -2553,7 +2554,7 @@ object Parsers {
25532554 if (in.token == INDENT )
25542555 inBracesOrIndented(enumerators())
25552556 else {
2556- val ts = inSepRegion(InCond )(enumerators())
2557+ val ts = inSepRegion(InFor )(enumerators())
25572558 if (rewriteToOldSyntax(Span (start)) && ts.nonEmpty)
25582559 if (ts.head.sourcePos.startLine != ts.last.sourcePos.startLine) {
25592560 patch(source, Span (forEnd), " {" )
0 commit comments