All files / parser/nodes arrayNode.js

75% Statements 3/4
100% Branches 0/0
50% Functions 1/2
75% Lines 3/4
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31                                  18x     18x     18x              
import Node from './node';
 
/**
 * Matches an array literal.
 * 
 * This matches an array literal.
 */
export default class ArrayNode extends Node {
    
    /**
     * Creates a wrapper for arrays
     * 
     * @param {array} array the literal array value of the literal
     * @param {number} type The literal type as from a TokenType
     * @param {Object} position - a position from nearley
     */
    constructor (array: array, type: number, position: Object) {
        super(position);
        
        /** @type {array} */
        this.array = array;
        
        /** @type {VSLTokenType} */
        this.type = type;
    }
    
    /** @override */
    get children() {
        return null;
    }
}