Interpreter prototype alpha
c++ interpreter for make believe language
 
Loading...
Searching...
No Matches
functionNode.h
Go to the documentation of this file.
1
8#ifndef FUNCTIONNODE_H
9#define FUNCTIONNODE_H
10#include "../tokenNode.h"
11
12
16class functionNode : public tokenNode{
17public:
18 const int FUNC_ARG_MAX = 5;
20 std::string __represent__();
21 std::string functionName = "";
23 std::vector<expressionData> arguments;
24 std::vector<expressionData> statementsvect;
25
26 void attachArgAt(int& index, std::shared_ptr<tokenNode> value);
27
28 static std::vector<std::shared_ptr<functionNode>> stackFUNCvector;
29 static void pushIntoFuncVector(std::shared_ptr<functionNode> token);
30 static bool alreadyExistingFunction(const std::string& toCheck);
31 static std::shared_ptr<functionNode> getThisFunction(const std::string& funcname);
32};
33
34#endif
int functionArgsAmounts
Definition functionNode.h:22
void attachArgAt(int &index, std::shared_ptr< tokenNode > value)
Definition functionNode.cpp:41
std::string __represent__()
(virtual) returns a string representing the current state of the syntax tree
Definition functionNode.cpp:7
static bool alreadyExistingFunction(const std::string &toCheck)
Definition functionNode.cpp:49
functionNode()
Definition functionNode.cpp:5
static std::vector< std::shared_ptr< functionNode > > stackFUNCvector
Definition functionNode.h:28
static void pushIntoFuncVector(std::shared_ptr< functionNode > token)
Definition functionNode.cpp:45
std::vector< expressionData > arguments
Definition functionNode.h:23
static std::shared_ptr< functionNode > getThisFunction(const std::string &funcname)
Definition functionNode.cpp:58
const int FUNC_ARG_MAX
Definition functionNode.h:18
std::vector< expressionData > statementsvect
Definition functionNode.h:24
std::string functionName
Definition functionNode.h:21
creates a node in the syntax tree of type functionNode
Definition functionNode.h:16
node used for creating abstract syntax tree
Definition tokenNode.h:15
creates an object with the mapping of a token that was assigned to it from the 'tokens' class
Definition tokens.h:200