diff options
Diffstat (limited to 'include/slang.h')
| -rw-r--r-- | include/slang.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/slang.h b/include/slang.h index 7462644a2..a32cbfd3b 100644 --- a/include/slang.h +++ b/include/slang.h @@ -4621,6 +4621,7 @@ struct SpecializationArg { Unknown, /**< An invalid specialization argument. */ Type, /**< Specialize to a type. */ + Expr, /**< An expression representing a type or value */ }; /** The kind of specialization argument. */ @@ -4629,6 +4630,8 @@ struct SpecializationArg { /** A type specialization argument, used for `Kind::Type`. */ TypeReflection* type; + /** An expression in Slang syntax, used for `Kind::Expr`. */ + const char* expr; }; static SpecializationArg fromType(TypeReflection* inType) @@ -4638,6 +4641,14 @@ struct SpecializationArg rs.type = inType; return rs; } + + static SpecializationArg fromExpr(const char* inExpr) + { + SpecializationArg rs; + rs.kind = Kind::Expr; + rs.expr = inExpr; + return rs; + } }; } // namespace slang |
