diff options
author | John Hodge <tpg@mutabah.net> | 2015-03-12 12:40:36 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2015-03-12 12:40:36 +0800 |
commit | 06e7e28cd4de3871f55255150b66821b12365881 (patch) | |
tree | 97d1e22f999ee53845455932a411cc25ca2d9de2 /src/ast/expr.hpp | |
parent | e71fccd80610bc05b0a90338b2b3beb9a0b94c22 (diff) | |
download | mrust-06e7e28cd4de3871f55255150b66821b12365881.tar.gz |
Float parsing, module-level macro expansion
Diffstat (limited to 'src/ast/expr.hpp')
-rw-r--r-- | src/ast/expr.hpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ast/expr.hpp b/src/ast/expr.hpp index e01606d7..ca655fe0 100644 --- a/src/ast/expr.hpp +++ b/src/ast/expr.hpp @@ -110,11 +110,17 @@ struct ExprNode_LetBinding: struct ExprNode_Assign: public ExprNode { + enum Operation { + NONE, + ADD, + SUB, + } m_op; unique_ptr<ExprNode> m_slot; unique_ptr<ExprNode> m_value; - ExprNode_Assign() {} - ExprNode_Assign(unique_ptr<ExprNode>&& slot, unique_ptr<ExprNode>&& value): + ExprNode_Assign(): m_op(NONE) {} + ExprNode_Assign(Operation op, unique_ptr<ExprNode>&& slot, unique_ptr<ExprNode>&& value): + m_op(op), m_slot( move(slot) ), m_value( move(value) ) { |