From 9610ce88f0b753db81014a053bd3c6d79471c90c Mon Sep 17 00:00:00 2001 From: Patrick Schönberger Date: Wed, 11 Aug 2021 23:34:11 +0200 Subject: add comments, fix struct/function lookup --- src/repr_get.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/repr_get.h') diff --git a/src/repr_get.h b/src/repr_get.h index 7436dde..a1f496a 100644 --- a/src/repr_get.h +++ b/src/repr_get.h @@ -145,6 +145,7 @@ Namespace getNamespace(TocParser::NamespaceDeclContext * ctx, std::shared_ptr(); result.name = ctx->typeName()->getText(); + result.ctx->name = result.name; for (auto d : ctx->decl()) { if (d->varDecl() != nullptr) @@ -161,7 +162,7 @@ Namespace getNamespace(TocParser::NamespaceDeclContext * ctx, std::shared_ptrnamespaceDecl() != nullptr) { - result.namespaces.push_back(getNamespace(d->namespaceDecl(), result.ctx)); + result.ctx->namespaces.push_back(getNamespace(d->namespaceDecl(), result.ctx)); } } return result; @@ -186,7 +187,7 @@ Program getProgram(TocParser::ProgContext * ctx, std::shared_ptr parent } if (d->namespaceDecl() != nullptr) { - result.namespaces.push_back(getNamespace(d->namespaceDecl(), result.ctx)); + result.ctx->namespaces.push_back(getNamespace(d->namespaceDecl(), result.ctx)); } } return result; -- cgit v1.2.3