textNode.js 289 B

123456789101112131415
  1. import { Expression } from "./../../../ast/expressions/expression";
  2. export class TextNode extends Expression {
  3. constructor (value) {
  4. super();
  5. this.value = value;
  6. }
  7. toString () {
  8. if (this.parenthesis) {
  9. return `(${this.value})`;
  10. }
  11. return this.value;
  12. }
  13. }