]> gitweb.ps.run Git - toc/blobdiff - src/repr_get.h
structs and functions in ctx
[toc] / src / repr_get.h
index 2d321b0a9bd7ef4cd7aa8e9a7f56afd7631e8464..7436dde1e553874a206590e8a9d222e681b86379 100644 (file)
@@ -153,11 +153,11 @@ Namespace getNamespace(TocParser::NamespaceDeclContext * ctx, std::shared_ptr<Co
     }\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
-      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
@@ -178,11 +178,11 @@ Program getProgram(TocParser::ProgContext * ctx, std::shared_ptr<Context> parent
     }\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
-      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