decaffeinate-parser
Version:
A better AST for CoffeeScript, inspired by CoffeeScriptRedux.
9 lines (8 loc) • 432 B
JavaScript
import { Throw } from '../nodes';
import getLocation from '../util/getLocation';
import mapAny from './mapAny';
export default function mapThrow(context, node) {
var _a = getLocation(context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var expression = node.expression ? mapAny(context, node.expression) : null;
return new Throw(line, column, start, end, raw, expression);
}