diff options
| author | Patrick Schönberger | 2021-08-04 15:05:42 +0200 |
|---|---|---|
| committer | Patrick Schönberger | 2021-08-04 15:05:42 +0200 |
| commit | 7f83e1b208e87e3808b268303bb633a8fda203f5 (patch) | |
| tree | 8ab149b206144fc1bf99872b281cb7d965edf5e1 /src/repr.h | |
| parent | be56e29997e17685eebf8bd7cb745183c60de7db (diff) | |
| download | toc-7f83e1b208e87e3808b268303bb633a8fda203f5.tar.gz toc-7f83e1b208e87e3808b268303bb633a8fda203f5.zip | |
pre change
Diffstat (limited to 'src/repr.h')
| -rw-r--r-- | src/repr.h | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -37,6 +37,12 @@ struct AssignStmt; struct ReturnStmt;
struct Stmt;
+struct Context
+{
+ std::shared_ptr<Context> parent;
+ std::vector<Variable> variables;
+};
+
enum class TypeModifierType
{
Pointer, Array
@@ -65,7 +71,7 @@ struct Variable struct Body
{
- std::vector<Variable> variables;
+ std::shared_ptr<Context> ctx;
std::vector<Stmt> statements;
};
@@ -95,7 +101,7 @@ struct Struct struct Namespace
{
std::string name;
- std::vector<Variable> variables;
+ std::shared_ptr<Context> ctx;
std::vector<Struct> structs;
std::vector<Function> functions;
std::vector<Namespace> namespaces;
@@ -103,7 +109,7 @@ struct Namespace struct Program
{
- std::vector<Variable> variables;
+ std::shared_ptr<Context> ctx;
std::vector<Struct> structs;
std::vector<Function> functions;
std::vector<Namespace> namespaces;
|
