1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | class 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 | }
|
45 | exports.Type = Type;
|
46 |
|
\ | No newline at end of file |