summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ast-dump.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-ast-dump.cpp')
-rw-r--r--source/slang/slang-ast-dump.cpp25
1 files changed, 25 insertions, 0 deletions
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 <typename T, int n>
+ void dump(const ShortList<T, n>& 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);