mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-21 14:24:47 +08:00
* Move grammar parsers to entity classes * Fix includes * Fix Entity5 test * Small detail * Fix unknown keys entities * Persistent grammar objects * Fix grammar * Grammar from variable
28 lines
611 B
JavaScript
28 lines
611 B
JavaScript
import Grammar from "../../js/serialization/Grammar.js"
|
|
import IEntity from "../../js/entity/IEntity.js"
|
|
import Union from "../../js/entity/Union.js"
|
|
|
|
export default class EntityF extends IEntity {
|
|
|
|
static lookbehind = new Union("Foo", "Bar")
|
|
static attributes = {
|
|
...super.attributes,
|
|
arg1: {
|
|
type: Number,
|
|
},
|
|
arg2: {
|
|
type: String,
|
|
},
|
|
}
|
|
|
|
static grammar = this.createGrammar()
|
|
|
|
static createGrammar() {
|
|
return Grammar.createEntityGrammar(this, false)
|
|
}
|
|
|
|
constructor(values = {}) {
|
|
super(values)
|
|
}
|
|
}
|