You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The API distinguishes between syntactic and semantic types. Syntactic types, like arrays, can have constant expressions as their index. In Marker these are called ConstExpr and are equivalent to rustc's AnonConst.
Semantic types and generic arguments can also contain constant values, which are the semantic equivalent to ConstExpr. Rustc uses rustc_middle::ty::consts::Const with a lot of fun nested variants. In the API I've now added a ConstValue struct as a placeholder, to add a proper representation later.
The text was updated successfully, but these errors were encountered:
xFrednet
changed the title
API: Add a representation for constant values
API: Add a representation for constant values (for semantic nodes)
Jul 24, 2023
The API distinguishes between syntactic and semantic types. Syntactic types, like arrays, can have constant expressions as their index. In Marker these are called
ConstExpr
and are equivalent to rustc'sAnonConst
.Semantic types and generic arguments can also contain constant values, which are the semantic equivalent to
ConstExpr
. Rustc usesrustc_middle::ty::consts::Const
with a lot of fun nested variants. In the API I've now added aConstValue
struct as a placeholder, to add a proper representation later.The text was updated successfully, but these errors were encountered: