From 1a6f1ea3b76c3ed4cad5aba5502af390ce50a2c0 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Sat, 28 May 2022 20:52:42 -0700 Subject: Changeset: 42 Change codegen input parsing to lookahead based; lookup table infra; input/output decl infra --- buildtools/codegen/CodegenDecl.hpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 buildtools/codegen/CodegenDecl.hpp (limited to 'buildtools/codegen/CodegenDecl.hpp') diff --git a/buildtools/codegen/CodegenDecl.hpp b/buildtools/codegen/CodegenDecl.hpp new file mode 100644 index 0000000..3414d80 --- /dev/null +++ b/buildtools/codegen/CodegenDecl.hpp @@ -0,0 +1,32 @@ +#pragma once + +#include +#include + +// Structs or classes +struct DeclStruct { + std::string name; +}; + +enum EnumUnderlyingType { + EUT_Int8, + EUT_Int16, + EUT_Int32, + EUT_Int64, + EUT_Uint8, + EUT_Uint16, + EUT_Uint32, + EUT_Uint64, + EUT_COUNT, +}; + +struct DeclEnumElement { + std::string name; + uint64_t value; +}; + +struct DeclEnum { + std::string name; + std::vector elements; + EnumUnderlyingType underlyingType; +}; -- cgit v1.2.3-70-g09d2