summaryrefslogtreecommitdiff
path: root/source/slang/slang-ast-decl-ref.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-ast-decl-ref.cpp')
-rw-r--r--source/slang/slang-ast-decl-ref.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/slang/slang-ast-decl-ref.cpp b/source/slang/slang-ast-decl-ref.cpp
index 7eec32a3a..c054ef994 100644
--- a/source/slang/slang-ast-decl-ref.cpp
+++ b/source/slang/slang-ast-decl-ref.cpp
@@ -426,6 +426,14 @@ SourceLoc DeclRefBase::getLoc() const
return getDecl()->loc;
}
+// Keep this function here for better debuggin purpose
+String DeclRefBase::toString() const
+{
+ StringBuilder sb;
+ const_cast<DeclRefBase*>(this)->toText(sb);
+ return sb.produceString();
+}
+
DeclRefBase* DeclRefBase::getParent()
{
auto astBuilder = getCurrentASTBuilder();