This repository has been archived on 2026-03-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files

21 lines
561 B
JavaScript

import { GbnfTerminal } from "../GbnfTerminal.js";
export class GbnfVerbatimText extends GbnfTerminal {
value;
constructor(value) {
super();
this.value = value;
}
getGrammar() {
return [
'"',
this.value
.replaceAll("\\", "\\\\")
.replaceAll('"', '\\"')
.replaceAll("\t", "\\t")
.replaceAll("\r", "\\r")
.replaceAll("\n", "\\n"),
'"'
].join("");
}
}
//# sourceMappingURL=GbnfVerbatimText.js.map