mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-03 23:55:04 +08:00
Small refactoring and fixes
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -10,9 +10,11 @@ export default class ObjectReferenceEntity extends IEntity {
|
||||
...super.attributes,
|
||||
type: {
|
||||
default: "",
|
||||
serialized: true,
|
||||
},
|
||||
path: {
|
||||
default: "",
|
||||
serialized: true,
|
||||
},
|
||||
}
|
||||
static {
|
||||
@@ -54,8 +56,8 @@ export default class ObjectReferenceEntity extends IEntity {
|
||||
),
|
||||
Parsernostrum.str('"'),
|
||||
).map(([_0, objectReference, _1]) => objectReference),
|
||||
this.fullReferenceGrammar,
|
||||
this.typeReferenceGrammar,
|
||||
this.fullReferenceGrammar.map(v => (Utility.objectSet(v, ["attributes", "type", "serialized"], false), v)),
|
||||
this.typeReferenceGrammar.map(v => (Utility.objectSet(v, ["attributes", "type", "serialized"], false), v)),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user