Skip to content

Commit 7cd11ae

Browse files
committed
fix: loop-syntax should allow for "loop\n{..."
1 parent d049cce commit 7cd11ae

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/compiler/parser.rs

+4
Original file line numberDiff line numberDiff line change
@@ -5242,6 +5242,10 @@ impl Parser {
52425242
"emit" => "identifier",
52435243
"value" => "_"
52445244
])),
5245+
(value!([
5246+
"emit" => "identifier",
5247+
"value" => "___"
5248+
])),
52455249
(value!([
52465250
"emit" => "value_instance",
52475251
"children" =>

src/compiler/tokay.tok

+1-1
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ Atomic : @{
287287
Keyword<'for'> _ Expect<Lvalue> _ Keyword<Expect<'in'>> _ Expect<Expression> \
288288
___ Expect<Statement> ast("op_for")
289289
Keyword<'loop'> _ Expression ___ Block ast("op_loop")
290-
Keyword<'loop'> _ Expect<Block> ast("op_loop")
290+
Keyword<'loop'> _ ___ Expect<Block> ast("op_loop")
291291
Load
292292
}
293293

0 commit comments

Comments
 (0)