summaryrefslogtreecommitdiffstats
path: root/tools/slang-cpp-extractor/parser.h
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2022-03-09 18:38:00 -0500
committerGitHub <noreply@github.com>2022-03-09 18:38:00 -0500
commitf67d929c24babc302eb2807251fc09b084abac2e (patch)
treef4b3a47d5165e4e890c9d68e846e2aa238dbb1e0 /tools/slang-cpp-extractor/parser.h
parent727c7d2b824913b3ae263243421ea79ca4940eb8 (diff)
Initial support for documentation extraction in C++ (#2156)
* #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
Diffstat (limited to 'tools/slang-cpp-extractor/parser.h')
-rw-r--r--tools/slang-cpp-extractor/parser.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/slang-cpp-extractor/parser.h b/tools/slang-cpp-extractor/parser.h
index f0febb728..5ed862d65 100644
--- a/tools/slang-cpp-extractor/parser.h
+++ b/tools/slang-cpp-extractor/parser.h
@@ -31,14 +31,14 @@ public:
/// Parse the contents of the source file
SlangResult parse(SourceOrigin* sourceOrigin, const Options* options);
- void setTypeEnabled(Node::Type type, bool isEnabled = true);
- bool isTypeEnabled(Node::Type type) { return (m_nodeTypeEnabled & (NodeTypeBitType(1) << int(type))) != 0; }
- void setTypesEnabled(const Node::Type* types, Index typesCount, bool isEnabled = true);
+ void setKindEnabled(Node::Kind kind, bool isEnabled = true);
+ bool isTypeEnabled(Node::Kind kind) { return (m_nodeTypeEnabled & (NodeTypeBitType(1) << int(kind))) != 0; }
+ void setKindsEnabled(const Node::Kind* kinds, Index kindsCount, bool isEnabled = true);
Parser(NodeTree* nodeTree, DiagnosticSink* sink);
protected:
- static Node::Type _toNodeType(IdentifierStyle style);
+ static Node::Kind _toNodeKind(IdentifierStyle style);
bool _isMarker(const UnownedStringSlice& name);
@@ -47,7 +47,7 @@ protected:
SlangResult _parsePreDeclare();
SlangResult _parseTypeSet();
- SlangResult _maybeParseNode(Node::Type type);
+ SlangResult _maybeParseNode(Node::Kind kind);
SlangResult _maybeParseField();
SlangResult _parseTypeDef();