diff options
Diffstat (limited to 'source/slang/slang-syntax.cpp')
| -rw-r--r-- | source/slang/slang-syntax.cpp | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/source/slang/slang-syntax.cpp b/source/slang/slang-syntax.cpp index b9a5b8cd5..24ccfa4a4 100644 --- a/source/slang/slang-syntax.cpp +++ b/source/slang/slang-syntax.cpp @@ -1057,6 +1057,7 @@ Index getFilterCountImpl(const ReflectClassInfo& clsInfo, MemberFilterStyle filt FuncType* funcType = astBuilder->create<FuncType>(); funcType->resultType = getResultType(astBuilder, declRef); + funcType->errorType = getErrorCodeType(astBuilder, declRef); for (auto paramDeclRef : getParameters(declRef)) { auto paramDecl = paramDeclRef.getDecl(); @@ -1269,9 +1270,27 @@ char const* getGLSLNameForImageFormat(ImageFormat format) return kImageFormatInfos[Index(format)].name.begin(); } - const ImageFormatInfo& getImageFormatInfo(ImageFormat format) - { - return kImageFormatInfos[Index(format)]; - } + +const ImageFormatInfo& getImageFormatInfo(ImageFormat format) +{ + return kImageFormatInfos[Index(format)]; +} + +char const* getTryClauseTypeName(TryClauseType c) +{ + switch (c) + { + case TryClauseType::None: + return "None"; + case TryClauseType::Standard: + return "Standard"; + case TryClauseType::Optional: + return "Optional"; + case TryClauseType::Assert: + return "Assert"; + default: + return "Unknown"; + } +} } // namespace Slang |
