From 453683bf44f2112719802eaac2b332d49eebd640 Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 19 Aug 2024 15:03:56 -0700 Subject: Tuple swizzling, concat, comparison and `countof`. (#4856) * Tuple swizzling and element access. * Update proposal status. * Cleanup. * Fix merrge error. * Address review. --- source/slang/slang-ast-dump.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 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 8b2494310..a1ab7a5c8 100644 --- a/source/slang/slang-ast-dump.cpp +++ b/source/slang/slang-ast-dump.cpp @@ -203,6 +203,27 @@ struct ASTDumpContext m_writer->emit("}"); } + template + void dump(const ShortList& list) + { + m_writer->emit(" { \n"); + m_writer->indent(); + for (Index i = 0; i < list.getCount(); ++i) + { + dump(list[i]); + if (i < list.getCount() - 1) + { + m_writer->emit(",\n"); + } + else + { + m_writer->emit("\n"); + } + } + m_writer->dedent(); + m_writer->emit("}"); + } + void dump(SourceLoc sourceLoc) { if (m_dumpFlags & ASTDumpUtil::Flag::HideSourceLoc) @@ -285,6 +306,10 @@ struct ASTDumpContext { m_writer->emit(UInt(v)); } + void dump(UInt v) + { + m_writer->emit(v); + } void dump(int32_t v) { m_writer->emit(v); -- cgit v1.2.3