aboutsummaryrefslogtreecommitdiff
path: root/tools/eliminator/node_modules/uglify-js/lib/parse-js.js
diff options
context:
space:
mode:
authorJez Ng <me@jezng.com>2013-06-26 01:15:35 -0700
committerJez Ng <me@jezng.com>2013-06-26 01:15:35 -0700
commit566447048806a59eb6e102fc364191ce292d7045 (patch)
treedb472534dc0d8bf4c560348afd849f3563ef0253 /tools/eliminator/node_modules/uglify-js/lib/parse-js.js
parent0c19e4051e497c9bd61459617768b9e3eaad5a44 (diff)
Move line numbers to the AST node itself.
This allows us to use strict comparisons on the node type.
Diffstat (limited to 'tools/eliminator/node_modules/uglify-js/lib/parse-js.js')
-rw-r--r--tools/eliminator/node_modules/uglify-js/lib/parse-js.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/tools/eliminator/node_modules/uglify-js/lib/parse-js.js b/tools/eliminator/node_modules/uglify-js/lib/parse-js.js
index 2dc2ef70..c7c2025f 100644
--- a/tools/eliminator/node_modules/uglify-js/lib/parse-js.js
+++ b/tools/eliminator/node_modules/uglify-js/lib/parse-js.js
@@ -786,15 +786,12 @@ function parse($TEXT, exigent_mode, embed_tokens) {
return ex;
};
- function add_tokens(str, start, end) {
- return str instanceof NodeWithToken ? str : new NodeWithToken(str, start, end);
- };
-
function maybe_embed_tokens(parser) {
if (embed_tokens) return function() {
var start = S.token;
var ast = parser.apply(this, arguments);
- ast[0] = add_tokens(ast[0], start, prev());
+ ast.start = start;
+ ast.end = prev;
return ast;
};
else return parser;