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