summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/op.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/op.h b/src/op.h
index 7f07da94..d8f572d6 100644
--- a/src/op.h
+++ b/src/op.h
@@ -273,7 +273,10 @@ private:
ptr_op_t _right = NULL);
ptr_op_t copy(ptr_op_t _left = NULL, ptr_op_t _right = NULL) const {
- return new_node(kind, _left, _right);
+ ptr_op_t node(new_node(kind, _left, _right));
+ if (kind < TERMINALS)
+ node->data = data;
+ return node;
}
public: