support operations directly on SimValue, UIntValue, and SIntValue, and shared references to those
This commit is contained in:
parent
2a65aa2bd5
commit
9e803223d0
42 changed files with 6076 additions and 1486 deletions
|
|
@ -1024,16 +1024,26 @@ impl ToTokens for ParsedEnum {
|
|||
<::fayalite::int::Bool as ::fayalite::ty::StaticType>::TYPE_PROPERTIES;
|
||||
}
|
||||
#[automatically_derived]
|
||||
impl #static_impl_generics ::fayalite::sim::value::ToSimValue
|
||||
impl #static_impl_generics ::fayalite::expr::ValueType
|
||||
for #sim_value_ident #static_type_generics
|
||||
#static_where_clause
|
||||
{
|
||||
type Type = #target #static_type_generics;
|
||||
type ValueCategory = ::fayalite::expr::value_category::ValueCategorySimValue;
|
||||
|
||||
fn ty(&self) -> <Self as ::fayalite::expr::ValueType>::Type {
|
||||
::fayalite::ty::StaticType::TYPE
|
||||
}
|
||||
}
|
||||
#[automatically_derived]
|
||||
impl #static_impl_generics ::fayalite::sim::value::ToSimValue
|
||||
for #sim_value_ident #static_type_generics
|
||||
#static_where_clause
|
||||
{
|
||||
fn to_sim_value(
|
||||
&self,
|
||||
) -> ::fayalite::sim::value::SimValue<
|
||||
<Self as ::fayalite::sim::value::ToSimValue>::Type,
|
||||
<Self as ::fayalite::expr::ValueType>::Type,
|
||||
> {
|
||||
::fayalite::sim::value::SimValue::from_value(
|
||||
::fayalite::ty::StaticType::TYPE,
|
||||
|
|
@ -1043,7 +1053,7 @@ impl ToTokens for ParsedEnum {
|
|||
fn into_sim_value(
|
||||
self,
|
||||
) -> ::fayalite::sim::value::SimValue<
|
||||
<Self as ::fayalite::sim::value::ToSimValue>::Type,
|
||||
<Self as ::fayalite::expr::ValueType>::Type,
|
||||
> {
|
||||
::fayalite::sim::value::SimValue::from_value(
|
||||
::fayalite::ty::StaticType::TYPE,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue