deprecate low level API (#1877)

fixes #1872
This commit is contained in:
Alex Lam S.L
2017-05-08 03:24:42 +08:00
committed by GitHub
parent e54748365c
commit 4f8ca4626e
23 changed files with 51 additions and 59 deletions

View File

@@ -89,7 +89,7 @@ if (program.mangleProps) {
if (typeof program.mangleProps != "object") program.mangleProps = {};
if (!Array.isArray(program.mangleProps.reserved)) program.mangleProps.reserved = [];
require("../tools/domprops").forEach(function(name) {
UglifyJS.push_uniq(program.mangleProps.reserved, name);
UglifyJS._push_uniq(program.mangleProps.reserved, name);
});
}
if (typeof options.mangle != "object") options.mangle = {};
@@ -187,7 +187,7 @@ function run() {
}
var result = UglifyJS.minify(files, options);
} catch (ex) {
if (ex instanceof UglifyJS.JS_Parse_Error) {
if (ex.name == "SyntaxError") {
console.error("Parse error at " + ex.filename + ":" + ex.line + "," + ex.col);
var col = ex.col;
var lines = files[ex.filename].split(/\r?\n/);