extend `hoist_props` (#3073)
authorAlex Lam S.L <alexlamsl@gmail.com>
Tue, 10 Apr 2018 18:48:15 +0000 (02:48 +0800)
committerGitHub <noreply@github.com>
Tue, 10 Apr 2018 18:48:15 +0000 (02:48 +0800)
commit4dd7d0e39baacdd3bf7dc87fc547df66e327f206
tree1854302f42b89b6b71b3e69a01470d1369462e61
parent90199d0a961bb75cc5bf6d8ade8bf5b0098cb341
extend `hoist_props` (#3073)

- handle `AST_Assign` the same way as `AST_VarDef`
- inject `AST_Var` as succeeding statement

fixes #3071
lib/compress.js
test/compress/hoist_props.js