summaryrefslogtreecommitdiff
path: root/source/slang/syntax.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/syntax.h')
-rw-r--r--source/slang/syntax.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/slang/syntax.h b/source/slang/syntax.h
index bd7de74ad..9b0277b56 100644
--- a/source/slang/syntax.h
+++ b/source/slang/syntax.h
@@ -1223,14 +1223,24 @@ namespace Slang
return declRef.Substitute(declRef.getDecl()->initExpr);
}
+ inline RefPtr<Type> getType(DeclRef<EnumCaseDecl> const& declRef)
+ {
+ return declRef.Substitute(declRef.getDecl()->type.Ptr());
+ }
+
+ inline RefPtr<Expr> getTagExpr(DeclRef<EnumCaseDecl> const& declRef)
+ {
+ return declRef.Substitute(declRef.getDecl()->tagExpr);
+ }
+
inline RefPtr<Type> GetTargetType(DeclRef<ExtensionDecl> const& declRef)
{
return declRef.Substitute(declRef.getDecl()->targetType.Ptr());
}
- inline FilteredMemberRefList<StructField> GetFields(DeclRef<StructDecl> const& declRef)
+ inline FilteredMemberRefList<VarDecl> GetFields(DeclRef<StructDecl> const& declRef)
{
- return getMembersOfType<StructField>(declRef);
+ return getMembersOfType<VarDecl>(declRef);
}
inline RefPtr<Type> getBaseType(DeclRef<InheritanceDecl> const& declRef)