mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-18 20:34:54 +08:00
Remove unnecessary default attributes
This commit is contained in:
@@ -1,15 +1,22 @@
|
||||
import P from "parsernostrum"
|
||||
import Grammar from "../serialization/Grammar.js"
|
||||
import GuidEntity from "./GuidEntity.js"
|
||||
import PinEntity from "./PinEntity.js"
|
||||
|
||||
export default class UnknownPinEntity extends PinEntity {
|
||||
|
||||
static attributes = {
|
||||
...super.attributes,
|
||||
PinId: GuidEntity
|
||||
}
|
||||
|
||||
static grammar = this.createGrammar()
|
||||
|
||||
/** @returns {P<UnknownPinEntity>} */
|
||||
static createGrammar() {
|
||||
return P.seq(
|
||||
P.reg(new RegExp(`(${Grammar.Regex.Symbol.source})\\s*\\(\\s*`), 1),
|
||||
// Lookbehind
|
||||
P.reg(new RegExp(`(${Grammar.Regex.Symbol.source}\\s*)\\(\\s*`), 1),
|
||||
Grammar.createAttributeGrammar(this).sepBy(Grammar.commaSeparation),
|
||||
P.reg(/\s*(?:,\s*)?\)/)
|
||||
).map(([lookbehind, attributes, _2]) => {
|
||||
|
||||
Reference in New Issue
Block a user