Enum boa::syntax::ast::node::declaration::BindingPatternTypeArray
source · [−]pub enum BindingPatternTypeArray {
Empty,
Elision,
SingleName {
ident: Box<str>,
default_init: Option<Node>,
},
BindingPattern {
pattern: DeclarationPattern,
},
SingleNameRest {
ident: Box<str>,
},
BindingPatternRest {
pattern: DeclarationPattern,
},
}
Expand description
BindingPatternTypeArray represents the different types of bindings that an array binding pattern may contain.
More information:
Variants
Empty
Empty represents an empty array binding pattern e.g. [ ]
.
This may occur because the Elision
and BindingRestElement
in the first type of
array binding pattern are both optional.
More information:
Elision
Elision represents the elision of an item in the array binding pattern.
An Elision
may occur at multiple points in the pattern and may be multiple elisions.
This variant strictly represents one elision. If there are multiple, this should be used multiple times.
More information:
SingleName
SingleName represents a SingleNameBinding
with an identifier and an optional default initializer.
More information:
BindingPattern
Fields
pattern: DeclarationPattern
BindingPattern represents a BindingPattern
in a BindingElement
of an array binding pattern.
The pattern and the optional default initializer are both stored in the DeclarationPattern.
More information:
SingleNameRest
SingleNameRest represents a BindingIdentifier
in a BindingRestElement
of an array binding pattern.
More information:
BindingPatternRest
Fields
pattern: DeclarationPattern
SingleNameRest represents a BindingPattern
in a BindingRestElement
of an array binding pattern.
More information:
Trait Implementations
sourceimpl Clone for BindingPatternTypeArray
impl Clone for BindingPatternTypeArray
sourcefn clone(&self) -> BindingPatternTypeArray
fn clone(&self) -> BindingPatternTypeArray
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more