diff options
author | rtk0c <[email protected]> | 2022-06-02 21:34:16 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2022-06-02 21:34:16 -0700 |
commit | bd07ae3f4e1bcdedc3e373460671ca9713a03de5 (patch) | |
tree | 15c897891474a97983f247196923f8e4f2184083 /source/20-codegen-compiler/CodegenInput.hpp | |
parent | 8a0f2cd0b398ee0b7740e44a0e5fb2f75d090ccb (diff) |
Changeset: 60 Add struct/class scanning to codegen
Diffstat (limited to 'source/20-codegen-compiler/CodegenInput.hpp')
-rw-r--r-- | source/20-codegen-compiler/CodegenInput.hpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/source/20-codegen-compiler/CodegenInput.hpp b/source/20-codegen-compiler/CodegenInput.hpp new file mode 100644 index 0000000..63c2673 --- /dev/null +++ b/source/20-codegen-compiler/CodegenInput.hpp @@ -0,0 +1,32 @@ +#pragma once + +#include "CodegenConfig.hpp" +#include "CodegenDecl.hpp" +#include "CodegenUtils.hpp" + +#include <cinttypes> +#include <string> +#include <string_view> + +using namespace std::literals; + +class CodegenInput { +private: + class Private; + Private* m; + +public: + CodegenInput(); + ~CodegenInput(); + + DeclEnum* AddEnum(std::string fullname, DeclEnum decl); + DeclStruct* AddStruct(std::string fullname, DeclStruct decl); + + const DeclEnum* FindEnum(std::string_view name) const; + const DeclStruct* FindStruct(std::string_view name) const; + + DeclNamespace* AddNamespace(DeclNamespace ns); + + const DeclNamespace* FindNamespace(std::string_view fullname) const; + DeclNamespace* FindNamespace(std::string_view name); +}; |