diff options
| author | Yong He <yonghe@outlook.com> | 2023-04-27 18:32:20 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-27 18:32:20 -0700 |
| commit | 53793612e3a2f1cadc4f7cbf703bcd94b7121414 (patch) | |
| tree | b995fb1e7b91817439f6f51f2489362b8b027a81 /source/slang/slang-ast-print.cpp | |
| parent | 60d829091cc97eef4fd36211afe8a83ad282c4de (diff) | |
Embed stdlib documentation to AST. (#2851)
* Embed stdlib documentation to AST.
* Extract documentation for attributes.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-ast-print.cpp')
| -rw-r--r-- | source/slang/slang-ast-print.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/slang/slang-ast-print.cpp b/source/slang/slang-ast-print.cpp index 23430cd13..da35a2818 100644 --- a/source/slang/slang-ast-print.cpp +++ b/source/slang/slang-ast-print.cpp @@ -366,6 +366,8 @@ void ASTPrinter::addDeclKindPrefix(Decl* decl) continue; if (as<SpecializedForTargetModifier>(modifier)) continue; + if (as<AttributeTargetModifier>(modifier)) + continue; } // Don't print out attributes. if (as<AttributeBase>(modifier)) @@ -430,6 +432,10 @@ void ASTPrinter::addDeclKindPrefix(Decl* decl) { m_builder << "associatedtype "; } + else if (const auto attribute = as<AttributeDecl>(decl)) + { + m_builder << "attribute "; + } } void ASTPrinter::addDeclResultType(const DeclRef<Decl>& inDeclRef) |
