UNPKG

1.15 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3class Type {
4 constructor() {
5 this.type = 'void';
6 }
7 equals(type) {
8 return false;
9 }
10 toObject() {
11 let result = {};
12 result.type = this.type;
13 return result;
14 }
15 toString() {
16 return 'void';
17 }
18 static isTypeListSimilar(a, b) {
19 if (a.length !== b.length) {
20 return false;
21 }
22 outerLoop: for (let an = 0, count = a.length; an < count; an++) {
23 const at = a[an];
24 for (let bn = 0; bn < count; bn++) {
25 if (b[bn].equals(at)) {
26 continue outerLoop;
27 }
28 }
29 return false;
30 }
31 return true;
32 }
33 static isTypeListEqual(a, b) {
34 if (a.length !== b.length) {
35 return false;
36 }
37 for (let index = 0, count = a.length; index < count; index++) {
38 if (!a[index].equals(b[index])) {
39 return false;
40 }
41 }
42 return true;
43 }
44}
45exports.Type = Type;
46//# sourceMappingURL=abstract.js.map
\No newline at end of file