summaryrefslogtreecommitdiff
path: root/tools/slang-cpp-extractor/macro-writer.h
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2024-10-29 14:49:26 +0800
committerGitHub <noreply@github.com>2024-10-29 14:49:26 +0800
commitf65d756bff8d4c5cbc15bd0322a2ae8e6b896a21 (patch)
treeea1d61342cd29368e19135000ec2948813096205 /tools/slang-cpp-extractor/macro-writer.h
parenta729c15e9dce9f5116a38afc66329ab2ca4cea54 (diff)
format
* format * Minor test fixes * enable checking cpp format in ci
Diffstat (limited to 'tools/slang-cpp-extractor/macro-writer.h')
-rw-r--r--tools/slang-cpp-extractor/macro-writer.h26
1 files changed, 11 insertions, 15 deletions
diff --git a/tools/slang-cpp-extractor/macro-writer.h b/tools/slang-cpp-extractor/macro-writer.h
index b1754741d..0cbf85fb3 100644
--- a/tools/slang-cpp-extractor/macro-writer.h
+++ b/tools/slang-cpp-extractor/macro-writer.h
@@ -1,47 +1,43 @@
#ifndef CPP_EXTRACT_MACRO_WRITER_H
#define CPP_EXTRACT_MACRO_WRITER_H
+#include "../../source/compiler-core/slang-diagnostic-sink.h"
#include "diagnostics.h"
-
-#include "options.h"
#include "node-tree.h"
+#include "options.h"
-#include "../../source/compiler-core/slang-diagnostic-sink.h"
-
-namespace CppExtract {
+namespace CppExtract
+{
using namespace Slang;
/* A class that writes out macros that define type hierarchies, as well as fields of types */
class MacroWriter
{
public:
-
- /// Write output
+ /// Write output
SlangResult writeOutput(NodeTree* tree);
- /// Write def files
+ /// Write def files
SlangResult writeDefs(NodeTree* tree);
- /// Calculate the header
+ /// Calculate the header
SlangResult calcTypeHeader(NodeTree* tree, TypeSet* typeSet, StringBuilder& out);
SlangResult calcChildrenHeader(NodeTree* tree, TypeSet* typeSet, StringBuilder& out);
SlangResult calcOriginHeader(NodeTree* tree, StringBuilder& out);
SlangResult calcDef(NodeTree* tree, SourceOrigin* origin, StringBuilder& out);
- /// Ctor.
- MacroWriter(DiagnosticSink* sink, const Options* options):
- m_sink(sink),
- m_options(options)
+ /// Ctor.
+ MacroWriter(DiagnosticSink* sink, const Options* options)
+ : m_sink(sink), m_options(options)
{
}
protected:
-
const Options* m_options = nullptr;
DiagnosticSink* m_sink;
};
-} // CppExtract
+} // namespace CppExtract
#endif