storeObjectArray.js 612 B

1234567891011121314151617181920212223
  1. import { StoreObject } from './storeObject';
  2. import { Types } from './../../ast/types';
  3. export class StoreObjectArray extends StoreObject {
  4. constructor (subtype, lines, columns, value, readonly) {
  5. super(Types.ARRAY, value, readonly);
  6. this.subtype = subtype;
  7. this.lines = lines;
  8. this.columns = columns;
  9. }
  10. isCompatible (another) {
  11. if (another instanceof StoreObjectArray) {
  12. if (this.subtype === another.subtype &&
  13. this.lines === another.lines &&
  14. this.columns === another.columns) {
  15. return super.isCompatible(another);
  16. }
  17. }
  18. return false;
  19. }
  20. }