diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2010-02-22 19:10:25 -0800 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-02-22 19:10:25 -0800 |
commit | 88349b22caa0ab0b44188dbb9e002549aadb0590 (patch) | |
tree | e308a20dca7272e48a4de3539708e0f0cf2c3d9a /ast.h | |
parent | 89227f6ce40aa34d77fb61edbd32e522afc6e493 (diff) |
Add ast_expression_bin subclass of ast_expression
The ast_expression_bin subclass is used for all binary expressions
such as addition, subtraction, and comparisons. Several other
subclasses are soon to follow.
Diffstat (limited to 'ast.h')
-rw-r--r-- | ast.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -159,6 +159,8 @@ public: ast_expression(int oper, ast_expression *, ast_expression *, ast_expression *); + static const char *operator_string(enum ast_operators op); + virtual void print(void) const; enum ast_operators oper; @@ -180,6 +182,14 @@ public: struct simple_node expressions; }; +class ast_expression_bin : public ast_expression { +public: + ast_expression_bin(int oper, ast_expression *, ast_expression *); + + virtual void print(void) const; +}; + + /** * Number of possible operators for an ast_expression * |