Merge branch 'main' into redsun82/codegen-rename-dbscheme

This commit is contained in:
Paolo Tranquilli
2025-03-28 15:06:08 +01:00
202 changed files with 7716 additions and 5409 deletions

View File

@@ -1,2 +1,2 @@
mod.rs 4bcb9def847469aae9d8649461546b7c21ec97cf6e63d3cf394e339915ce65d7 4bcb9def847469aae9d8649461546b7c21ec97cf6e63d3cf394e339915ce65d7
top.rs 4e8e5b1e16bb2f4b157b987c86c7b5cdb1d48a4586eafd08a92dcb989c94820e 4e8e5b1e16bb2f4b157b987c86c7b5cdb1d48a4586eafd08a92dcb989c94820e
top.rs 49e4f3abb137d6eed5a7c5202b3a31c9cafa1f565ee63dd5960e971950fafaa1 49e4f3abb137d6eed5a7c5202b3a31c9cafa1f565ee63dd5960e971950fafaa1

View File

@@ -3275,6 +3275,42 @@ impl From<trap::Label<UseTreeList>> for trap::Label<Element> {
}
}
#[derive(Debug)]
pub struct VariantDef {
_unused: ()
}
impl trap::TrapClass for VariantDef {
fn class_name() -> &'static str { "VariantDef" }
}
impl From<trap::Label<VariantDef>> for trap::Label<AstNode> {
fn from(value: trap::Label<VariantDef>) -> Self {
// SAFETY: this is safe because in the dbscheme VariantDef is a subclass of AstNode
unsafe {
Self::from_untyped(value.as_untyped())
}
}
}
impl From<trap::Label<VariantDef>> for trap::Label<Locatable> {
fn from(value: trap::Label<VariantDef>) -> Self {
// SAFETY: this is safe because in the dbscheme VariantDef is a subclass of Locatable
unsafe {
Self::from_untyped(value.as_untyped())
}
}
}
impl From<trap::Label<VariantDef>> for trap::Label<Element> {
fn from(value: trap::Label<VariantDef>) -> Self {
// SAFETY: this is safe because in the dbscheme VariantDef is a subclass of Element
unsafe {
Self::from_untyped(value.as_untyped())
}
}
}
#[derive(Debug)]
pub struct VariantList {
pub id: trap::TrapId<VariantList>,
@@ -8588,9 +8624,9 @@ impl trap::TrapClass for Variant {
fn class_name() -> &'static str { "Variant" }
}
impl From<trap::Label<Variant>> for trap::Label<Addressable> {
impl From<trap::Label<Variant>> for trap::Label<VariantDef> {
fn from(value: trap::Label<Variant>) -> Self {
// SAFETY: this is safe because in the dbscheme Variant is a subclass of Addressable
// SAFETY: this is safe because in the dbscheme Variant is a subclass of VariantDef
unsafe {
Self::from_untyped(value.as_untyped())
}
@@ -8624,6 +8660,15 @@ impl From<trap::Label<Variant>> for trap::Label<Element> {
}
}
impl From<trap::Label<Variant>> for trap::Label<Addressable> {
fn from(value: trap::Label<Variant>) -> Self {
// SAFETY: this is safe because in the dbscheme Variant is a subclass of Addressable
unsafe {
Self::from_untyped(value.as_untyped())
}
}
}
#[derive(Debug)]
pub struct WildcardPat {
pub id: trap::TrapId<WildcardPat>,
@@ -10540,6 +10585,15 @@ impl From<trap::Label<Struct>> for trap::Label<Addressable> {
}
}
impl From<trap::Label<Struct>> for trap::Label<VariantDef> {
fn from(value: trap::Label<Struct>) -> Self {
// SAFETY: this is safe because in the dbscheme Struct is a subclass of VariantDef
unsafe {
Self::from_untyped(value.as_untyped())
}
}
}
#[derive(Debug)]
pub struct StructExpr {
pub id: trap::TrapId<StructExpr>,
@@ -11209,6 +11263,15 @@ impl From<trap::Label<Union>> for trap::Label<Addressable> {
}
}
impl From<trap::Label<Union>> for trap::Label<VariantDef> {
fn from(value: trap::Label<Union>) -> Self {
// SAFETY: this is safe because in the dbscheme Union is a subclass of VariantDef
unsafe {
Self::from_untyped(value.as_untyped())
}
}
}
#[derive(Debug)]
pub struct Use {
pub id: trap::TrapId<Use>,