From 2e1c15f36b42374455228e37885bdb221f302050 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 2 Nov 2022 12:12:18 -0700 Subject: Rework differential conformance dictionary checking. (#2483) * Rework differential conformance dictionary checking. * Revert space changes. Co-authored-by: Yong He --- source/slang/slang-ast-dump.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'source/slang/slang-ast-dump.cpp') diff --git a/source/slang/slang-ast-dump.cpp b/source/slang/slang-ast-dump.cpp index 455a9db74..fc3c015e0 100644 --- a/source/slang/slang-ast-dump.cpp +++ b/source/slang/slang-ast-dump.cpp @@ -408,6 +408,35 @@ struct ASTDumpContext m_writer->emit("}"); } + template + void dump(const OrderedDictionary& dict) + { + m_writer->emit(" { \n"); + m_writer->indent(); + + for (auto iter : dict) + { + const auto& key = iter.Key; + const auto& value = iter.Value; + + dump(key); + m_writer->emit(" : "); + dump(value); + + m_writer->emit("\n"); + } + + m_writer->dedent(); + m_writer->emit("}"); + } + + void dump(DeclRefBase declRef) + { + StringBuilder sb; + sb << declRef; + m_writer->emit(sb.ToString()); + } + void dump(const DeclCheckStateExt& extState) { auto state = extState.getState(); -- cgit v1.2.3