feat(furc/parser): add pre- and post- conditions

This commit is contained in:
2026-08-09 17:17:47 +02:00
parent 7ebc27cab9
commit 47e8b1bf51
5 changed files with 38 additions and 6 deletions
+10 -4
View File
@@ -116,10 +116,16 @@ struct var_decl_node final : public decl_node {
struct func_decl_node final : public decl_node {
decl_type_e decl_type() const override { return Function; }
std::string name;
ast_type type;
std::vector<var_decl_node> params;
std::optional<comp_stmt_node> body;
struct def_s {
comp_stmt_node body;
std::vector<expr_node*> preConds;
std::vector<expr_node*> postConds;
};
std::string name;
ast_type type;
std::vector<var_decl_node> params;
std::optional<def_s> def;
};
class expr_node : public stmt_node {