@ -6,7 +6,6 @@ use crate::syntax::ast::node::{
statement_list ::StatementList ,
Identifier , Node ,
} ;
use boa_gc ::{ Finalize , Trace } ;
use boa_interner ::{ Interner , Sym , ToInternedString } ;
#[ cfg(feature = " deser " ) ]
@ -34,7 +33,7 @@ pub use self::{
mod tests ;
#[ cfg_attr(feature = " deser " , derive(Serialize, Deserialize)) ]
#[ derive(Clone, Debug, Trace, Finalize, PartialEq) ]
#[ derive(Clone, Debug, PartialEq) ]
pub enum DeclarationList {
/// The `const` statements are block-scoped, much like variables defined using the `let`
/// keyword.
@ -154,7 +153,7 @@ impl From<Declaration> for Box<[Declaration]> {
/// [spec2]: https://tc39.es/ecma262/#prod-VariableDeclaration
/// [spec3]: https://tc39.es/ecma262/#sec-declarations-and-the-variable-statement
#[ cfg_attr(feature = " deser " , derive(Serialize, Deserialize)) ]
#[ derive(Clone, Debug, Trace, Finalize, PartialEq) ]
#[ derive(Clone, Debug, PartialEq) ]
pub enum Declaration {
Identifier {
ident : Identifier ,
@ -241,7 +240,7 @@ impl Declaration {
///
/// [spec1]: https://tc39.es/ecma262/#prod-BindingPattern
#[ cfg_attr(feature = " deser " , derive(Serialize, Deserialize)) ]
#[ derive(Clone, Debug, Trace, Finalize, PartialEq) ]
#[ derive(Clone, Debug, PartialEq) ]
pub enum DeclarationPattern {
Object ( DeclarationPatternObject ) ,
Array ( DeclarationPatternArray ) ,
@ -395,7 +394,7 @@ impl DeclarationPattern {
///
/// [spec1]: https://tc39.es/ecma262/#prod-ObjectBindingPattern
#[ cfg_attr(feature = " deser " , derive(Serialize, Deserialize)) ]
#[ derive(Clone, Debug, Trace, Finalize, PartialEq) ]
#[ derive(Clone, Debug, PartialEq) ]
pub struct DeclarationPatternObject {
bindings : Vec < BindingPatternTypeObject > ,
init : Option < Node > ,
@ -494,7 +493,7 @@ impl DeclarationPatternObject {
///
/// [spec1]: https://tc39.es/ecma262/#prod-ArrayBindingPattern
#[ cfg_attr(feature = " deser " , derive(Serialize, Deserialize)) ]
#[ derive(Clone, Debug, Trace, Finalize, PartialEq) ]
#[ derive(Clone, Debug, PartialEq) ]
pub struct DeclarationPatternArray {
bindings : Vec < BindingPatternTypeArray > ,
init : Option < Node > ,
@ -588,7 +587,7 @@ impl DeclarationPatternArray {
///
/// [spec1]: https://tc39.es/ecma262/#prod-ObjectBindingPattern
#[ cfg_attr(feature = " deser " , derive(Serialize, Deserialize)) ]
#[ derive(Clone, Debug, Trace, Finalize, PartialEq) ]
#[ derive(Clone, Debug, PartialEq) ]
pub enum BindingPatternTypeObject {
/// Empty represents an empty object binding pattern e.g. `{ }`.
Empty ,
@ -732,7 +731,7 @@ impl ToInternedString for BindingPatternTypeObject {
///
/// [spec1]: https://tc39.es/ecma262/#prod-ArrayBindingPattern
#[ cfg_attr(feature = " deser " , derive(Serialize, Deserialize)) ]
#[ derive(Clone, Debug, Trace, Finalize, PartialEq) ]
#[ derive(Clone, Debug, PartialEq) ]
pub enum BindingPatternTypeArray {
/// Empty represents an empty array binding pattern e.g. `[ ]`.
///