From 8533dd2344d8be040a992a86f23e7cf696d59c4a Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 15 Mar 2022 10:45:24 -0400 Subject: C++ extractor callable support (#2159) * #include an absolute path didn't work - because paths were taken to always be relative. * Split doc extractor such that can be used in C++ extractor. * Compiles. Update the stdlib docs. * Fix issue on release builds. * Add support for extracting documentation to C++ extractor. * Dump out markup. Make enum value backing type take tokens. * Node::Type -> Node::Kind * More improvements around Node::Type -> Node::Kind * Support for parsing callable types. * Fix issue params for callable, and default value for variable. * Add support for static. * Improve handling parsing of contained types. * Small improvements around template consumption. * Improve dumping with markup/static. * Small improvements around reflection. * Add more flexible handling of markers. Allow reflection without markers. --- tools/slang-cpp-extractor/macro-writer.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tools/slang-cpp-extractor/macro-writer.cpp') diff --git a/tools/slang-cpp-extractor/macro-writer.cpp b/tools/slang-cpp-extractor/macro-writer.cpp index c4245a646..0f217cd4e 100644 --- a/tools/slang-cpp-extractor/macro-writer.cpp +++ b/tools/slang-cpp-extractor/macro-writer.cpp @@ -120,13 +120,16 @@ SlangResult MacroWriter::calcChildrenHeader(NodeTree* tree, TypeSet* typeSet, St // Define the derived types out << "#define " << m_options->m_markPrefix << "FIELDS_" << reflectTypeName << "_" << classNode->m_name.getContent() << "(_x_, _param_)"; - // Find all of the fields + // Find all of the instance fields fields List fields; for (Node* child : classNode->m_children) { if (auto field = as(child)) { - fields.add(field); + if (!field->m_isStatic) + { + fields.add(field); + } } } -- cgit v1.2.3