summaryrefslogtreecommitdiff
path: root/source/slang/slang-syntax.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-syntax.cpp')
-rw-r--r--source/slang/slang-syntax.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/slang/slang-syntax.cpp b/source/slang/slang-syntax.cpp
index 678d9ec26..6350a7e4d 100644
--- a/source/slang/slang-syntax.cpp
+++ b/source/slang/slang-syntax.cpp
@@ -2,7 +2,7 @@
#include "slang-compiler.h"
#include "slang-visitor.h"
-
+#include "slang-ast-print.h"
#include <typeinfo>
#include <assert.h>
@@ -55,6 +55,13 @@ void printDiagnosticArg(StringBuilder& sb, QualType const& type)
sb << "<null>";
}
+void printDiagnosticArg(StringBuilder& sb, QualifiedDeclPath path)
+{
+ ASTPrinter printer(getCurrentASTBuilder());
+ printer.addDeclPath(path.declRef);
+ sb << printer.getString();
+}
+
SourceLoc getDiagnosticPos(SyntaxNode const* syntax)
{
if (!syntax)