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
21
lib/ast.js
21
lib/ast.js
@@ -395,9 +395,9 @@ var AST_ArrowParametersOrSeq = DEFNODE("ArrowParametersOrSeq", "expressions", {
|
||||
default: default_seen_above,
|
||||
names: ex.properties.map(to_fun_args)
|
||||
});
|
||||
} else if (ex instanceof AST_ObjectSymbol) {
|
||||
} else if (ex instanceof AST_ObjectKeyVal && ex.shorthand) {
|
||||
return new AST_SymbolFunarg({
|
||||
name: ex.symbol.name,
|
||||
name: ex.key,
|
||||
start: ex.start,
|
||||
end: ex.end
|
||||
});
|
||||
@@ -981,10 +981,11 @@ var AST_ObjectProperty = DEFNODE("ObjectProperty", "key value", {
|
||||
}
|
||||
});
|
||||
|
||||
var AST_ObjectKeyVal = DEFNODE("ObjectKeyVal", "quote", {
|
||||
var AST_ObjectKeyVal = DEFNODE("ObjectKeyVal", "quote shorthand", {
|
||||
$documentation: "A key: value object property",
|
||||
$propdoc: {
|
||||
quote: "[string] the original quote character"
|
||||
quote: "[string] the original quote character",
|
||||
shorthand: "[boolean] whether this is a shorthand key:value pair, expressed as just the key."
|
||||
}
|
||||
}, AST_ObjectProperty);
|
||||
|
||||
@@ -998,18 +999,6 @@ var AST_ObjectComputedKeyVal = DEFNODE("ObjectComputedKeyVal", null, {
|
||||
}
|
||||
}, AST_ObjectProperty);
|
||||
|
||||
var AST_ObjectSymbol = DEFNODE("ObjectSymbol", "symbol", {
|
||||
$propdoc: {
|
||||
symbol: "[AST_SymbolRef] what symbol it is"
|
||||
},
|
||||
$documentation: "A symbol in an object",
|
||||
_walk: function (visitor) {
|
||||
return visitor._visit(this, function(){
|
||||
this.symbol._walk(visitor);
|
||||
});
|
||||
}
|
||||
}, AST_ObjectProperty);
|
||||
|
||||
var AST_ObjectSetter = DEFNODE("ObjectSetter", "static", {
|
||||
$propdoc: {
|
||||
static: "[boolean] whether this is a static setter (classes only)"
|
||||
|
||||
Reference in New Issue
Block a user