Improved for loop

This commit is contained in:
2026-05-07 23:43:22 +02:00
parent c7ada72029
commit 8b409f4ccf
4 changed files with 18 additions and 7 deletions
+2 -1
View File
@@ -365,7 +365,8 @@ impl From<pest::iterators::Pair<'_, Rule>> for Statement {
},
Rule::for_stmt => Statement::For {
pattern: Identifier::from(inner.next().unwrap()),
mutable: listen_rule(&mut inner, Rule::mutable),
pattern: Pattern::from(inner.next().unwrap()),
iterator: inner.next().unwrap().into(),
body: Box::new(Statement::from(inner.next().unwrap())),
},