fix #1003 by removing AST_ObjectSymbol and using AST_ObjectKeyVal for the same effect

This commit is contained in:
Fábio Santos
2016-03-12 15:53:57 +00:00
committed by Richard van Velzen
parent accca2445f
commit 6d2f77c180
6 changed files with 32 additions and 48 deletions

View File

@@ -1514,14 +1514,16 @@ function parse($TEXT, options) {
}));
} else if (!is("punc", ":")) {
// It's one of those object destructurings, the value is its own name
a.push(new AST_ObjectSymbol({
a.push(new AST_ObjectKeyVal({
start: start,
end: start,
symbol: new AST_SymbolRef({
key: name,
value: new AST_SymbolRef({
start: start,
end: start,
name: name
})
}),
shorthand: true,
}));
} else {
expect(":");