Commit Graph

23 Commits

Author SHA1 Message Date
Anthony Van de Gejuchte 85fbf86d7b Keep master in sync with harmony
* Do not mangle when no mangle is required
 * Improve use_asm reset while printing code
2016-06-20 18:42:17 +02:00
Shrey Banga e645ba84cf Respect quote style in object literals
The option added in fbbaa42ee5 wasn't
being respected inside object literals, so quoted property names would
still be stripped out with this option.

This is mostly a corner-case, but useful when the output is passed to
something like the Closure compiler, where quoted property names can be
used to prevent mangling.
2016-06-19 21:13:31 +02:00
Anthony Van de Gejuchte 6c99816855 Normalize error messages 2016-06-19 21:08:34 +02:00
Anthony Van de Gejuchte 2149bfb707 Don't mix strings with directives in output
* Don't interpret strings with escaped content as directive
 * Don't interpret strings after empty statement as directive
 * Adapt output to prevent strings being represent as directive
 * Introduce UGLIFY_DEBUG to allow internal testing like EXPECT_DIRECTIVE
2016-06-19 20:59:17 +02:00
Anthony Van de Gejuchte 5c4cfaa0a7 Re-add parens after new expression in beautify mode 2016-06-12 20:03:48 +02:00
Anthony Van de Gejuchte bb9c9707aa Don't allow with statements in strict mode 2016-06-12 19:08:16 +02:00
Anthony Van de Gejuchte 6c8e001fee Stop dropping args in new expressions 2016-06-12 17:17:17 +02:00
Richard van Velzen 9c53c7ada7 Fix octal string strict mode tests 2016-06-12 14:35:43 +02:00
Anthony Van de Gejuchte 4d7746baf3 Throw errors in strict mode for octal strings
Adds a directive tracker for the parser/tokenizer to
allow parsing depending on directive context.
2016-06-12 14:27:08 +02:00
Anthony Van de Gejuchte 8287ef6781 Fix uglify attempting to rewrite invalid new expressions 2016-06-08 19:45:21 +02:00
Anthony Van de Gejuchte 00ad57e393 Do not allow newlines in regex 2016-06-05 17:02:19 +02:00
kzc a0e03c9df4 Retain comments before AST_Constants during mangle. 2016-05-04 20:11:45 +02:00
kzc f39fd3d583 Handle CR line endings in comments.
Fixes #1050
2016-05-04 20:02:29 +02:00
kzc c55dd5ed74 Add passes compress option. Fix duplicate compress warnings. 2016-04-19 20:05:33 +02:00
kzc e4fa4b109a Parse comments without recursion to avoid RangeError.
Fixes #993
2016-04-16 02:02:47 -04:00
kzc 21befe583f Attempt to increase timeout for mocha let test. 2016-03-15 11:44:09 -04:00
kzc a9d4a6291b Do not produce let as a variable name in mangle.
Would previously occur in large generated functions with 21,000+ variables.
Fixes #986.
2016-03-15 11:20:32 -04:00
Anthony Van de Gejuchte 26641f3fb2 Allow operator names as getters/setters
Fixes #919

Fix provided by @kzc
2016-01-19 19:28:51 +01:00
Anthony Van de Gejuchte 70e5b6f15b Add some tests for comment-filters through api
Also never bother comment options to filter comment5/shebang comments
as they have their custom filter.
2016-01-19 19:14:19 +01:00
Anthony Van de Gejuchte 8439c8ba98 Make arguments test slightly more strict 2016-01-15 00:04:05 +01:00
Anthony Van de Gejuchte 5c4e470d43 Add scope test for arguments 2016-01-14 22:32:46 +01:00
Anthony Van de Gejuchte 88b77ddaa9 Add test case for line continuation 2016-01-13 00:34:56 +01:00
Anthony Van de Gejuchte 8c6af09ae0 Add mocha tests 2015-12-27 22:38:20 +01:00