Alex Lam S.L
4733159782
fix corner cases with await ( #4350 )
...
fixes #4349
2020-12-08 11:26:03 +08:00
Alex Lam S.L
9eb65f3af3
extend trailing comma support ( #4334 )
2020-12-07 10:07:34 +08:00
Alex Lam S.L
2cbbf5c375
support async function ( #4333 )
2020-12-07 05:22:40 +08:00
Alex Lam S.L
1e4985ed9e
support spread syntax ( #4328 )
2020-12-06 05:19:31 +08:00
Alex Lam S.L
e5f80afc53
support destructured literals ( #4278 )
2020-11-17 08:01:24 +08:00
Alex Lam S.L
91fc1c82b5
support computed property name in object literal ( #4268 )
2020-11-08 23:38:32 +08:00
Alex Lam S.L
1cbd07e789
support shorthand method name in object literal ( #4264 )
2020-11-08 13:17:53 +08:00
Alex Lam S.L
b82de04775
support shorthand property name in object literal ( #4263 )
2020-11-08 10:44:44 +08:00
Alex Lam S.L
4bbeb09f7c
fix corner case in reduce_vars ( #4262 )
...
fixes #4261
2020-11-07 10:00:04 +08:00
Alex Lam S.L
8ecaa40c6e
extend support for Unicode ( #4228 )
2020-10-19 09:34:17 +08:00
Alex Lam S.L
96bf7fceab
support let ( #4227 )
2020-10-19 08:32:39 +08:00
Alex Lam S.L
55451e7b78
support const ( #4190 )
2020-10-12 01:18:57 +08:00
Alex Lam S.L
8f0521d51d
retrofit try-catch-finally as block-scoped ( #4178 )
...
- support optional catch binding
2020-10-05 05:30:14 +08:00
Alex Lam S.L
58ac5b9bd5
extend support for numeral literals ( #4176 )
2020-10-05 00:05:03 +08:00
Alex Lam S.L
7de8daa4b1
minor clean up ( #4149 )
2020-09-23 23:06:12 +08:00
Alex Lam S.L
fa13ed4391
reject multiple defaults in switch ( #4053 )
...
fixes #4050
2020-08-17 10:09:12 +08:00
Alex Lam S.L
6bf1486935
update links to repository after rename ( #3847 )
2020-05-05 21:07:33 +08:00
Alex Lam S.L
b39228892d
fix line accounting in multi-line strings ( #3752 )
...
fixes #3748
2020-03-21 07:17:41 +08:00
Alex Lam S.L
22b47cdd63
improve unicode handling ( #3648 )
2019-12-28 18:06:51 +00:00
Alex Lam S.L
ab050e7a94
fix corner case in directives ( #3645 )
2019-12-25 00:55:39 +00:00
Alex Lam S.L
1283d73853
fix corner case in parsing directives ( #3615 )
2019-11-29 18:57:29 +08:00
Alex Lam S.L
0f4cfa877a
fix corner case in comments ( #3550 )
2019-10-30 03:49:39 +08:00
Alex Lam S.L
9199ab5846
minor tweaks ( #3502 )
2019-10-20 15:19:19 +08:00
Alex Lam S.L
2ea96549c5
unify logging functionality ( #3392 )
...
fixes #3253
fixes #3254
2019-04-30 06:32:24 +08:00
Alex Lam S.L
21cd7e3f57
reduce test exports ( #3361 )
2019-04-17 16:19:08 +08:00
Alex Lam S.L
5172ba5f2a
introduce functions ( #3360 )
...
`var f = function() {};` => `function f() {}`
2019-04-15 22:23:11 +08:00
Alex Lam S.L
d90777b724
parse mangle.properties.regex in --config-file properly ( #3337 )
...
fixes #3315
2019-03-15 00:20:20 +08:00
Alex Lam S.L
9e19e63551
general clean-ups ( #3175 )
2018-06-06 17:50:56 +08:00
Alex Lam S.L
81603ecd15
improve performance through makePredicate() ( #3048 )
2018-04-03 15:15:01 +08:00
Alex Lam S.L
49bfc6b555
improve performance ( #3020 )
...
- replace `find_if()` with `all()` wherever possible
- move ESTree-specific logic out of `figure_out_scope()`
2018-03-23 03:43:52 +08:00
Alex Lam S.L
082e004b87
compress undefined property names ( #2811 )
...
- enforce property names as string
- handle `void 0` as `undefined` in `hoist_props` & `reduce_vars`
2018-01-19 00:36:30 +08:00
Alex Lam S.L
b4aef753e7
general improvements around AST_ForIn ( #2796 )
...
- compress using `collapse_vars`
- remove unused `name`
- simplify `loop_body`
2018-01-16 17:03:12 +08:00
Alex Lam S.L
a6873a3859
forbid block-scoped AST_Defun in strict mode ( #2718 )
2018-01-04 18:45:51 +08:00
Alex Lam S.L
446fb0198b
extend __PURE__ to AST_New ( #2706 )
...
fixes #2705
2018-01-03 04:48:07 +08:00
Alex Lam S.L
0fe259e9c5
parse LF & comment correctly ( #2653 )
...
fixes #2652
2017-12-26 01:38:01 +08:00
Alex Lam S.L
efffb81735
fix comments output & improve /*@__PURE__*/
...
- fix whitespace around comments
- fix comment parsing around parentheses
- consider parentheses when parsing `/*@__PURE__*/`
- remove all `/*@__PURE__*/` on output
fixes #2638
2017-12-24 12:38:45 +08:00
Alex Lam S.L
edb4e3bd52
make comments output more robust ( #2633 )
...
- improve handling of comments right after `return`
- retain comments after `OutputStream`
- preserve trailing comments
- fix handling of new line before comments
- handle comments around parentheses
fixes #88
fixes #112
fixes #218
fixes #372
fixes #2629
2017-12-22 04:59:54 +08:00
Alex Lam S.L
93f3b2b114
escape consecutive unpaired surrogates ( #2576 )
...
fixes #2569
2017-12-11 01:15:44 +08:00
Alex Lam S.L
2dcc552ce0
trap invalid use of reserved words ( #2338 )
...
fixes #2337
2017-10-01 02:10:41 +08:00
Alex Lam S.L
0692435f01
fix for-in loop parsing ( #2144 )
2017-06-23 04:14:30 +08:00
Alex Lam S.L
1743621889
clean up lib/parse.js ( #2047 )
...
- remove unused definitions
- replace `array_to_hash()`
2017-06-03 14:00:59 +08:00
Alex Lam S.L
c6c9f4f5a8
implement --help options ( #2017 )
2017-05-28 18:21:44 +08:00
Alex Lam S.L
569c21e952
improve RegExp handling ( #1959 )
...
- remove `options.output.unescape_regexps`
- preserve original pattern whenever possible
fixes #54
fixes #1929
2017-05-17 20:10:50 +08:00
Alex Lam S.L
9464d3c20f
fix parsing of property access after new line ( #1944 )
...
Account for comments when detecting property access in `tokenizer`.
fixes #1943
2017-05-16 05:40:49 +08:00
Alex Lam S.L
265008c948
improve keyword-related parser errors ( #1941 )
...
fixes #1937
2017-05-15 23:02:55 +08:00
Alex Lam S.L
e005099fb1
fix & improve coverage of estree ( #1935 )
...
- fix `estree` conversion of getter/setter
- fix non-directive literal in `to_mozilla_ast()`
- revamp `test/mozilla-ast.js`
- reuse `test/ufuzz.js` for code generation
- use `acorn.parse()` for creating `estree`
- extend `test/ufuzz.js` for `acorn` workaround
- catch variable redefinition
- non-trivial literal as directive
- adjust options for tolerance
Miscellaneous
- optional semi-colon when parsing directives
fixes #1914
closes #1915
2017-05-15 02:37:53 +08:00
Alex Lam S.L
3ca902258c
fix bugs with getter/setter ( #1926 )
...
- `reduce_vars`
- `side_effects`
- property access for object
- `AST_SymbolAccessor` as key names
enhance `test/ufuzz.js`
- add object getter & setter
- property assignment to setter
- avoid infinite recursion in setter
- fix & adjust assignment operators
- 50% `=`
- 25% `+=`
- 2.5% each for the rest
- avoid "Invalid array length"
- fix `console.log()`
- bypass getter
- curb recursive reference
- deprecate `-E`, always report runtime errors
2017-05-14 02:10:34 +08:00
Alex Lam S.L
c391576d52
remove support for const ( #1910 )
...
As this is not part of ES5.
2017-05-12 14:57:41 +08:00
Alex Lam S.L
9bf72cf758
improve parser under "use strict" ( #1836 )
...
- `const` without value
- `delete` of expression
- redefining `arguments` or `eval`
extend `test/ufuzz.js`
- optionally generate "use strict"
- improve handling of test cases with syntax errors
- group IIFE generation
- generate bare anonymous functions
- workaround `console.log()` for `new function()`
- generate expressions with `this`
fixes #1810
2017-04-23 20:05:22 +08:00
Alex Lam S.L
b4b9305db0
fix parser bugs & CLI reporting ( #1827 )
...
fixes #1825
2017-04-19 04:27:13 +08:00