mirror of
https://github.com/kmc7468/cs420.git
synced 2025-12-16 07:28:52 +00:00
Update skeleton
This commit is contained in:
@@ -88,11 +88,20 @@ impl IsEquiv for Initializer {
|
||||
fn is_equiv(&self, other: &Self) -> bool {
|
||||
match (self, other) {
|
||||
(Self::Expression(expr), Self::Expression(other_expr)) => expr.is_equiv(other_expr),
|
||||
(Self::List(items), Self::List(other_items)) => items.is_equiv(other_items),
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl IsEquiv for InitializerListItem {
|
||||
fn is_equiv(&self, other: &Self) -> bool {
|
||||
self.designation.is_empty()
|
||||
&& other.designation.is_empty()
|
||||
&& self.initializer.is_equiv(&other.initializer)
|
||||
}
|
||||
}
|
||||
|
||||
impl IsEquiv for Declarator {
|
||||
fn is_equiv(&self, other: &Self) -> bool {
|
||||
self.kind.is_equiv(&other.kind) && self.derived.is_equiv(&other.derived)
|
||||
|
||||
Reference in New Issue
Block a user