Skip to content

Commit

Permalink
fix: loop-syntax should allow for "loop\n{..."
Browse files Browse the repository at this point in the history
  • Loading branch information
phorward committed Dec 29, 2024
1 parent d049cce commit 7cd11ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/compiler/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5242,6 +5242,10 @@ impl Parser {
"emit" => "identifier",
"value" => "_"
])),
(value!([
"emit" => "identifier",
"value" => "___"
])),
(value!([
"emit" => "value_instance",
"children" =>
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/tokay.tok
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ Atomic : @{
Keyword<'for'> _ Expect<Lvalue> _ Keyword<Expect<'in'>> _ Expect<Expression> \
___ Expect<Statement> ast("op_for")
Keyword<'loop'> _ Expression ___ Block ast("op_loop")
Keyword<'loop'> _ Expect<Block> ast("op_loop")
Keyword<'loop'> _ ___ Expect<Block> ast("op_loop")
Load
}

Expand Down

0 comments on commit 7cd11ae

Please sign in to comment.