summaryrefslogtreecommitdiff
path: root/ast.h
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-02-22 19:10:25 -0800
committerIan Romanick <ian.d.romanick@intel.com>2010-02-22 19:10:25 -0800
commit88349b22caa0ab0b44188dbb9e002549aadb0590 (patch)
treee308a20dca7272e48a4de3539708e0f0cf2c3d9a /ast.h
parent89227f6ce40aa34d77fb61edbd32e522afc6e493 (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.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/ast.h b/ast.h
index 591655d06c..1f659933e9 100644
--- a/ast.h
+++ b/ast.h
@@ -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
*