Interpreter prototype alpha
c++ interpreter for make believe language
 
Loading...
Searching...
No Matches
whileNode.h
Go to the documentation of this file.
1
8#ifndef WHILENODE_H
9#define WHILENODE_H
10#include "../tokenNode.h"
11
15class whileNode : public tokenNode{
16public:
21 whileNode();
22
28 std::string __represent__();
29
33 const std::string conditionaltype = "while";
34
38 std::string datatype;
39
43 std::shared_ptr<tokenNode> condition = nullptr;
44
48 std::vector<expressionData> statementsvect;
49};
50
51#endif
node used for creating abstract syntax tree
Definition tokenNode.h:15
std::shared_ptr< tokenNode > condition
pointer to this while loops conditions abstract syntax tree
Definition whileNode.h:43
std::string __represent__()
(virtual) returns a string representing the current state of this whilenode and it's syntax tree stru...
Definition whileNode.cpp:5
whileNode()
constructor
Definition whileNode.cpp:3
std::string datatype
is used by interpreterr to determine the condition's data type whether it is strings or numbers
Definition whileNode.h:38
const std::string conditionaltype
is used by interpreterr to determine the conditional type whether if, for or while
Definition whileNode.h:33
std::vector< expressionData > statementsvect
vector of this while loops statements and their datatypes to be executed
Definition whileNode.h:48
creates a node in the syntax tree of type while
Definition whileNode.h:15