]> gitweb.ps.run Git - toc/blobdiff - src/repr.h
structs and functions in ctx
[toc] / src / repr.h
index ff54f971c731da26a9f2da64a683c5c86cc01d79..709528d3c8b55986ea65e73c164ff69f27d95855 100644 (file)
@@ -39,8 +39,11 @@ struct Stmt;
 \r
 struct Context\r
 {\r
+  std::optional<std::string> name;\r
   std::shared_ptr<Context> parent;\r
   std::vector<Variable> variables;\r
+  std::vector<Function> functions;\r
+  std::vector<Struct> structs;\r
 };\r
 \r
 enum class TypeModifierType\r
@@ -110,16 +113,12 @@ struct Namespace
 {\r
   std::string name;\r
   std::shared_ptr<Context> ctx;\r
-  std::vector<Struct> structs;\r
-  std::vector<Function> functions;\r
   std::vector<Namespace> namespaces;\r
 };\r
 \r
 struct Program\r
 {\r
   std::shared_ptr<Context> ctx;\r
-  std::vector<Struct> structs;\r
-  std::vector<Function> functions;\r
   std::vector<Namespace> namespaces;\r
 };\r
 \r