|
|
|
@ -64,6 +64,11 @@ impl Object {
|
|
|
|
|
value.display_no_indent(f, indent + 1)?; |
|
|
|
|
writeln!(f, ",")?; |
|
|
|
|
} |
|
|
|
|
PropertyDefinition::ComputedPropertyName(key, value) => { |
|
|
|
|
writeln!(f, "{}{},", indentation, key)?; |
|
|
|
|
value.display_no_indent(f, indent + 1)?; |
|
|
|
|
writeln!(f, ",")?; |
|
|
|
|
} |
|
|
|
|
PropertyDefinition::SpreadObject(key) => { |
|
|
|
|
writeln!(f, "{}...{},", indentation, key)?; |
|
|
|
|
} |
|
|
|
@ -104,6 +109,16 @@ impl Executable for Object {
|
|
|
|
|
.configurable(true), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
PropertyDefinition::ComputedPropertyName(key, value) => { |
|
|
|
|
obj.set_property( |
|
|
|
|
key.run(context)?.to_property_key(context)?, |
|
|
|
|
PropertyDescriptor::builder() |
|
|
|
|
.value(value.run(context)?) |
|
|
|
|
.writable(true) |
|
|
|
|
.enumerable(true) |
|
|
|
|
.configurable(true), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
PropertyDefinition::MethodDefinition(kind, name, func) => match kind { |
|
|
|
|
MethodDefinitionKind::Ordinary => { |
|
|
|
|
obj.set_property( |
|
|
|
|