parse @global_defs as expressions (#2169)

- let parser rejects non-conformant input
- eliminate need for extraneous parenthesis
This commit is contained in:
Alex Lam S.L
2017-06-27 10:31:19 +08:00
committed by GitHub
parent 8b4dcd8f3e
commit 1e4de2e6d3
3 changed files with 25 additions and 7 deletions

View File

@@ -212,7 +212,7 @@ describe("minify", function() {
});
var err = result.error;
assert.ok(err instanceof Error);
assert.strictEqual(err.stack.split(/\n/)[0], "Error: Can't handle expression: debugger");
assert.strictEqual(err.stack.split(/\n/)[0], "SyntaxError: Unexpected token: keyword (debugger)");
});
it("should skip inherited properties", function() {
var foo = Object.create({ skip: this });