feat(furc/parser): add return statement
This commit is contained in:
@@ -53,6 +53,7 @@ public:
|
||||
|
||||
Compound,
|
||||
If,
|
||||
Return,
|
||||
};
|
||||
public:
|
||||
category_e category() const override { return ast_node_cat::Statement; }
|
||||
@@ -76,6 +77,12 @@ struct if_stmt_node final : public stmt_node {
|
||||
stmt_node* elseBranch = nullptr;
|
||||
};
|
||||
|
||||
struct return_stmt_node final : public stmt_node {
|
||||
stmt_type_e stmt_type() const override { return Return; }
|
||||
|
||||
expr_node* value = nullptr;
|
||||
};
|
||||
|
||||
class decl_node : public stmt_node {
|
||||
public:
|
||||
enum decl_type_e {
|
||||
|
||||
Reference in New Issue
Block a user