extend collapse_vars to let and const (#2252)

fixes #2250
This commit is contained in:
Alex Lam S.L
2017-07-25 22:07:21 +08:00
committed by GitHub
parent 69861824b5
commit d3df2f985d
4 changed files with 71 additions and 2 deletions

View File

@@ -697,7 +697,7 @@ var AST_Export = DEFNODE("Export", "exported_definition exported_value is_defaul
var AST_VarDef = DEFNODE("VarDef", "name value", {
$documentation: "A variable declaration; only appears in a AST_Definitions node",
$propdoc: {
name: "[AST_SymbolVar|AST_SymbolConst|AST_Destructuring] name of the variable",
name: "[AST_Destructuring|AST_SymbolConst|AST_SymbolLet|AST_SymbolVar] name of the variable",
value: "[AST_Node?] initializer, or null of there's no initializer"
},
_walk: function(visitor) {