From 89083c4b50af8e48e70b25b63cc62aca21ab706c Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 10 Aug 2022 01:58:41 -0700 Subject: Language server pointer type support + add `DLLImport` test (#2350) * Language server pointer type support. + Natvis for AST. * Add completion suggestion for GUID. * Make executable test able to use slang-rt. * Fix gcc argument for rpath. * Fix DLLImport on linux. * Fix windows. * Fix. Co-authored-by: Yong He --- source/compiler-core/slang-gcc-compiler-util.cpp | 7 + source/core/slang-platform.cpp | 19 +- source/core/slang-shared-library.cpp | 2 +- source/slang-rt/slang-rt.cpp | 6 +- source/slang/slang-ast-iterator.h | 5 + source/slang/slang-ir-dll-import.cpp | 2 +- source/slang/slang-language-server-ast-lookup.cpp | 12 + source/slang/slang-language-server-completion.cpp | 35 +++ source/slang/slang-language-server-completion.h | 1 + source/slang/slang-lookup.cpp | 41 +-- source/slang/slang-parser.cpp | 30 +-- source/slang/slang.natvis | 307 ++++++++++++++++++++-- 12 files changed, 400 insertions(+), 67 deletions(-) (limited to 'source') diff --git a/source/compiler-core/slang-gcc-compiler-util.cpp b/source/compiler-core/slang-gcc-compiler-util.cpp index aee3b1bcc..2c1380cde 100644 --- a/source/compiler-core/slang-gcc-compiler-util.cpp +++ b/source/compiler-core/slang-gcc-compiler-util.cpp @@ -564,6 +564,7 @@ static SlangResult _parseGCCFamilyLine(const UnownedStringSlice& line, LineParse } case SLANG_HOST_EXECUTABLE: { + cmdLine.addArg("-rdynamic"); break; } case SLANG_OBJECT_CODE: @@ -623,6 +624,12 @@ static SlangResult _parseGCCFamilyLine(const UnownedStringSlice& line, LineParse } // Add the library paths + + if (options.libraryPaths.getCount() && options.targetType == SLANG_HOST_EXECUTABLE) + { + cmdLine.addArg("-Wl,-rpath,$ORIGIN"); + } + StringSlicePool libPathPool(StringSlicePool::Style::Default); for (const auto& libPath : options.libraryPaths) diff --git a/source/core/slang-platform.cpp b/source/core/slang-platform.cpp index 5185d5d23..921c85612 100644 --- a/source/core/slang-platform.cpp +++ b/source/core/slang-platform.cpp @@ -43,7 +43,7 @@ namespace Slang Path::combineIntoBuilder(parent.getUnownedSlice(), platformFileNameBuilder.getUnownedSlice(), outPath); } - else + else if (filename.getLength() > 0) { appendPlatformFileName(filename.getUnownedSlice(), outPath); } @@ -107,6 +107,13 @@ SLANG_COMPILE_TIME_ASSERT(E_OUTOFMEMORY == SLANG_E_OUT_OF_MEMORY); /* static */SlangResult SharedLibrary::loadWithPlatformPath(char const* platformFileName, SharedLibrary::Handle& handleOut) { handleOut = nullptr; + if (!platformFileName || strlen(platformFileName) == 0) + { + if (!GetModuleHandleExA(0, nullptr, (HMODULE*)&handleOut)) + return SLANG_FAIL; + return SLANG_OK; + } + // https://docs.microsoft.com/en-us/windows/desktop/api/libloaderapi/nf-libloaderapi-loadlibrarya const HMODULE h = LoadLibraryA(platformFileName); if (!h) @@ -170,10 +177,11 @@ SLANG_COMPILE_TIME_ASSERT(E_OUTOFMEMORY == SLANG_E_OUT_OF_MEMORY); /* static */SlangResult SharedLibrary::loadWithPlatformPath(char const* platformFileName, Handle& handleOut) { handleOut = nullptr; - - void* h = dlopen(platformFileName, RTLD_NOW | RTLD_GLOBAL); - if(!h) - { + if (strlen(platformFileName) == 0) + platformFileName = nullptr; + void *h = dlopen(platformFileName, RTLD_NOW | RTLD_GLOBAL); + if (!h) + { #if 0 // We can't output the error message here, because it will cause output when testing what code gen is available if(auto msg = dlerror()) @@ -195,7 +203,6 @@ SLANG_COMPILE_TIME_ASSERT(E_OUTOFMEMORY == SLANG_E_OUT_OF_MEMORY); /* static */void* SharedLibrary::findSymbolAddressByName(Handle handle, char const* name) { - SLANG_ASSERT(handle); return dlsym((void*)handle, name); } diff --git a/source/core/slang-shared-library.cpp b/source/core/slang-shared-library.cpp index f31c7d689..6ce10ad9e 100644 --- a/source/core/slang-shared-library.cpp +++ b/source/core/slang-shared-library.cpp @@ -33,7 +33,7 @@ SlangResult DefaultSharedLibraryLoader::loadSharedLibrary(const char* path, ISla { *outSharedLibrary = nullptr; // Try loading - SharedLibrary::Handle handle; + SharedLibrary::Handle handle = nullptr; SLANG_RETURN_ON_FAIL(SharedLibrary::load(path, handle)); *outSharedLibrary = ComPtr(new DefaultSharedLibrary(handle)).detach(); return SLANG_OK; diff --git a/source/slang-rt/slang-rt.cpp b/source/slang-rt/slang-rt.cpp index 163a1b99c..94699dfa0 100644 --- a/source/slang-rt/slang-rt.cpp +++ b/source/slang-rt/slang-rt.cpp @@ -25,7 +25,7 @@ extern "C" ComPtr lib; if (!slangRT_loadedLibraries.TryGetValue(modulePath, lib)) { - if (DefaultSharedLibraryLoader::getSingleton()->loadSharedLibrary( + if (DefaultSharedLibraryLoader::getSingleton()->loadPlatformSharedLibrary( modulePath.getBuffer(), lib.writeRef()) != SLANG_OK) { _slang_rt_abort("Failed to load DLL \"" + modulePath + "\""); @@ -38,6 +38,10 @@ extern "C" SLANG_RT_API void* SLANG_MCALL _slang_rt_load_dll_func(void* moduleHandle, Slang::String funcName) { + if (moduleHandle == nullptr) + { + moduleHandle = _slang_rt_load_dll(""); + } auto lib = static_cast(moduleHandle); auto funcPtr = lib->findFuncByName(funcName.getBuffer()); if (!funcPtr) diff --git a/source/slang/slang-ast-iterator.h b/source/slang/slang-ast-iterator.h index 417f93d0d..d439420a9 100644 --- a/source/slang/slang-ast-iterator.h +++ b/source/slang/slang-ast-iterator.h @@ -230,6 +230,11 @@ struct ASTIterator iterator->maybeDispatchCallback(expr); dispatchIfNotNull(expr->base.exp); } + void visitPointerTypeExpr(PointerTypeExpr* expr) + { + iterator->maybeDispatchCallback(expr); + dispatchIfNotNull(expr->base.exp); + } }; struct ASTIteratorStmtVisitor : public StmtVisitor diff --git a/source/slang/slang-ir-dll-import.cpp b/source/slang/slang-ir-dll-import.cpp index 43ed9a102..01e1241ff 100644 --- a/source/slang/slang-ir-dll-import.cpp +++ b/source/slang/slang-ir-dll-import.cpp @@ -127,7 +127,7 @@ struct DllImportContext if (dllImportDecoration->getLibraryName() == "") { - modulePtr = builder.getIntValue(builder.getIntType(), 0); + modulePtr = builder.getPtrValue(nullptr); } else { diff --git a/source/slang/slang-language-server-ast-lookup.cpp b/source/slang/slang-language-server-ast-lookup.cpp index 6792a18e7..3de335c33 100644 --- a/source/slang/slang-language-server-ast-lookup.cpp +++ b/source/slang/slang-language-server-ast-lookup.cpp @@ -371,6 +371,18 @@ public: return true; return dispatchIfNotNull(expr->right.exp); } + bool visitPointerTypeExpr(PointerTypeExpr* expr) + { + if (_isLocInRange(context, expr->loc, 0)) + { + ASTLookupResult result; + result.path = context->nodePath; + result.path.add(expr); + context->results.add(result); + return true; + } + return dispatchIfNotNull(expr->base.exp); + } bool visitModifiedTypeExpr(ModifiedTypeExpr* expr) { return dispatchIfNotNull(expr->base.exp); } bool visitTryExpr(TryExpr* expr) { return dispatchIfNotNull(expr->base); } diff --git a/source/slang/slang-language-server-completion.cpp b/source/slang/slang-language-server-completion.cpp index 93b10b816..21586089a 100644 --- a/source/slang/slang-language-server-completion.cpp +++ b/source/slang/slang-language-server-completion.cpp @@ -644,6 +644,37 @@ List CompletionContext::createSwizzleCan return result; } +LanguageServerProtocol::CompletionItem CompletionContext::generateGUIDCompletionItem() +{ + StringBuilder sb; + sb << "COM(\""; + auto docHash = doc->getURI().getHashCode() ^ doc->getText().getHashCode(); + int sectionLengths[] = { 8,4,4,4,12 }; + srand((unsigned int)std::chrono::high_resolution_clock::now().time_since_epoch().count()); + auto hashStr = String(docHash, 16); + sectionLengths[0] -= (int)hashStr.getLength(); + sb << hashStr; + for (int j = 0; j < SLANG_COUNT_OF(sectionLengths); j++) + { + auto len = sectionLengths[j]; + if (j != 0) + sb << "-"; + for (int i = 0; i < len; i++) + { + auto digit = rand() % 16; + if (digit < 10) + sb << digit; + else + sb.appendChar((char)('A' + digit - 10)); + } + } + sb << "\")"; + LanguageServerProtocol::CompletionItem resultItem; + resultItem.kind = LanguageServerProtocol::kCompletionItemKindKeyword; + resultItem.label = sb.ProduceString(); + return resultItem; +} + List CompletionContext::collectAttributes() { List result; @@ -672,6 +703,10 @@ List CompletionContext::collectAttribute } } } + + // Add a suggestion for `[COM]` attribute with generated GUID. + auto guidItem = generateGUIDCompletionItem(); + result.add(guidItem); return result; } diff --git a/source/slang/slang-language-server-completion.h b/source/slang/slang-language-server-completion.h index 45082e0d3..5a09ba371 100644 --- a/source/slang/slang-language-server-completion.h +++ b/source/slang/slang-language-server-completion.h @@ -40,6 +40,7 @@ struct CompletionContext List createSwizzleCandidates( Type* baseType, IntegerLiteralValue elementCount[2]); List collectAttributes(); + LanguageServerProtocol::CompletionItem generateGUIDCompletionItem(); List gatherFileAndModuleCompletionItems( const String& prefixPath, bool translateModuleName, diff --git a/source/slang/slang-lookup.cpp b/source/slang/slang-lookup.cpp index 85924ab30..48f7ea099 100644 --- a/source/slang/slang-lookup.cpp +++ b/source/slang/slang-lookup.cpp @@ -267,6 +267,26 @@ static void _lookUpDirectAndTransparentMembers( } } +LookupRequest initLookupRequest( + SemanticsVisitor* semantics, + Name* name, + LookupMask mask, + LookupOptions options, + Scope* scope) +{ + LookupRequest request; + request.semantics = semantics; + request.mask = mask; + request.options = options; + request.scope = scope; + + if (semantics && semantics->getSession() && + name == semantics->getSession()->getCompletionRequestTokenName()) + request.options = (LookupOptions)((int)request.options | (int)LookupOptions::Completion); + + return request; +} + /// Perform "direct" lookup in a container declaration LookupResult lookUpDirectAndTransparentMembers( ASTBuilder* astBuilder, @@ -275,9 +295,7 @@ LookupResult lookUpDirectAndTransparentMembers( DeclRef containerDeclRef, LookupMask mask) { - LookupRequest request; - request.semantics = semantics; - request.mask = mask; + LookupRequest request = initLookupRequest(semantics, name, mask, LookupOptions::None, nullptr); LookupResult result; _lookUpDirectAndTransparentMembers( astBuilder, @@ -984,13 +1002,7 @@ LookupResult lookUp( Scope* scope, LookupMask mask) { - LookupRequest request; - request.semantics = semantics; - request.scope = scope; - request.mask = mask; - if (semantics && semantics->getSession() && - name == semantics->getSession()->getCompletionRequestTokenName()) - request.options = (LookupOptions)((int)request.options | (int)LookupOptions::Completion); + LookupRequest request = initLookupRequest(semantics, name, mask, LookupOptions::None, scope); LookupResult result; _lookUpInScopes(astBuilder, name, request, result); return result; @@ -1004,14 +1016,7 @@ LookupResult lookUpMember( LookupMask mask, LookupOptions options) { - LookupRequest request; - request.semantics = semantics; - request.mask = mask; - request.options = options; - if (semantics && semantics->getSession() && - name == semantics->getSession()->getCompletionRequestTokenName()) - request.options = (LookupOptions)((int)request.options | (int)LookupOptions::Completion); - + LookupRequest request = initLookupRequest(semantics, name, mask, options, nullptr); LookupResult result; _lookUpMembersInType(astBuilder, name, type, request, result, nullptr); return result; diff --git a/source/slang/slang-parser.cpp b/source/slang/slang-parser.cpp index cdf418d3d..17794a4b5 100644 --- a/source/slang/slang-parser.cpp +++ b/source/slang/slang-parser.cpp @@ -4336,26 +4336,9 @@ namespace Slang // isn't a keyword should we fall back to the approach // here. // + bool prevHasSeenCompletionToken = hasSeenCompletionToken; Expr* type = ParseType(); - if (type && hasSeenCompletionToken) - { - // If we encountered a completion token, just return the parsed expr - // as an ExprStmt. - for (auto tokenPos = startPos.tokenReaderCursor; - tokenPos && tokenPos < tokenReader.getCursor().tokenReaderCursor; - ++tokenPos) - { - if (tokenPos && tokenPos->type == TokenType::CompletionRequest) - { - auto exprStmt = astBuilder->create(); - exprStmt->loc = type->loc; - exprStmt->expression = type; - return exprStmt; - } - } - } - // We don't actually care about the type, though, so // don't retain it // @@ -4385,15 +4368,17 @@ namespace Slang // general kinds of declarators (notably pointer declarators), // so we'll need to be careful about this. // - // If the lookahead token is `*`, then we have to decide - // whether to parse a pointer declarator or a multiply - // expression. In this context it makes sense to disambiguate + // If the line being parsed token is `Something* ...`, then the `*` + // is already consumed by `ParseType` above and the current logic + // will continue to parse as var declaration instead of a mul expr. + // In this context it makes sense to disambiguate // in favor of a pointer over a multiply, since a multiply // expression can't appear at the start of a statement // with any side effects. // // - if (LookAheadToken(TokenType::Identifier) || LookAheadToken(TokenType::OpMul)) + if (!hasSeenCompletionToken && (LookAheadToken(TokenType::Identifier) || + LookAheadToken(TokenType::CompletionRequest))) { // Reset the cursor and try to parse a declaration now. // Note: the declaration will consume any modifiers @@ -4404,6 +4389,7 @@ namespace Slang } // Fallback: reset and parse an expression + hasSeenCompletionToken = prevHasSeenCompletionToken; tokenReader.setCursor(startPos); statement = ParseExpressionStatement(); } diff --git a/source/slang/slang.natvis b/source/slang/slang.natvis index 3e742ffb5..d56fa885d 100644 --- a/source/slang/slang.natvis +++ b/source/slang/slang.natvis @@ -15,12 +15,15 @@ {(*(*(Slang::DeclRefBase*)this).decl).nameAndLoc} decl ? ($T1*)(decl) : ($T1*)0 - "=========================" - - substitutions.substitutions.pointer - outer.pointer - this - + + + + substitutions.substitutions + outer + this + + + @@ -29,18 +32,15 @@ {(*(*(Slang::DeclRefBase*)this).decl).nameAndLoc} decl - "=========================" - - substitutions.genericSubstitutions.pointer - outer.pointer - this - - - substitutions.globalGenParamSubstitutions.pointer - outer.pointer - this - - substitutions.thisTypeSubstitution + + + + substitutions.substitutions + outer + this + + + @@ -188,4 +188,275 @@ usedValue + + + {astNodeType} + + (Slang::DeclRefExpr*)&astNodeType + (Slang::VarExpr*)&astNodeType + (Slang::MemberExpr*)&astNodeType + (Slang::StaticMemberExpr*)&astNodeType + (Slang::OverloadedExpr*)&astNodeType + (Slang::OverloadedExpr2*)&astNodeType + (Slang::LiteralExpr*)&astNodeType + (Slang::IntegerLiteralExpr*)&astNodeType + (Slang::FloatingPointLiteralExpr*)&astNodeType + (Slang::BoolLiteralExpr*)&astNodeType + (Slang::NullPtrLiteralExpr*)&astNodeType + (Slang::StringLiteralExpr*)&astNodeType + (Slang::InitializerListExpr*)&astNodeType + (Slang::ExprWithArgsBase*)&astNodeType + (Slang::AggTypeCtorExpr*)&astNodeType + (Slang::AppExprBase*)&astNodeType + (Slang::InvokeExpr*)&astNodeType + (Slang::NewExpr*)&astNodeType + (Slang::OperatorExpr*)&astNodeType + (Slang::InfixExpr*)&astNodeType + (Slang::PrefixExpr*)&astNodeType + (Slang::PostfixExpr*)&astNodeType + (Slang::SelectExpr*)&astNodeType + (Slang::TypeCastExpr*)&astNodeType + (Slang::ExplicitCastExpr*)&astNodeType + (Slang::ImplicitCastExpr*)&astNodeType + (Slang::GenericAppExpr*)&astNodeType + (Slang::TryExpr*)&astNodeType + (Slang::IndexExpr*)&astNodeType + (Slang::MatrixSwizzleExpr*)&astNodeType + (Slang::SwizzleExpr*)&astNodeType + (Slang::DerefExpr*)&astNodeType + (Slang::CastToSuperTypeExpr*)&astNodeType + (Slang::ModifierCastExpr*)&astNodeType + (Slang::SharedTypeExpr*)&astNodeType + (Slang::AssignExpr*)&astNodeType + (Slang::ParenExpr*)&astNodeType + (Slang::ThisExpr*)&astNodeType + (Slang::LetExpr*)&astNodeType + (Slang::ExtractExistentialValueExpr*)&astNodeType + (Slang::OpenRefExpr*)&astNodeType + (Slang::JVPDifferentiateExpr*)&astNodeType + (Slang::TaggedUnionTypeExpr*)&astNodeType + (Slang::ThisTypeExpr*)&astNodeType + (Slang::AndTypeExpr*)&astNodeType + (Slang::ModifiedTypeExpr*)&astNodeType + (Slang::PointerTypeExpr*)&astNodeType + (Slang::Expr*)this,nd + + + + {astNodeType} + + (Slang::ScopeStmt*)&astNodeType + (Slang::BlockStmt*)&astNodeType + (Slang::BreakableStmt*)&astNodeType + (Slang::SwitchStmt*)&astNodeType + (Slang::LoopStmt*)&astNodeType + (Slang::ForStmt*)&astNodeType + (Slang::UnscopedForStmt*)&astNodeType + (Slang::WhileStmt*)&astNodeType + (Slang::DoWhileStmt*)&astNodeType + (Slang::GpuForeachStmt*)&astNodeType + (Slang::CompileTimeForStmt*)&astNodeType + (Slang::SeqStmt*)&astNodeType + (Slang::UnparsedStmt*)&astNodeType + (Slang::EmptyStmt*)&astNodeType + (Slang::DiscardStmt*)&astNodeType + (Slang::DeclStmt*)&astNodeType + (Slang::IfStmt*)&astNodeType + (Slang::ChildStmt*)&astNodeType + (Slang::CaseStmtBase*)&astNodeType + (Slang::CaseStmt*)&astNodeType + (Slang::DefaultStmt*)&astNodeType + (Slang::JumpStmt*)&astNodeType + (Slang::BreakStmt*)&astNodeType + (Slang::ContinueStmt*)&astNodeType + (Slang::ReturnStmt*)&astNodeType + (Slang::ExpressionStmt*)&astNodeType + (Slang::Stmt*)this,nd + + + + {text} + + + {nameAndLoc.name->text}: {astNodeType} + {astNodeType} + + (Slang::ContainerDecl*)&astNodeType + (Slang::ExtensionDecl*)&astNodeType + (Slang::StructDecl*)&astNodeType + (Slang::ClassDecl*)&astNodeType + (Slang::EnumDecl*)&astNodeType + (Slang::InterfaceDecl*)&astNodeType + (Slang::AssocTypeDecl*)&astNodeType + (Slang::GlobalGenericParamDecl*)&astNodeType + (Slang::ScopeDecl*)&astNodeType + (Slang::ConstructorDecl*)&astNodeType + (Slang::GetterDecl*)&astNodeType + (Slang::SetterDecl*)&astNodeType + (Slang::RefAccessorDecl*)&astNodeType + (Slang::FuncDecl*)&astNodeType + (Slang::SubscriptDecl*)&astNodeType + (Slang::PropertyDecl*)&astNodeType + (Slang::NamespaceDecl*)&astNodeType + (Slang::ModuleDecl*)&astNodeType + (Slang::GenericDecl*)&astNodeType + (Slang::AttributeDecl*)&astNodeType + (Slang::VarDeclBase*)&astNodeType + (Slang::VarDecl*)&astNodeType + (Slang::LetDecl*)&astNodeType + (Slang::GlobalGenericValueParamDecl*)&astNodeType + (Slang::ParamDecl*)&astNodeType + (Slang::ModernParamDecl*)&astNodeType + (Slang::GenericValueParamDecl*)&astNodeType + (Slang::EnumCaseDecl*)&astNodeType + (Slang::TypeConstraintDecl*)&astNodeType + (Slang::InheritanceDecl*)&astNodeType + (Slang::GenericTypeConstraintDecl*)&astNodeType + (Slang::SimpleTypeDecl*)&astNodeType + (Slang::TypeDefDecl*)&astNodeType + (Slang::TypeAliasDecl*)&astNodeType + (Slang::GenericTypeParamDecl*)&astNodeType + (Slang::UsingDecl*)&astNodeType + (Slang::ImportDecl*)&astNodeType + (Slang::EmptyDecl*)&astNodeType + (Slang::SyntaxDecl*)&astNodeType + (Slang::DeclGroup*)&astNodeType + (Slang::DeclBase*)this,nd + + + + + {astNodeType} + + (Slang::ContainerDecl*)&astNodeType + (Slang::ExtensionDecl*)&astNodeType + (Slang::StructDecl*)&astNodeType + (Slang::ClassDecl*)&astNodeType + (Slang::EnumDecl*)&astNodeType + (Slang::InterfaceDecl*)&astNodeType + (Slang::AssocTypeDecl*)&astNodeType + (Slang::GlobalGenericParamDecl*)&astNodeType + (Slang::ScopeDecl*)&astNodeType + (Slang::ConstructorDecl*)&astNodeType + (Slang::GetterDecl*)&astNodeType + (Slang::SetterDecl*)&astNodeType + (Slang::RefAccessorDecl*)&astNodeType + (Slang::FuncDecl*)&astNodeType + (Slang::SubscriptDecl*)&astNodeType + (Slang::PropertyDecl*)&astNodeType + (Slang::NamespaceDecl*)&astNodeType + (Slang::ModuleDecl*)&astNodeType + (Slang::GenericDecl*)&astNodeType + (Slang::AttributeDecl*)&astNodeType + (Slang::VarDeclBase*)&astNodeType + (Slang::VarDecl*)&astNodeType + (Slang::LetDecl*)&astNodeType + (Slang::GlobalGenericValueParamDecl*)&astNodeType + (Slang::ParamDecl*)&astNodeType + (Slang::ModernParamDecl*)&astNodeType + (Slang::GenericValueParamDecl*)&astNodeType + (Slang::EnumCaseDecl*)&astNodeType + (Slang::TypeConstraintDecl*)&astNodeType + (Slang::InheritanceDecl*)&astNodeType + (Slang::GenericTypeConstraintDecl*)&astNodeType + (Slang::SimpleTypeDecl*)&astNodeType + (Slang::TypeDefDecl*)&astNodeType + (Slang::TypeAliasDecl*)&astNodeType + (Slang::GenericTypeParamDecl*)&astNodeType + (Slang::UsingDecl*)&astNodeType + (Slang::ImportDecl*)&astNodeType + (Slang::EmptyDecl*)&astNodeType + (Slang::SyntaxDecl*)&astNodeType + (Slang::DeclGroup*)&astNodeType + (Slang::DeclBase*)this,nd + + + + + {astNodeType} + + (Slang::OverloadGroupType*)&astNodeType + (Slang::InitializerListType*)&astNodeType + (Slang::ErrorType*)&astNodeType + (Slang::BottomType*)&astNodeType + (Slang::DeclRefType*)&astNodeType + (Slang::ArithmeticExpressionType*)&astNodeType + (Slang::BasicExpressionType*)&astNodeType + (Slang::VectorExpressionType*)&astNodeType + (Slang::MatrixExpressionType*)&astNodeType + (Slang::BuiltinType*)&astNodeType + (Slang::FeedbackType*)&astNodeType + (Slang::ResourceType*)&astNodeType + (Slang::TextureTypeBase*)&astNodeType + (Slang::TextureType*)&astNodeType + (Slang::TextureSamplerType*)&astNodeType + (Slang::GLSLImageType*)&astNodeType + (Slang::SamplerStateType*)&astNodeType + (Slang::BuiltinGenericType*)&astNodeType + (Slang::PointerLikeType*)&astNodeType + (Slang::ParameterGroupType*)&astNodeType + (Slang::UniformParameterGroupType*)&astNodeType + (Slang::ConstantBufferType*)&astNodeType + (Slang::TextureBufferType*)&astNodeType + (Slang::GLSLShaderStorageBufferType*)&astNodeType + (Slang::ParameterBlockType*)&astNodeType + (Slang::VaryingParameterGroupType*)&astNodeType + (Slang::GLSLInputParameterGroupType*)&astNodeType + (Slang::GLSLOutputParameterGroupType*)&astNodeType + (Slang::HLSLStructuredBufferTypeBase*)&astNodeType + (Slang::HLSLStructuredBufferType*)&astNodeType + (Slang::HLSLRWStructuredBufferType*)&astNodeType + (Slang::HLSLRasterizerOrderedStructuredBufferType*)&astNodeType + (Slang::HLSLAppendStructuredBufferType*)&astNodeType + (Slang::HLSLConsumeStructuredBufferType*)&astNodeType + (Slang::HLSLStreamOutputType*)&astNodeType + (Slang::HLSLPointStreamType*)&astNodeType + (Slang::HLSLLineStreamType*)&astNodeType + (Slang::HLSLTriangleStreamType*)&astNodeType + (Slang::UntypedBufferResourceType*)&astNodeType + (Slang::HLSLByteAddressBufferType*)&astNodeType + (Slang::HLSLRWByteAddressBufferType*)&astNodeType + (Slang::HLSLRasterizerOrderedByteAddressBufferType*)&astNodeType + (Slang::RaytracingAccelerationStructureType*)&astNodeType + (Slang::HLSLPatchType*)&astNodeType + (Slang::HLSLInputPatchType*)&astNodeType + (Slang::HLSLOutputPatchType*)&astNodeType + (Slang::GLSLInputAttachmentType*)&astNodeType + (Slang::StringTypeBase*)&astNodeType + (Slang::StringType*)&astNodeType + (Slang::NativeStringType*)&astNodeType + (Slang::DynamicType*)&astNodeType + (Slang::EnumTypeType*)&astNodeType + (Slang::PtrTypeBase*)&astNodeType + (Slang::PtrType*)&astNodeType + (Slang::ParamDirectionType*)&astNodeType + (Slang::OutTypeBase*)&astNodeType + (Slang::OutType*)&astNodeType + (Slang::InOutType*)&astNodeType + (Slang::RefType*)&astNodeType + (Slang::NullPtrType*)&astNodeType + (Slang::ArrayExpressionType*)&astNodeType + (Slang::TypeType*)&astNodeType + (Slang::NamedExpressionType*)&astNodeType + (Slang::FuncType*)&astNodeType + (Slang::GenericDeclRefType*)&astNodeType + (Slang::NamespaceType*)&astNodeType + (Slang::ExtractExistentialType*)&astNodeType + (Slang::TaggedUnionType*)&astNodeType + (Slang::ExistentialSpecializedType*)&astNodeType + (Slang::ThisType*)&astNodeType + (Slang::AndType*)&astNodeType + (Slang::ModifiedType*)&astNodeType + (Slang::Type*)this,nd + + + + + {nameAndLoc.name}: {astNodeType} + + nameAndLoc.name + parentDecl + members + + \ No newline at end of file -- cgit v1.2.3