Files
ueblueprint/js/entity/IdentifierEntity.js
barsdeveloper 1c2778fbf8 Still WIP
2024-05-28 16:44:39 +02:00

26 lines
585 B
JavaScript

import Grammar from "../serialization/Grammar.js"
import IEntity from "./IEntity.js"
export default class IdentifierEntity extends IEntity {
static attributeConverter = {
fromAttribute: (value, type) => new IdentifierEntity(value),
toAttribute: (value, type) => value.toString()
}
static grammar = Grammar.symbol.map(v => new this(v))
/** @param {String} value */
constructor(value) {
super()
this.value = value
}
valueOf() {
return this.value
}
toString() {
return this.value.toString()
}
}