summaryrefslogtreecommitdiff
path: root/src/syntax_tree.cpp
diff options
context:
space:
mode:
authorHombreLaser <buran@silosneeded.com>2024-06-22 16:45:04 -0600
committerHombreLaser <buran@silosneeded.com>2024-06-22 16:45:04 -0600
commit404826e78a56e15e20d3938aed80945295921745 (patch)
treed607769fccfc4e3c77a9465a9800004421c500cb /src/syntax_tree.cpp
parent10ecf4d95194a273cc6aab89c3a1bcf739a194cd (diff)
Add parser
Diffstat (limited to 'src/syntax_tree.cpp')
-rw-r--r--src/syntax_tree.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/syntax_tree.cpp b/src/syntax_tree.cpp
new file mode 100644
index 0000000..83b5d60
--- /dev/null
+++ b/src/syntax_tree.cpp
@@ -0,0 +1,13 @@
+#include "include/syntax_tree.hpp"
+
+SyntaxTree::SyntaxTree(SyntaxTree *left,
+ SyntaxTree *right)
+ : left{left}, right{right} {}
+
+SyntaxTree::~SyntaxTree() {
+ if(left != nullptr)
+ delete left;
+
+ if(right != nullptr)
+ delete right;
+}