feat(furc/parser): add while statement

This commit is contained in:
2026-08-08 00:07:38 +02:00
parent 1db13b4e10
commit 7ebc27cab9
3 changed files with 26 additions and 1 deletions
+8
View File
@@ -53,6 +53,7 @@ public:
Compound,
If,
While,
Return,
};
public:
@@ -77,6 +78,13 @@ struct if_stmt_node final : public stmt_node {
stmt_node* elseBranch = nullptr;
};
struct while_stmt_node final : public stmt_node {
stmt_type_e stmt_type() const override { return While; }
expr_node* cond = nullptr;
stmt_node* body = nullptr;
};
struct return_stmt_node final : public stmt_node {
stmt_type_e stmt_type() const override { return Return; }