mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-13 16:44:49 +08:00
* WIP * WIP * wip * WIP * Several fixes * Tests wip port to playwright * WIP * Fix more tests * Serialization tests fixed * Several fixes for tests * Input options types * Type adjustments * Fix object reference parser * Tests fixes * More tests fixes
41 lines
1.1 KiB
JavaScript
Executable File
41 lines
1.1 KiB
JavaScript
Executable File
import GuidEntity from "./GuidEntity.js"
|
|
import IEntity from "./IEntity.js"
|
|
import Parsernostrum from "parsernostrum"
|
|
import PathSymbolEntity from "./PathSymbolEntity.js"
|
|
|
|
export default class PinReferenceEntity extends IEntity {
|
|
|
|
static attributes = {
|
|
...super.attributes,
|
|
objectName: {
|
|
type: PathSymbolEntity,
|
|
},
|
|
pinGuid: {
|
|
type: GuidEntity,
|
|
},
|
|
}
|
|
static {
|
|
this.cleanupAttributes(this.attributes)
|
|
}
|
|
static grammar = this.createGrammar()
|
|
|
|
static createGrammar() {
|
|
return Parsernostrum.seq(
|
|
PathSymbolEntity.createGrammar(),
|
|
Parsernostrum.whitespace,
|
|
GuidEntity.createGrammar()
|
|
).map(
|
|
([objectName, _1, pinGuid]) => new this({
|
|
objectName: objectName,
|
|
pinGuid: pinGuid,
|
|
})
|
|
)
|
|
}
|
|
|
|
constructor(values) {
|
|
super(values)
|
|
/** @type {PathSymbolEntity} */ this.objectName
|
|
/** @type {GuidEntity} */ this.pinGuid
|
|
}
|
|
}
|