intLiteral.js 344 B

123456789101112131415
  1. import { Literal } from './literal';
  2. import { Types } from './../../typeSystem/types';
  3. import { convertToString } from './../../typeSystem/parsers';
  4. export class IntLiteral extends Literal {
  5. constructor(value) {
  6. super(Types.INTEGER);
  7. this.value = value;
  8. }
  9. toString() {
  10. return convertToString(this.value, this.type);
  11. }
  12. }