diff options
| author | YONGH\yongh <yonghe@outlook.com> | 2017-10-30 21:18:20 -0400 |
|---|---|---|
| committer | YONGH\yongh <yonghe@outlook.com> | 2017-10-30 21:18:20 -0400 |
| commit | 84f381cc180b3176d6a58da4085ee8470f246922 (patch) | |
| tree | 4c20475c42b33a1e719237c573106eaeb5698322 /source/slang/type-defs.h | |
| parent | 91ac1555d7838961c3b5c41d5af39c7a881f59eb (diff) | |
work in-progress, add parsing for assoc type decls and member type expressions
Diffstat (limited to 'source/slang/type-defs.h')
| -rw-r--r-- | source/slang/type-defs.h | 23 |
1 files changed, 23 insertions, 0 deletions
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<AssocTypeDecl>, declRef) + RAW( + AssocTypeDeclRefType() + {} + AssocTypeDeclRefType( + DeclRef<AssocTypeDecl> declRef) + : declRef(declRef) + {} + + + DeclRef<AssocTypeDecl> 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 |
