From 7d8bca09b3c4bf1418e758bd3bd0d6f85672153e Mon Sep 17 00:00:00 2001 From: rtk0c Date: Mon, 30 May 2022 15:52:19 -0700 Subject: Changeset: 52 Add support for namespaced enums --- buildtools/codegen/CodegenDecl.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'buildtools/codegen/CodegenDecl.hpp') diff --git a/buildtools/codegen/CodegenDecl.hpp b/buildtools/codegen/CodegenDecl.hpp index b7c1ee4..32d5445 100644 --- a/buildtools/codegen/CodegenDecl.hpp +++ b/buildtools/codegen/CodegenDecl.hpp @@ -3,8 +3,15 @@ #include #include +struct DeclNamespace { + DeclNamespace* container = nullptr; + std::string name; + std::string_view fullname; // View into storage map key +}; + // Structs or classes struct DeclStruct { + DeclNamespace* container = nullptr; std::string name; }; @@ -40,6 +47,7 @@ struct DeclEnumElement { }; struct DeclEnum { + DeclNamespace* container = nullptr; std::string name; std::vector elements; EnumUnderlyingType underlyingType; @@ -56,6 +64,7 @@ struct DeclFunctionArgument { }; struct DeclFunction { + DeclNamespace* container = nullptr; // Things like extern, static, etc. that gets written before the function return type std::string prefix; std::string name; -- cgit v1.2.3-70-g09d2