Files
ueblueprint/js/entity/NullEntity.js
2024-06-06 23:16:21 +02:00

20 lines
478 B
JavaScript

import P from "parsernostrum"
import IEntity from "./IEntity.js"
export default class NullEntity extends IEntity {
static grammar = /** @type {P<NullEntity>} */(
// @ts-expect-error
P.reg(new RegExp(String.raw`\(${P.whitespaceInlineOpt.getParser().regexp.source}\)`))
.map(v => new this())
)
toString(
insideString = false,
indentation = "",
printKey = this.Self().printKey,
) {
return "()"
}
}