UNPKG

decaffeinate-parser

Version:

A better AST for CoffeeScript, inspired by CoffeeScriptRedux.

9 lines (8 loc) 460 B
import { ArrayInitialiser } from '../nodes'; import getLocation from '../util/getLocation'; import mapAny from './mapAny'; export default function mapArr(context, node) { var _a = getLocation(context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw; var members = node.objects.map(function (object) { return mapAny(context, object); }); return new ArrayInitialiser(line, column, start, end, raw, members); }