feat(furc/parser): add if expression

This commit is contained in:
2026-08-09 17:26:21 +02:00
parent 47e8b1bf51
commit 2126b03069
3 changed files with 21 additions and 3 deletions
+9
View File
@@ -137,6 +137,7 @@ public:
Group,
BinaryOp,
UnaryOp,
If,
};
public:
category_e category() const override { return ast_node_cat::Expression; }
@@ -214,6 +215,14 @@ struct unary_op_expr_node final : public expr_node {
unary_op_type type = Positive;
};
struct if_expr_node final : public expr_node {
expr_type_e expr_type() const override { return If; }
expr_node* cond = nullptr;
expr_node* thenExpr = nullptr;
expr_node* elseExpr = nullptr;
};
class lit_node : public expr_node {
public:
enum lit_type_e {