struct ReturnStmt;\r
struct Stmt;\r
\r
+struct Context\r
+{\r
+ std::shared_ptr<Context> parent;\r
+ std::vector<Variable> variables;\r
+};\r
+\r
enum class TypeModifierType\r
{\r
Pointer, Array\r
\r
struct Body\r
{\r
- std::vector<Variable> variables;\r
+ std::shared_ptr<Context> ctx;\r
std::vector<Stmt> statements;\r
};\r
\r
Type returnType;\r
std::string name;\r
std::vector<Variable> parameters;\r
+ bool defined;\r
Body body;\r
};\r
\r
struct Namespace\r
{\r
std::string name;\r
- std::vector<Variable> variables;\r
+ std::shared_ptr<Context> ctx;\r
std::vector<Struct> structs;\r
std::vector<Function> functions;\r
std::vector<Namespace> namespaces;\r
\r
struct Program\r
{\r
- std::vector<Variable> variables;\r
+ std::shared_ptr<Context> ctx;\r
std::vector<Struct> structs;\r
std::vector<Function> functions;\r
std::vector<Namespace> namespaces;\r