UNPKG

decaffeinate-parser

Version:

A better AST for CoffeeScript, inspired by CoffeeScriptRedux.

12 lines (11 loc) 534 B
"use strict"; exports.__esModule = true; var nodes_1 = require("../nodes"); var getLocation_1 = require("../util/getLocation"); var mapAny_1 = require("./mapAny"); function mapThrow(context, node) { var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw; var expression = node.expression ? mapAny_1["default"](context, node.expression) : null; return new nodes_1.Throw(line, column, start, end, raw, expression); } exports["default"] = mapThrow;