summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ast-print.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2025-07-03 15:20:23 -0700
committerGitHub <noreply@github.com>2025-07-03 22:20:23 +0000
commitb4fc380af5e390ca11892f9e657e653f6869c21b (patch)
tree9072841ed14a190cce0790ced27b283f85d1fc4f /source/slang/slang-ast-print.cpp
parent551d0c365571a2e36505851f6a713464662c5fea (diff)
Language Server Enhancements (#7604)
* Language Server: auto-select the best candidate in signature help. * Fix constructor call highlighting + goto definition. * Add test. * format code * Improve ctor signature help. * Add tests. * Fix decl path printing for extension children. * Allow goto definition to show core module source. * c++ compile fix. --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Diffstat (limited to 'source/slang/slang-ast-print.cpp')
-rw-r--r--source/slang/slang-ast-print.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/slang/slang-ast-print.cpp b/source/slang/slang-ast-print.cpp
index 4b5a69f15..ee747a4c2 100644
--- a/source/slang/slang-ast-print.cpp
+++ b/source/slang/slang-ast-print.cpp
@@ -1129,6 +1129,7 @@ void ASTPrinter::addVal(Val* val)
/* static */ void ASTPrinter::appendDeclName(Decl* decl, StringBuilder& out)
{
+ decl = maybeGetInner(decl);
if (as<ConstructorDecl>(decl))
{
out << "init";
@@ -1231,8 +1232,7 @@ void ASTPrinter::_addDeclPathRec(const DeclRef<Decl>& declRef, Index depth)
}
else if (auto extensionDeclRef = parentDeclRef.as<ExtensionDecl>())
{
- ExtensionDecl* extensionDecl = as<ExtensionDecl>(parentDeclRef.getDecl());
- Type* type = extensionDecl->targetType.type;
+ Type* type = getTargetType(m_astBuilder, extensionDeclRef);
if (m_optionFlags & OptionFlag::NoSpecializedExtensionTypeName)
{
if (auto unspecializedDeclRef = isDeclRefTypeOf<Decl>(type))
@@ -1522,6 +1522,8 @@ void ASTPrinter::addDeclKindPrefix(Decl* decl)
continue;
if (as<HLSLLayoutSemantic>(modifier))
continue;
+ if (as<ImplicitConversionModifier>(modifier))
+ continue;
}
// Don't print out attributes.
if (as<AttributeBase>(modifier))