summaryrefslogtreecommitdiffstats
path: root/source/slang/syntax.cpp
diff options
context:
space:
mode:
authorYONGH\yongh <yonghe@outlook.com>2017-10-30 21:18:20 -0400
committerYONGH\yongh <yonghe@outlook.com>2017-10-30 21:18:20 -0400
commit84f381cc180b3176d6a58da4085ee8470f246922 (patch)
tree4c20475c42b33a1e719237c573106eaeb5698322 /source/slang/syntax.cpp
parent91ac1555d7838961c3b5c41d5af39c7a881f59eb (diff)
work in-progress, add parsing for assoc type decls and member type expressions
Diffstat (limited to 'source/slang/syntax.cpp')
-rw-r--r--source/slang/syntax.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/source/slang/syntax.cpp b/source/slang/syntax.cpp
index 6cf3fd7c9..165b2d132 100644
--- a/source/slang/syntax.cpp
+++ b/source/slang/syntax.cpp
@@ -940,6 +940,33 @@ void Type::accept(IValVisitor* visitor, void* extra)
return this;
}
+ // AssocTypeDeclRefType
+
+ String AssocTypeDeclRefType::ToString()
+ {
+ // TODO: what is appropriate here?
+ return "<AssocType>";
+ }
+
+ bool AssocTypeDeclRefType::EqualsImpl(Type * type)
+ {
+ if (auto assocTypeDeclRefType = type->As<AssocTypeDeclRefType>())
+ {
+ return declRef.Equals(assocTypeDeclRefType->declRef);
+ }
+ return false;
+ }
+
+ int AssocTypeDeclRefType::GetHashCode()
+ {
+ return declRef.GetHashCode();
+ }
+
+ Type* AssocTypeDeclRefType::CreateCanonicalType()
+ {
+ return this;
+ }
+
// ArithmeticExpressionType
// VectorExpressionType