diff options
| author | Yong He <yonghe@outlook.com> | 2024-02-02 22:28:02 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-02 22:28:02 -0800 |
| commit | 14764896c34b230a5563f48d8b8e565de2f3aa10 (patch) | |
| tree | 2f105d3f6222103f458054f1cd38e280b6fb52b4 /source/slang/slang-ast-dump.cpp | |
| parent | c15e7ade4e27e1649d5b98f5854e9e52bb9e60ae (diff) | |
Capability type checking. (#3530)
* Capability type checking.
* Fix.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-ast-dump.cpp')
| -rw-r--r-- | source/slang/slang-ast-dump.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/source/slang/slang-ast-dump.cpp b/source/slang/slang-ast-dump.cpp index cde7c6201..9c40fb12b 100644 --- a/source/slang/slang-ast-dump.cpp +++ b/source/slang/slang-ast-dump.cpp @@ -692,6 +692,31 @@ struct ASTDumpContext m_writer->emit("}"); } + void dump(const CapabilitySet& capSet) + { + m_writer->emit("capability_set("); + bool isFirstSet = true; + for (auto& set : capSet.getExpandedAtoms()) + { + if (!isFirstSet) + { + m_writer->emit(" | "); + } + bool isFirst = true; + for (auto atom : set.getExpandedAtoms()) + { + if (!isFirst) + { + m_writer->emit("+"); + } + dump(capabilityNameToString((CapabilityName)atom)); + isFirst = false; + } + isFirstSet = false; + } + m_writer->emit(")"); + } + void dumpObjectFull(NodeBase* node); ASTDumpContext(SourceWriter* writer, ASTDumpUtil::Flags flags, ASTDumpUtil::Style dumpStyle): |
