summaryrefslogtreecommitdiff
path: root/src/mem/slicc/ast/NewExprAST.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/slicc/ast/NewExprAST.cc')
-rw-r--r--src/mem/slicc/ast/NewExprAST.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mem/slicc/ast/NewExprAST.cc b/src/mem/slicc/ast/NewExprAST.cc
new file mode 100644
index 000000000..95e57192f
--- /dev/null
+++ b/src/mem/slicc/ast/NewExprAST.cc
@@ -0,0 +1,9 @@
+
+#include "mem/slicc/ast/NewExprAST.hh"
+
+Type* NewExprAST::generate(string & code) const
+{
+ Type* type = m_type_ptr->lookupType();
+ code += "new " + type->cIdent();
+ return type;
+}