From 404826e78a56e15e20d3938aed80945295921745 Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Sat, 22 Jun 2024 16:45:04 -0600 Subject: Add parser --- src/syntax_tree.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/syntax_tree.cpp (limited to 'src/syntax_tree.cpp') 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; +} -- cgit v1.2.3