fix #1003 by removing AST_ObjectSymbol and using AST_ObjectKeyVal for the same effect
This commit is contained in:
committed by
Richard van Velzen
parent
accca2445f
commit
6d2f77c180
@@ -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(":");
|
||||
|
||||
Reference in New Issue
Block a user