summaryrefslogtreecommitdiff
path: root/ast/ast.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'ast/ast.hpp')
-rw-r--r--ast/ast.hpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/ast/ast.hpp b/ast/ast.hpp
index 2c8b06c0..f05747ac 100644
--- a/ast/ast.hpp
+++ b/ast/ast.hpp
@@ -72,9 +72,15 @@ public:
struct TagLetBinding {};
ExprNode(TagLetBinding, Pattern pat, ExprNode value);
+ struct TagReturn {};
+ ExprNode(TagReturn, ExprNode val);
+
struct TagAssign {};
ExprNode(TagAssign, ExprNode slot, ExprNode value) {}
+ struct TagCast {};
+ ExprNode(TagCast, ExprNode value, TypeRef dst_type);
+
struct TagInteger {};
ExprNode(TagInteger, uint64_t value, enum eCoreType datatype);
@@ -84,11 +90,34 @@ public:
struct TagCallPath {};
ExprNode(TagCallPath, Path path, ::std::vector<ExprNode> args);
+ struct TagCallObject {};
+ ExprNode(TagCallObject, ExprNode val, ::std::vector<ExprNode> args);
+
struct TagMatch {};
ExprNode(TagMatch, ExprNode val, ::std::vector< ::std::pair<Pattern,ExprNode> > arms);
+ struct TagIf {};
+ ExprNode(TagIf, ExprNode cond, ExprNode true_code, ExprNode false_code);
+
struct TagNamedValue {};
ExprNode(TagNamedValue, Path path);
+
+ struct TagField {};
+ ExprNode(TagField, ::std::string name);
+
+ enum BinOpType {
+ BINOP_CMPEQU,
+ BINOP_CMPNEQU,
+
+ BINOP_BITAND,
+ BINOP_BITOR,
+ BINOP_BITXOR,
+
+ BINOP_SHL,
+ BINOP_SHR,
+ };
+ struct TagBinOp {};
+ ExprNode(TagBinOp, BinOpType type, ExprNode left, ExprNode right);
};
class Expr