abouttreesummaryrefslogcommitdiff
path: root/src/repr.h
diff options
context:
space:
mode:
authorPatrick Schönberger2021-08-11 18:02:56 +0200
committerPatrick Schönberger2021-08-11 18:02:56 +0200
commit17860defa84c6d8bc0e8bc088a7e09361f17db07 (patch)
tree87d602a2d4419307e73928bc1993a6295ba2cb39 /src/repr.h
parent3715a3f575b615f66e8ea7e57f83849e8bae4deb (diff)
downloadtoc-17860defa84c6d8bc0e8bc088a7e09361f17db07.tar.gz
toc-17860defa84c6d8bc0e8bc088a7e09361f17db07.zip
structs and functions in ctx
Diffstat (limited to 'src/repr.h')
-rw-r--r--src/repr.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/repr.h b/src/repr.h
index ff54f97..709528d 100644
--- a/src/repr.h
+++ b/src/repr.h
@@ -39,8 +39,11 @@ struct Stmt;
struct Context
{
+ std::optional<std::string> name;
std::shared_ptr<Context> parent;
std::vector<Variable> variables;
+ std::vector<Function> functions;
+ std::vector<Struct> structs;
};
enum class TypeModifierType
@@ -110,16 +113,12 @@ struct Namespace
{
std::string name;
std::shared_ptr<Context> ctx;
- std::vector<Struct> structs;
- std::vector<Function> functions;
std::vector<Namespace> namespaces;
};
struct Program
{
std::shared_ptr<Context> ctx;
- std::vector<Struct> structs;
- std::vector<Function> functions;
std::vector<Namespace> namespaces;
};