@@ -72,8 +72,9 @@ object Parsers {
72
72
if source.isSelfContained then new ScriptParser (source)
73
73
else new Parser (source)
74
74
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 (_)
77
78
78
79
abstract class ParserCommon (val source : SourceFile )(using Context ) {
79
80
@@ -167,7 +168,7 @@ object Parsers {
167
168
class Parser (source : SourceFile )(using Context ) extends ParserCommon (source) {
168
169
169
170
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
171
172
172
173
/** This is the general parse entry point.
173
174
* Overridden by ScriptParser
@@ -2553,7 +2554,7 @@ object Parsers {
2553
2554
if (in.token == INDENT )
2554
2555
inBracesOrIndented(enumerators())
2555
2556
else {
2556
- val ts = inSepRegion(InCond )(enumerators())
2557
+ val ts = inSepRegion(InFor )(enumerators())
2557
2558
if (rewriteToOldSyntax(Span (start)) && ts.nonEmpty)
2558
2559
if (ts.head.sourcePos.startLine != ts.last.sourcePos.startLine) {
2559
2560
patch(source, Span (forEnd), " {" )
0 commit comments