]> gitweb.ps.run Git - toc/blobdiff - src/repr_get.h
add generic.h (how did i miss that...)
[toc] / src / repr_get.h
index 2d321b0a9bd7ef4cd7aa8e9a7f56afd7631e8464..a1f496a0314ae5205b73d55c05af58526729e093 100644 (file)
@@ -145,6 +145,7 @@ Namespace getNamespace(TocParser::NamespaceDeclContext * ctx, std::shared_ptr<Co
   Namespace result;\r
   result.ctx = std::make_unique<Context>();\r
   result.name = ctx->typeName()->getText();\r
   Namespace result;\r
   result.ctx = std::make_unique<Context>();\r
   result.name = ctx->typeName()->getText();\r
+  result.ctx->name = result.name;\r
   for (auto d : ctx->decl())\r
   {\r
     if (d->varDecl() != nullptr)\r
   for (auto d : ctx->decl())\r
   {\r
     if (d->varDecl() != nullptr)\r
@@ -153,15 +154,15 @@ Namespace getNamespace(TocParser::NamespaceDeclContext * ctx, std::shared_ptr<Co
     }\r
     if (d->funcDecl() != nullptr)\r
     {\r
     }\r
     if (d->funcDecl() != nullptr)\r
     {\r
-      result.functions.push_back(getFunction(d->funcDecl()->func(), result.ctx));\r
+      result.ctx->functions.push_back(getFunction(d->funcDecl()->func(), result.ctx));\r
     }\r
     if (d->structDecl() != nullptr)\r
     {\r
     }\r
     if (d->structDecl() != nullptr)\r
     {\r
-      result.structs.push_back(getStruct(d->structDecl(), result.ctx));\r
+      result.ctx->structs.push_back(getStruct(d->structDecl(), result.ctx));\r
     }\r
     if (d->namespaceDecl() != nullptr)\r
     {\r
     }\r
     if (d->namespaceDecl() != nullptr)\r
     {\r
-      result.namespaces.push_back(getNamespace(d->namespaceDecl(), result.ctx));\r
+      result.ctx->namespaces.push_back(getNamespace(d->namespaceDecl(), result.ctx));\r
     }\r
   }\r
   return result;\r
     }\r
   }\r
   return result;\r
@@ -178,15 +179,15 @@ Program getProgram(TocParser::ProgContext * ctx, std::shared_ptr<Context> parent
     }\r
     if (d->funcDecl() != nullptr)\r
     {\r
     }\r
     if (d->funcDecl() != nullptr)\r
     {\r
-      result.functions.push_back(getFunction(d->funcDecl()->func(), result.ctx));\r
+      result.ctx->functions.push_back(getFunction(d->funcDecl()->func(), result.ctx));\r
     }\r
     if (d->structDecl() != nullptr)\r
     {\r
     }\r
     if (d->structDecl() != nullptr)\r
     {\r
-      result.structs.push_back(getStruct(d->structDecl(), result.ctx));\r
+      result.ctx->structs.push_back(getStruct(d->structDecl(), result.ctx));\r
     }\r
     if (d->namespaceDecl() != nullptr)\r
     {\r
     }\r
     if (d->namespaceDecl() != nullptr)\r
     {\r
-      result.namespaces.push_back(getNamespace(d->namespaceDecl(), result.ctx));\r
+      result.ctx->namespaces.push_back(getNamespace(d->namespaceDecl(), result.ctx));\r
     }\r
   }\r
   return result;\r
     }\r
   }\r
   return result;\r