Still WIP

This commit is contained in:
barsdeveloper
2024-05-28 16:44:39 +02:00
parent 70b4cabb97
commit 1c2778fbf8
62 changed files with 2480 additions and 2853 deletions

22
js/entity/StringEntity.js Executable file
View File

@@ -0,0 +1,22 @@
import P from "parsernostrum"
import IEntity from "./IEntity.js"
import Utility from "../Utility.js"
export default class StringEntity extends IEntity {
static grammar = P.doubleQuotedString.map(insideString => Utility.unescapeString(insideString))
/** @param {String} value */
constructor(value = "") {
super()
this.value = value
}
valueOf() {
return this.value
}
toString() {
return this.value.toString()
}
}