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.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/source/slang/slang-ast-type.cpp b/source/slang/slang-ast-type.cpp
index 23d89957a..29a52a93a 100644
--- a/source/slang/slang-ast-type.cpp
+++ b/source/slang/slang-ast-type.cpp
@@ -355,6 +355,29 @@ Type* AtomicType::getElementType()
return as<Type>(_getGenericTypeArg(this, 0));
}
+// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! CoopVectorExpressionType !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+Type* CoopVectorExpressionType::getElementType()
+{
+ return as<Type>(_getGenericTypeArg(this, 0));
+}
+
+IntVal* CoopVectorExpressionType::getElementCount()
+{
+ return as<IntVal>(_getGenericTypeArg(this, 1));
+}
+
+void CoopVectorExpressionType::_toTextOverride(StringBuilder& out)
+{
+ out << toSlice("CoopVector<") << getElementType() << toSlice(",") << getElementCount()
+ << toSlice(">");
+}
+
+BasicExpressionType* CoopVectorExpressionType::_getScalarTypeOverride()
+{
+ return as<BasicExpressionType>(getElementType());
+}
+
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! TypeType !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
void TypeType::_toTextOverride(StringBuilder& out)