27 lines
555 B
C++
27 lines
555 B
C++
#ifndef NAMESCOPE_H
|
|
#define NAMESCOPE_H
|
|
|
|
#include <any>
|
|
#include <stack>
|
|
#include <string>
|
|
#include <unordered_map>
|
|
#include <vector>
|
|
|
|
#include "utils.h"
|
|
|
|
class FucntionContainer {
|
|
struct FunctionItem {
|
|
;
|
|
};
|
|
};
|
|
class VariableContainer {
|
|
std::unordered_map<std::string, std::any> GlobalScope;
|
|
std::stack<std::unordered_map<std::string, std::any>> StackScopes;
|
|
|
|
public:
|
|
void CreateFrame();
|
|
void DestroyFrame();
|
|
std::any ReadVariable(const std::string &name);
|
|
void WriteVariable(const std::string &name, const std::any &value);
|
|
};
|
|
#endif |