Opened 11 years ago
Closed 11 years ago
#10965 closed defect (invalid)
ShrinkSafe fails on abstract
Reported by: | minobun | Owned by: | Richard Backhouse |
---|---|---|---|
Priority: | high | Milestone: | tbd |
Component: | ShrinkSafe | Version: | 1.4.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
I have an js file which should shrinked. Shrinksafe gives me an Parse error for this line. It seems that '.abstract' is that what ShrinkSafe? dont like.
Error:
$ java -jar shrinksafe.jar to_shrink.js > shrink.js Exception in thread "main" org.mozilla.javascript.EvaluatorException: missing name after . operator at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:109) at org.mozilla.javascript.DefaultErrorReporter.error(DefaultErrorReporter.java:96) at org.mozilla.javascript.Parser.addError(Parser.java:146) at org.mozilla.javascript.Parser.reportError(Parser.java:160) at org.mozilla.javascript.Parser.memberExprTail(Parser.java:2015) at org.mozilla.javascript.Parser.memberExpr(Parser.java:1953) at org.mozilla.javascript.Parser.unaryExpr(Parser.java:1808) at org.mozilla.javascript.Parser.mulExpr(Parser.java:1737) at org.mozilla.javascript.Parser.addExpr(Parser.java:1718) at org.mozilla.javascript.Parser.shiftExpr(Parser.java:1698) at org.mozilla.javascript.Parser.relExpr(Parser.java:1672) at org.mozilla.javascript.Parser.eqExpr(Parser.java:1628) at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:1617) at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:1606) at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:1595) at org.mozilla.javascript.Parser.andExpr(Parser.java:1583) at org.mozilla.javascript.Parser.orExpr(Parser.java:1571) at org.mozilla.javascript.Parser.condExpr(Parser.java:1554) at org.mozilla.javascript.Parser.assignExpr(Parser.java:1539) at org.mozilla.javascript.Parser.expr(Parser.java:1518) at org.mozilla.javascript.Parser.statementHelper(Parser.java:1201) at org.mozilla.javascript.Parser.statement(Parser.java:708) at org.mozilla.javascript.Parser.parse(Parser.java:401) at org.mozilla.javascript.Parser.parse(Parser.java:338) at org.dojotoolkit.shrinksafe.Compressor.compressScript(Compressor.java:987) at org.dojotoolkit.shrinksafe.Compressor.compressScript(Compressor.java:979) at org.dojotoolkit.shrinksafe.Main.processFiles(Main.java:201) at org.dojotoolkit.shrinksafe.Main$IProxy.run(Main.java:82) at org.mozilla.javascript.Context.call(Context.java:499) at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:511) at org.dojotoolkit.shrinksafe.Main.main(Main.java:106)
to_shrink.js:
abc.abstract = '';
Note: See
TracTickets for help on using
tickets.
'abstract' is an ecma future reserved word, and should be avoided in code, at the _very_ least in unquoted form, ideally all together.
https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Reserved_Words