enhance `reduce_vars` (#1814)
authorAlex Lam S.L <alexlamsl@gmail.com>
Sun, 16 Apr 2017 17:36:50 +0000 (01:36 +0800)
committerGitHub <noreply@github.com>
Sun, 16 Apr 2017 17:36:50 +0000 (01:36 +0800)
commit1a498db2d3e520d1711144c423312c62a2673115
tree2389bfa17ba49a9d140c0ba71bcd2be29b8b4dd8
parent44dfa5a318d6df8eff4741a351f24667708a9cab
enhance `reduce_vars` (#1814)

- allow immediate assignment after declaration of variable
- relax modification rule for immutable value
- fix order of visit for TreeWalker
- remove extraneous code
lib/ast.js
lib/compress.js
test/compress/reduce_vars.js