diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2020-10-22 08:46:12 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-22 08:46:12 -0400 |
| commit | 10e1bae34733f1cdb5abc001666b1aafa1c1f406 (patch) | |
| tree | ad9571c071b7b7c2384cdd42426851d257fc5f7b /source/slang/slang-ast-reflect.cpp | |
| parent | c0943661e5441bfb996430c4f67fb4dddea9dfcf (diff) | |
Single pass C++ extraction (#1583)
* #include an absolute path didn't work - because paths were taken to always be relative.
* Added CharUtil.
Added TypeSet to extractor.
First pass at being able to specify all headers for multiple output headers.
* Fix includes for new C++ extractor convension.
Update premake5 to use new extractor mechanisms.
* Small improvements around StringUtil.
* Split out NameConventionUtil.
* Use a 'convert' to convert between convention types.
* Fix output of build message for C++ extractor.
Improve NameConventionUtil interface.
* Improve comments.
* Fix warning on gcc.
* Fix clang warning.
* Fix some typos in NameConventionUtil.
* Small fix to premake5.lua
* Fix generated includes.
* Remove m_reflectType as no longer applicable with TypeSet.
* Fix .gitignore for slang-generated-* files.
Added getConvention to determine convention from slice.
Add versions of split and convert that infer the from convention
* Fix typo in spliting camel.
* LineWhitespace -> HorizontalWhitespace
* Improve CharUtil comments.
Diffstat (limited to 'source/slang/slang-ast-reflect.cpp')
| -rw-r--r-- | source/slang/slang-ast-reflect.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/slang/slang-ast-reflect.cpp b/source/slang/slang-ast-reflect.cpp index 520592e73..b16568d2e 100644 --- a/source/slang/slang-ast-reflect.cpp +++ b/source/slang/slang-ast-reflect.cpp @@ -11,7 +11,7 @@ #include "slang-visitor.h" -#include "slang-ast-generated-macro.h" +#include "slang-generated-ast-macro.h" namespace Slang { @@ -54,11 +54,11 @@ struct ASTConstructAccess #define SLANG_GET_SUPER_INNER(SUPER) &SUPER::kReflectClassInfo #define SLANG_GET_SUPER_LEAF(SUPER) &SUPER::kReflectClassInfo -#define SLANG_GET_CREATE_FUNC_ABSTRACT(NAME) nullptr -#define SLANG_GET_CREATE_FUNC_NONE(NAME) &ASTConstructAccess::Impl<NAME>::create +#define SLANG_GET_CREATE_FUNC_ABSTRACT_AST(NAME) nullptr +#define SLANG_GET_CREATE_FUNC_AST(NAME) &ASTConstructAccess::Impl<NAME>::create -#define SLANG_GET_DESTROY_FUNC_ABSTRACT(NAME) nullptr -#define SLANG_GET_DESTROY_FUNC_NONE(NAME) &ASTConstructAccess::Impl<NAME>::destroy +#define SLANG_GET_DESTROY_FUNC_ABSTRACT_AST(NAME) nullptr +#define SLANG_GET_DESTROY_FUNC_AST(NAME) &ASTConstructAccess::Impl<NAME>::destroy #define SLANG_REFLECT_CLASS_INFO(NAME, SUPER, ORIGIN, LAST, MARKER, TYPE, param) \ /* static */const ReflectClassInfo NAME::kReflectClassInfo = { uint32_t(ASTNodeType::NAME), uint32_t(ASTNodeType::LAST), SLANG_GET_SUPER_##TYPE(SUPER), #NAME, SLANG_GET_CREATE_FUNC_##MARKER(NAME), SLANG_GET_DESTROY_FUNC_##MARKER(NAME), uint32_t(sizeof(NAME)), uint8_t(SLANG_ALIGN_OF(NAME)) }; @@ -66,8 +66,8 @@ struct ASTConstructAccess SLANG_ALL_ASTNode_NodeBase(SLANG_REFLECT_CLASS_INFO, _) // We dispatch to non 'abstract' types -#define SLANG_CASE_NONE(NAME) case ASTNodeType::NAME: return visitor->dispatch_##NAME(static_cast<NAME*>(this), extra); -#define SLANG_CASE_ABSTRACT(NAME) +#define SLANG_CASE_AST(NAME) case ASTNodeType::NAME: return visitor->dispatch_##NAME(static_cast<NAME*>(this), extra); +#define SLANG_CASE_ABSTRACT_AST(NAME) #define SLANG_CASE_DISPATCH(NAME, SUPER, ORIGIN, LAST, MARKER, TYPE, param) SLANG_CASE_##MARKER(NAME) |
