summaryrefslogtreecommitdiff
path: root/ast.h
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-03-10 13:25:56 -0800
committerIan Romanick <ian.d.romanick@intel.com>2010-03-10 13:25:56 -0800
commitd10fe19495191072d39689337700b69e62252bf1 (patch)
tree3626471adcc87b9a21a07a4a1e75b2ce2f09efac /ast.h
parentadfb0cd7401251bef0c854ac945fce78f0ed11db (diff)
Simplified constructor for identifier expressions
Diffstat (limited to 'ast.h')
-rw-r--r--ast.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/ast.h b/ast.h
index 3631692092..3eb8e5f20f 100644
--- a/ast.h
+++ b/ast.h
@@ -150,6 +150,15 @@ public:
ast_expression(int oper, ast_expression *,
ast_expression *, ast_expression *);
+ ast_expression(const char *identifier) :
+ oper(ast_identifier)
+ {
+ subexpressions[0] = NULL;
+ subexpressions[1] = NULL;
+ subexpressions[2] = NULL;
+ primary_expression.identifier = (char *) identifier;
+ }
+
static const char *operator_string(enum ast_operators op);
virtual ir_instruction *hir(exec_list *instructions,