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/type-defs.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'source/slang/type-defs.h') diff --git a/source/slang/type-defs.h b/source/slang/type-defs.h index 2010d07b4..7648e0b87 100644 --- a/source/slang/type-defs.h +++ b/source/slang/type-defs.h @@ -491,3 +491,26 @@ protected: virtual Type* CreateCanonicalType() override; ) END_SYNTAX_CLASS() + +// The "type" of an expression that references a asscoiated type decl (via 'assoctype' keyword). +SYNTAX_CLASS(AssocTypeDeclRefType, Type) + DECL_FIELD(DeclRef, declRef) + RAW( + AssocTypeDeclRefType() + {} + AssocTypeDeclRefType( + DeclRef declRef) + : declRef(declRef) + {} + + + DeclRef const& GetDeclRef() const { return declRef; } + + virtual String ToString() override; + + protected: + virtual bool EqualsImpl(Type * type) override; + virtual int GetHashCode() override; + virtual Type* CreateCanonicalType() override; + ) +END_SYNTAX_CLASS() \ No newline at end of file -- cgit v1.2.3