Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 2 additions & 22 deletions crates/oxc_ast/src/ast_impl/js.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::{
fmt::{self, Display},
};

use oxc_allocator::{Box, Vec};
use oxc_allocator::Box;
use oxc_span::{Atom, Span};
use oxc_syntax::{operator::UnaryOperator, scope::ScopeFlags};

Expand Down Expand Up @@ -853,27 +853,7 @@ impl<'a> SimpleAssignmentTarget<'a> {
}
}

impl<'a> ArrayAssignmentTarget<'a> {
/// Creates a new array assignment target (like `[a, b]` in the code `[a, b] = [1, 2]`)
/// using the given elements.
pub fn new_with_elements(
span: Span,
elements: Vec<'a, Option<AssignmentTargetMaybeDefault<'a>>>,
) -> Self {
Self { span, elements, rest: None }
}
}

impl<'a> ObjectAssignmentTarget<'a> {
/// Creates a new object assignment target (like `{a, b}` in the code `({a, b} = obj)`) using
/// the given properties.
pub fn new_with_properties(
span: Span,
properties: Vec<'a, AssignmentTargetProperty<'a>>,
) -> Self {
Self { span, properties, rest: None }
}

impl ObjectAssignmentTarget<'_> {
/// Returns `true` if this object assignment target is empty.
///
/// ## Example
Expand Down
Loading