Small refactoring and fixes

This commit is contained in:
barsdeveloper
2024-02-16 00:58:08 +01:00
parent 34a4f2746f
commit a57fa97cff
11 changed files with 389 additions and 352 deletions

View File

@@ -188,12 +188,12 @@ export default class ObjectEntity extends IEntity {
.map(currentValue =>
values => {
(values[symbol] ??= [])[index] = currentValue
Utility.objectSet(values, ["attributes", symbol, "quoted"], quoted, true)
Utility.objectSet(values, ["attributes", symbol, "quoted"], quoted)
if (!this.attributes[symbol]?.inlined) {
if (!values.attributes) {
IEntity.defineAttributes(values, {})
}
Utility.objectSet(values, ["attributes", symbol, "inlined"], true, true)
Utility.objectSet(values, ["attributes", symbol, "inlined"], true)
}
}
)
@@ -216,7 +216,7 @@ export default class ObjectEntity extends IEntity {
this.customPropertyGrammar,
Grammar.createAttributeGrammar(this),
Grammar.createAttributeGrammar(this, Grammar.attributeNameQuoted, undefined, (obj, k, v) =>
Utility.objectSet(obj, ["attributes", ...k, "quoted"], true, true)
Utility.objectSet(obj, ["attributes", ...k, "quoted"], true)
),
this.inlinedArrayEntryGrammar,
this.createSubObjectGrammar()