for loops
This commit is contained in:
parent
9b4db724f1
commit
16cac369ee
1 changed files with 3 additions and 0 deletions
|
|
@ -77,6 +77,9 @@ stmt:
|
|||
| KW_IF expr COLON NEWLINE INDENT stmt_list DEDENT KW_ELSE COLON NEWLINE INDENT stmt_list DEDENT{
|
||||
$$ = std::make_unique<If>(std::move($2), std::move($6), std::move($12));
|
||||
}
|
||||
| KW_FOR IDENTIFIER KW_IN expr COLON NEWLINE INDENT stmt_list DEDENT {
|
||||
$$ = std::make_unique<For> ($2, std::move($4), std::move($8));
|
||||
}
|
||||
;
|
||||
|
||||
expr:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue