1
0

variableLiteral.js 327 B

123456789101112131415161718
  1. import { Literal } from './literal';
  2. import { Types } from './../../typeSystem/types';
  3. export class VariableLiteral extends Literal {
  4. constructor(id) {
  5. super(Types.UNDEFINED);
  6. this.id = id;
  7. }
  8. toString () {
  9. if(this.parenthesis) {
  10. return `(${this.id})`;
  11. } else {
  12. return this.id;
  13. }
  14. }
  15. }