unlogic
Loading...
Searching...
No Matches
Node.cpp
Go to the documentation of this file.
1
4#include "Node.h"
5
6using namespace unlogic;
7
10
11StringLiteralNode::StringLiteralNode(std::string value) : Literal(std::move(value)) {}
13
14VariableNode::VariableNode(std::string identifier) : identifier(std::move(identifier)) {}
16
17CallNode::CallNode(std::string function_name, std::vector<UniqueNode> arguments) : function_name(std::move(function_name)), arguments(std::move(arguments)) {}
18CallNode::~CallNode() = default;
19
20BinaryNode::BinaryNode(UniqueNode lhs, UniqueNode rhs) : lhs(std::move(lhs)), rhs(std::move(rhs)) {}
21BinaryNode::~BinaryNode() = default;
22
23AdditionNode::AdditionNode(UniqueNode lhs, UniqueNode rhs) : BinaryNode(std::move(lhs), std::move(rhs)) {}
25
26SubtractionNode::SubtractionNode(UniqueNode lhs, UniqueNode rhs) : BinaryNode(std::move(lhs), std::move(rhs)) {}
28
29MultiplicationNode::MultiplicationNode(UniqueNode lhs, UniqueNode rhs) : BinaryNode(std::move(lhs), std::move(rhs)) {}
31
32DivisionNode::DivisionNode(UniqueNode lhs, UniqueNode rhs) : BinaryNode(std::move(lhs), std::move(rhs)) {}
34
35PotentiationNode::PotentiationNode(UniqueNode lhs, UniqueNode rhs) : BinaryNode(std::move(lhs), std::move(rhs)) {}
37
38FunctionDefinitionNode::FunctionDefinitionNode(std::string name, std::vector<std::string> arguments, UniqueNode body) : name(std::move(name)), args(std::move(arguments)), body(std::move(body)) {}
39FunctionDefinitionNode::FunctionDefinitionNode(std::string name, UniqueNode body) : name(std::move(name)), body(std::move(body)) {}
41
42PlotCommandNode::PlotCommandNode(std::string function_name) : function_name(std::move(function_name)) {}
44
45ScopedBlockNode::ScopedBlockNode(std::vector<UniqueNode> statements) : statements(std::move(statements)) {}
47
48ProgramEntryNode::ProgramEntryNode(UniqueNode body) : body(std::move(body)) {}
std::unique_ptr< Node > UniqueNode
Definition Node.h:30
AdditionNode(UniqueNode lhs, UniqueNode rhs)
Definition Node.cpp:23
BinaryNode(UniqueNode lhs, UniqueNode rhs)
Definition Node.cpp:20
CallNode(std::string function_name, std::vector< UniqueNode > arguments)
Definition Node.cpp:17
DivisionNode(UniqueNode lhs, UniqueNode rhs)
Definition Node.cpp:32
FunctionDefinitionNode(std::string name, std::vector< std::string > arguments, UniqueNode body)
Definition Node.cpp:38
MultiplicationNode(UniqueNode lhs, UniqueNode rhs)
Definition Node.cpp:29
NumericLiteralNode(double value)
Definition Node.cpp:8
PlotCommandNode(std::string function_name)
Definition Node.cpp:42
PotentiationNode(UniqueNode lhs, UniqueNode rhs)
Definition Node.cpp:35
ProgramEntryNode(UniqueNode body)
Definition Node.cpp:48
ScopedBlockNode(std::vector< UniqueNode > statements)
Definition Node.cpp:45
StringLiteralNode(std::string value)
Definition Node.cpp:11
SubtractionNode(UniqueNode lhs, UniqueNode rhs)
Definition Node.cpp:26
VariableNode(std::string identifier)
Definition Node.cpp:14