/**
* Copyright (c) 2012-2016 André Bargull
* Alle Rechte vorbehalten / All Rights Reserved. Use is subject to license terms.
*
* <https://github.com/anba/es6draft>
*/
package com.github.anba.es6draft.ast;
import java.util.List;
/**
* <h1>13 ECMAScript Language: Statements and Declarations</h1><br>
* <h2>13.3 Declarations and the Variable Statement</h2>
* <ul>
* <li>13.3.3 Destructuring Binding Patterns
* </ul>
*/
public final class ArrayBindingPattern extends BindingPattern {
private final List<BindingElementItem> elements;
public ArrayBindingPattern(long beginPosition, long endPosition,
List<BindingElementItem> elements) {
super(beginPosition, endPosition);
this.elements = elements;
}
/**
* Returns the binding elements of this array binding pattern.
*
* @return the binding elements
*/
public List<BindingElementItem> getElements() {
return elements;
}
@Override
public <R, V> R accept(NodeVisitor<R, V> visitor, V value) {
return visitor.visit(this, value);
}
@Override
public <V> int accept(IntNodeVisitor<V> visitor, V value) {
return visitor.visit(this, value);
}
@Override
public <V> void accept(VoidNodeVisitor<V> visitor, V value) {
visitor.visit(this, value);
}
}