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.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/source/slang/syntax.h b/source/slang/syntax.h
index eb7cee40a..aa3944d0a 100644
--- a/source/slang/syntax.h
+++ b/source/slang/syntax.h
@@ -1104,6 +1104,32 @@ namespace Slang
typedef Dictionary<unsigned int, RefPtr<RefObject>> AttributeArgumentValueDict;
+ /// Collects information about existential type parameters and their arguments.
+ struct ExistentialTypeSlots
+ {
+ /// For each type parameter, holds the interface/existential type that constrains it.
+ List<RefPtr<Type>> paramTypes;
+
+ /// An argument for an existential type parameter.
+ ///
+ /// Comprises a concrete type and a witness for its conformance to the desired
+ /// interface/existential type for the corresponding parameter.
+ ///
+ struct Arg
+ {
+ RefPtr<Type> type;
+ RefPtr<Val> witness;
+ };
+
+ /// Any arguments provided for the existential type parameters.
+ ///
+ /// It is possible for `args` to be empty even if `paramTypes` is non-empty;
+ /// that situation represents an unspecialized program or entry point.
+ ///
+ List<Arg> args;
+ };
+
+
// Generate class definition for all syntax classes
#define SYNTAX_FIELD(TYPE, NAME) TYPE NAME;
#define FIELD(TYPE, NAME) TYPE NAME;