From 84f381cc180b3176d6a58da4085ee8470f246922 Mon Sep 17 00:00:00 2001 From: "YONGH\\yongh" Date: Mon, 30 Oct 2017 21:18:20 -0400 Subject: work in-progress, add parsing for assoc type decls and member type expressions --- source/slang/syntax.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'source/slang/syntax.cpp') 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 ""; + } + + bool AssocTypeDeclRefType::EqualsImpl(Type * type) + { + if (auto assocTypeDeclRefType = type->As()) + { + return declRef.Equals(assocTypeDeclRefType->declRef); + } + return false; + } + + int AssocTypeDeclRefType::GetHashCode() + { + return declRef.GetHashCode(); + } + + Type* AssocTypeDeclRefType::CreateCanonicalType() + { + return this; + } + // ArithmeticExpressionType // VectorExpressionType -- cgit v1.2.3