summaryrefslogtreecommitdiff
path: root/source/slang/slang-ast-type.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-ast-type.cpp')
-rw-r--r--source/slang/slang-ast-type.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/source/slang/slang-ast-type.cpp b/source/slang/slang-ast-type.cpp
index 5ee0c5c70..43fe751ee 100644
--- a/source/slang/slang-ast-type.cpp
+++ b/source/slang/slang-ast-type.cpp
@@ -557,6 +557,27 @@ HashCode NamedExpressionType::_getHashCodeOverride()
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! FuncType !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ParameterDirection FuncType::getParamDirection(Index index)
+{
+ auto paramType = getParamType(index);
+ if (as<RefType>(paramType))
+ {
+ return kParameterDirection_Ref;
+ }
+ else if (as<InOutType>(paramType))
+ {
+ return kParameterDirection_InOut;
+ }
+ else if (as<OutType>(paramType))
+ {
+ return kParameterDirection_Out;
+ }
+ else
+ {
+ return kParameterDirection_In;
+ }
+}
+
void FuncType::_toTextOverride(StringBuilder& out)
{
out << toSlice("(");