From 54b0d60bd89045c371c8a1fdde6be58be5c629ec Mon Sep 17 00:00:00 2001 From: Bart Vandewoestyne Date: Tue, 13 Feb 2024 23:16:08 +0100 Subject: [PATCH] Add definitions for members of ProgramNodeBuilder. --- Structural_Patterns/Facade/CMakeLists.txt | 1 + .../Facade/ProgramNodeBuilder.cpp | 43 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 Structural_Patterns/Facade/ProgramNodeBuilder.cpp diff --git a/Structural_Patterns/Facade/CMakeLists.txt b/Structural_Patterns/Facade/CMakeLists.txt index 1ee5c59..e27dfad 100644 --- a/Structural_Patterns/Facade/CMakeLists.txt +++ b/Structural_Patterns/Facade/CMakeLists.txt @@ -3,6 +3,7 @@ set(facade_SRCS Compiler.cpp ExpressionNode.cpp ProgramNode.cpp + ProgramNodeBuilder.cpp RISCCodeGenerator.cpp) add_library(facade SHARED ${facade_SRCS}) diff --git a/Structural_Patterns/Facade/ProgramNodeBuilder.cpp b/Structural_Patterns/Facade/ProgramNodeBuilder.cpp new file mode 100644 index 0000000..cddd12e --- /dev/null +++ b/Structural_Patterns/Facade/ProgramNodeBuilder.cpp @@ -0,0 +1,43 @@ +#include "ProgramNodeBuilder.h" + + ProgramNodeBuilder::ProgramNodeBuilder() + {} + + ProgramNode* ProgramNodeBuilder::NewVariable( + const char* variableName + ) const + { + // TODO + return 0; + } + + ProgramNode* ProgramNodeBuilder::NewAssignment( + ProgramNode* variable, ProgramNode* expression + ) const + { + // TODO + return 0; + } + + ProgramNode* ProgramNodeBuilder::NewReturnStatement( + ProgramNode* value + ) const + { + // TODO + return 0; + } + + ProgramNode* ProgramNodeBuilder::NewCondition( + ProgramNode* condition, + ProgramNode* truePart, ProgramNode* falsePart + ) const + { + // TODO + return 0; + } + + ProgramNode* ProgramNodeBuilder::GetRootNode() + { + // TODO + return 0; + }