@fncts/schema 0.0.23 → 0.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AST.d.ts +60 -29
- package/ASTAnnotationMap.d.ts +4 -1
- package/LICENSE +26 -0
- package/ParseError/ParseError.d.ts +28 -13
- package/_cjs/AST.cjs +1096 -1087
- package/_cjs/AST.cjs.map +1 -1
- package/_cjs/ASTAnnotation.cjs +114 -83
- package/_cjs/ASTAnnotation.cjs.map +1 -1
- package/_cjs/ASTAnnotationMap.cjs +43 -32
- package/_cjs/ASTAnnotationMap.cjs.map +1 -1
- package/_cjs/Eq.cjs +113 -145
- package/_cjs/Eq.cjs.map +1 -1
- package/_cjs/Gen.cjs +131 -167
- package/_cjs/Gen.cjs.map +1 -1
- package/_cjs/Guard.cjs +167 -267
- package/_cjs/Guard.cjs.map +1 -1
- package/_cjs/InvalidInterpretationError.cjs +9 -15
- package/_cjs/InvalidInterpretationError.cjs.map +1 -1
- package/_cjs/ParseError/ParseError.cjs +285 -209
- package/_cjs/ParseError/ParseError.cjs.map +1 -1
- package/_cjs/ParseError/ParseErrorFormatter.cjs +0 -2
- package/_cjs/ParseError/PathFormatter.cjs +55 -87
- package/_cjs/ParseError/PathFormatter.cjs.map +1 -1
- package/_cjs/ParseError/TreeFormatter.cjs +70 -102
- package/_cjs/ParseError/TreeFormatter.cjs.map +1 -1
- package/_cjs/ParseError.cjs +35 -50
- package/_cjs/ParseResult.cjs +15 -15
- package/_cjs/ParseResult.cjs.map +1 -1
- package/_cjs/Parser/api.cjs +54 -50
- package/_cjs/Parser/api.cjs.map +1 -1
- package/_cjs/Parser/definition.cjs +17 -16
- package/_cjs/Parser/definition.cjs.map +1 -1
- package/_cjs/Parser/interpreter.cjs +276 -358
- package/_cjs/Parser/interpreter.cjs.map +1 -1
- package/_cjs/Parser.cjs +12 -39
- package/_cjs/Schema/api/conc.cjs +64 -59
- package/_cjs/Schema/api/conc.cjs.map +1 -1
- package/_cjs/Schema/api/either.cjs +73 -72
- package/_cjs/Schema/api/either.cjs.map +1 -1
- package/_cjs/Schema/api/hashMap.cjs +85 -85
- package/_cjs/Schema/api/hashMap.cjs.map +1 -1
- package/_cjs/Schema/api/hashSet.cjs +75 -69
- package/_cjs/Schema/api/hashSet.cjs.map +1 -1
- package/_cjs/Schema/api/list.cjs +74 -64
- package/_cjs/Schema/api/list.cjs.map +1 -1
- package/_cjs/Schema/api/map.cjs +81 -83
- package/_cjs/Schema/api/map.cjs.map +1 -1
- package/_cjs/Schema/api/maybe.cjs +56 -49
- package/_cjs/Schema/api/maybe.cjs.map +1 -1
- package/_cjs/Schema/api/set.cjs +68 -61
- package/_cjs/Schema/api/set.cjs.map +1 -1
- package/_cjs/Schema/api.cjs +332 -350
- package/_cjs/Schema/api.cjs.map +1 -1
- package/_cjs/Schema/definition.cjs +28 -27
- package/_cjs/Schema/definition.cjs.map +1 -1
- package/_cjs/Schema/derivations.cjs +85 -100
- package/_cjs/Schema/derivations.cjs.map +1 -1
- package/_cjs/Schema.cjs +95 -127
- package/_cjs/Show.cjs +91 -151
- package/_cjs/Show.cjs.map +1 -1
- package/_cjs/chunk.cjs +28 -0
- package/_cjs/global.cjs +0 -2
- package/_cjs/index.cjs +0 -2
- package/_cjs/utils.cjs +41 -46
- package/_cjs/utils.cjs.map +1 -1
- package/_mjs/AST.mjs +1007 -1031
- package/_mjs/AST.mjs.map +1 -1
- package/_mjs/ASTAnnotation.mjs +77 -71
- package/_mjs/ASTAnnotation.mjs.map +1 -1
- package/_mjs/ASTAnnotationMap.mjs +36 -25
- package/_mjs/ASTAnnotationMap.mjs.map +1 -1
- package/_mjs/Eq.mjs +101 -134
- package/_mjs/Eq.mjs.map +1 -1
- package/_mjs/Gen.mjs +117 -157
- package/_mjs/Gen.mjs.map +1 -1
- package/_mjs/Guard.mjs +154 -257
- package/_mjs/Guard.mjs.map +1 -1
- package/_mjs/InvalidInterpretationError.mjs +8 -9
- package/_mjs/InvalidInterpretationError.mjs.map +1 -1
- package/_mjs/ParseError/ParseError.mjs +270 -190
- package/_mjs/ParseError/ParseError.mjs.map +1 -1
- package/_mjs/ParseError/ParseErrorFormatter.mjs +0 -2
- package/_mjs/ParseError/PathFormatter.mjs +51 -80
- package/_mjs/ParseError/PathFormatter.mjs.map +1 -1
- package/_mjs/ParseError/TreeFormatter.mjs +62 -94
- package/_mjs/ParseError/TreeFormatter.mjs.map +1 -1
- package/_mjs/ParseError.mjs +5 -6
- package/_mjs/ParseResult.mjs +13 -9
- package/_mjs/ParseResult.mjs.map +1 -1
- package/_mjs/Parser/api.mjs +43 -39
- package/_mjs/Parser/api.mjs.map +1 -1
- package/_mjs/Parser/definition.mjs +12 -8
- package/_mjs/Parser/definition.mjs.map +1 -1
- package/_mjs/Parser/interpreter.mjs +262 -348
- package/_mjs/Parser/interpreter.mjs.map +1 -1
- package/_mjs/Parser.mjs +4 -5
- package/_mjs/Schema/api/conc.mjs +41 -45
- package/_mjs/Schema/api/conc.mjs.map +1 -1
- package/_mjs/Schema/api/either.mjs +55 -61
- package/_mjs/Schema/api/either.mjs.map +1 -1
- package/_mjs/Schema/api/hashMap.mjs +61 -71
- package/_mjs/Schema/api/hashMap.mjs.map +1 -1
- package/_mjs/Schema/api/hashSet.mjs +53 -56
- package/_mjs/Schema/api/hashSet.mjs.map +1 -1
- package/_mjs/Schema/api/list.mjs +50 -51
- package/_mjs/Schema/api/list.mjs.map +1 -1
- package/_mjs/Schema/api/map.mjs +59 -69
- package/_mjs/Schema/api/map.mjs.map +1 -1
- package/_mjs/Schema/api/maybe.mjs +34 -36
- package/_mjs/Schema/api/maybe.mjs.map +1 -1
- package/_mjs/Schema/api/set.mjs +47 -48
- package/_mjs/Schema/api/set.mjs.map +1 -1
- package/_mjs/Schema/api.mjs +304 -346
- package/_mjs/Schema/api.mjs.map +1 -1
- package/_mjs/Schema/definition.mjs +21 -18
- package/_mjs/Schema/definition.mjs.map +1 -1
- package/_mjs/Schema/derivations.mjs +71 -90
- package/_mjs/Schema/derivations.mjs.map +1 -1
- package/_mjs/Schema.mjs +12 -15
- package/_mjs/Show.mjs +79 -139
- package/_mjs/Show.mjs.map +1 -1
- package/_mjs/global.mjs +0 -2
- package/_mjs/index.mjs +0 -2
- package/_mjs/utils.mjs +35 -37
- package/_mjs/utils.mjs.map +1 -1
- package/_src/AST.ts +226 -28
- package/_src/ASTAnnotationMap.ts +14 -1
- package/_src/ParseError/ParseError.ts +128 -13
- package/_src/Schema/api/hashMap.ts +1 -1
- package/_src/Schema/api/hashSet.ts +1 -1
- package/_src/Schema/api/list.ts +3 -1
- package/_src/Schema/api/map.ts +1 -1
- package/_src/Schema/api/set.ts +1 -1
- package/package.json +7 -3
- package/_cjs/ParseError/ParseErrorFormatter.cjs.map +0 -1
- package/_cjs/ParseError.cjs.map +0 -1
- package/_cjs/Parser.cjs.map +0 -1
- package/_cjs/Schema.cjs.map +0 -1
- package/_cjs/global.cjs.map +0 -1
- package/_cjs/index.cjs.map +0 -1
- package/_mjs/ParseError/ParseErrorFormatter.mjs.map +0 -1
- package/_mjs/ParseError.mjs.map +0 -1
- package/_mjs/Parser.mjs.map +0 -1
- package/_mjs/Schema.mjs.map +0 -1
- package/_mjs/global.mjs.map +0 -1
- package/_mjs/index.mjs.map +0 -1
|
@@ -1,228 +1,308 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
constructor(ast, actual, error) {
|
|
6
|
-
this.ast = ast;
|
|
7
|
-
this.actual = actual;
|
|
8
|
-
this.error = error;
|
|
9
|
-
this._tag = 0 /* ParseErrorTag.Declaration */;
|
|
10
|
-
}
|
|
1
|
+
import * as tsplus_module_1 from "@fncts/base/data/Equatable/definition";
|
|
2
|
+
//#region build/esm/ParseError/ParseError.js
|
|
3
|
+
function hasTag(u, tag) {
|
|
4
|
+
return typeof u === "object" && u !== null && "_tag" in u && u._tag === tag;
|
|
11
5
|
}
|
|
12
6
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
* @tsplus companion fncts.schema.ParseError.DeclarationError
|
|
8
|
+
*/
|
|
9
|
+
var DeclarationError = class {
|
|
10
|
+
ast;
|
|
11
|
+
actual;
|
|
12
|
+
error;
|
|
13
|
+
_tag = 0;
|
|
14
|
+
constructor(ast, actual, error) {
|
|
15
|
+
this.ast = ast;
|
|
16
|
+
this.actual = actual;
|
|
17
|
+
this.error = error;
|
|
18
|
+
}
|
|
19
|
+
[tsplus_module_1.equalsSymbol](that, context) {
|
|
20
|
+
return hasTag(that, 0) && context.comparator(this.ast, that.ast) && context.comparator(this.actual, that.actual) && context.comparator(this.error, that.error);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
19
23
|
/**
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
this.actual = actual;
|
|
26
|
-
this._tag = 1 /* ParseErrorTag.Type */;
|
|
27
|
-
}
|
|
24
|
+
* @tsplus static fncts.schema.ParseError.DeclarationError __call
|
|
25
|
+
* @tsplus static fncts.schema.ParseErrorOps DeclarationError
|
|
26
|
+
*/
|
|
27
|
+
function declarationError(ast, actual, error) {
|
|
28
|
+
return new DeclarationError(ast, actual, error);
|
|
28
29
|
}
|
|
29
30
|
/**
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
* @tsplus companion fncts.schema.ParseError.TypeError
|
|
32
|
+
*/
|
|
33
|
+
var TypeError = class {
|
|
34
|
+
ast;
|
|
35
|
+
actual;
|
|
36
|
+
_tag = 1;
|
|
37
|
+
constructor(ast, actual) {
|
|
38
|
+
this.ast = ast;
|
|
39
|
+
this.actual = actual;
|
|
40
|
+
}
|
|
41
|
+
[tsplus_module_1.equalsSymbol](that, context) {
|
|
42
|
+
return hasTag(that, 1) && context.comparator(this.ast, that.ast) && context.comparator(this.actual, that.actual);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
36
45
|
/**
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
this.actual = actual;
|
|
43
|
-
this.errors = errors;
|
|
44
|
-
this.output = output;
|
|
45
|
-
this._tag = 9 /* ParseErrorTag.TypeLiteral */;
|
|
46
|
-
}
|
|
46
|
+
* @tsplus static fncts.schema.ParseError.TypeError __call
|
|
47
|
+
* @tsplus static fncts.schema.ParseErrorOps TypeError
|
|
48
|
+
*/
|
|
49
|
+
function typeError(expected, actual) {
|
|
50
|
+
return new TypeError(expected, actual);
|
|
47
51
|
}
|
|
48
52
|
/**
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
* @tsplus companion fncts.schema.ParseError.TypeLiteralError
|
|
54
|
+
*/
|
|
55
|
+
var TypeLiteralError = class {
|
|
56
|
+
ast;
|
|
57
|
+
actual;
|
|
58
|
+
errors;
|
|
59
|
+
output;
|
|
60
|
+
_tag = 9;
|
|
61
|
+
constructor(ast, actual, errors, output = {}) {
|
|
62
|
+
this.ast = ast;
|
|
63
|
+
this.actual = actual;
|
|
64
|
+
this.errors = errors;
|
|
65
|
+
this.output = output;
|
|
66
|
+
}
|
|
67
|
+
[tsplus_module_1.equalsSymbol](that, context) {
|
|
68
|
+
return hasTag(that, 9) && context.comparator(this.ast, that.ast) && context.comparator(this.actual, that.actual) && context.comparator(this.errors, that.errors) && context.comparator(this.output, that.output);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
55
71
|
/**
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
this.actual = actual;
|
|
62
|
-
this.errors = errors;
|
|
63
|
-
this.output = output;
|
|
64
|
-
this._tag = 10 /* ParseErrorTag.Tuple */;
|
|
65
|
-
}
|
|
72
|
+
* @tsplus static fncts.schema.ParseError.TypeLiteralError __call
|
|
73
|
+
* @tsplus static fncts.schema.ParseErrorOps TypeLiteralError
|
|
74
|
+
*/
|
|
75
|
+
function typeLiteralError(ast, actual, errors, output = {}) {
|
|
76
|
+
return new TypeLiteralError(ast, actual, errors, output);
|
|
66
77
|
}
|
|
67
78
|
/**
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
79
|
+
* @tsplus companion fncts.schema.ParseError.TupleError
|
|
80
|
+
*/
|
|
81
|
+
var TupleError = class {
|
|
82
|
+
ast;
|
|
83
|
+
actual;
|
|
84
|
+
errors;
|
|
85
|
+
output;
|
|
86
|
+
_tag = 10;
|
|
87
|
+
constructor(ast, actual, errors, output = []) {
|
|
88
|
+
this.ast = ast;
|
|
89
|
+
this.actual = actual;
|
|
90
|
+
this.errors = errors;
|
|
91
|
+
this.output = output;
|
|
92
|
+
}
|
|
93
|
+
[tsplus_module_1.equalsSymbol](that, context) {
|
|
94
|
+
return hasTag(that, 10) && context.comparator(this.ast, that.ast) && context.comparator(this.actual, that.actual) && context.comparator(this.errors, that.errors) && context.comparator(this.output, that.output);
|
|
95
|
+
}
|
|
96
|
+
};
|
|
74
97
|
/**
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
this.error = error;
|
|
81
|
-
this._tag = 2 /* ParseErrorTag.Index */;
|
|
82
|
-
}
|
|
98
|
+
* @tsplus static fncts.schema.ParseError.TupleError __call
|
|
99
|
+
* @tsplus static fncts.schema.ParseErrorOps TupleError
|
|
100
|
+
*/
|
|
101
|
+
function tupleError(ast, actual, errors, output = []) {
|
|
102
|
+
return new TupleError(ast, actual, errors, output);
|
|
83
103
|
}
|
|
84
104
|
/**
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
105
|
+
* @tsplus companion fncts.schema.ParseError.IndexError
|
|
106
|
+
*/
|
|
107
|
+
var IndexError = class {
|
|
108
|
+
index;
|
|
109
|
+
error;
|
|
110
|
+
_tag = 2;
|
|
111
|
+
constructor(index, error) {
|
|
112
|
+
this.index = index;
|
|
113
|
+
this.error = error;
|
|
114
|
+
}
|
|
115
|
+
[tsplus_module_1.equalsSymbol](that, context) {
|
|
116
|
+
return hasTag(that, 2) && context.comparator(this.index, that.index) && context.comparator(this.error, that.error);
|
|
117
|
+
}
|
|
118
|
+
};
|
|
91
119
|
/**
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
this.key = key;
|
|
98
|
-
this.error = error;
|
|
99
|
-
this._tag = 3 /* ParseErrorTag.Key */;
|
|
100
|
-
}
|
|
120
|
+
* @tsplus static fncts.schema.ParseError.IndexError __call
|
|
121
|
+
* @tsplus static fncts.schema.ParseErrorOps IndexError
|
|
122
|
+
*/
|
|
123
|
+
function indexError(index, error) {
|
|
124
|
+
return new IndexError(index, error);
|
|
101
125
|
}
|
|
102
126
|
/**
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
127
|
+
* @tsplus companion fncts.schema.ParseError.KeyError
|
|
128
|
+
*/
|
|
129
|
+
var KeyError = class {
|
|
130
|
+
keyAST;
|
|
131
|
+
key;
|
|
132
|
+
error;
|
|
133
|
+
_tag = 3;
|
|
134
|
+
constructor(keyAST, key, error) {
|
|
135
|
+
this.keyAST = keyAST;
|
|
136
|
+
this.key = key;
|
|
137
|
+
this.error = error;
|
|
138
|
+
}
|
|
139
|
+
[tsplus_module_1.equalsSymbol](that, context) {
|
|
140
|
+
return hasTag(that, 3) && context.comparator(this.keyAST, that.keyAST) && context.comparator(this.key, that.key) && context.comparator(this.error, that.error);
|
|
141
|
+
}
|
|
142
|
+
};
|
|
109
143
|
/**
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
144
|
+
* @tsplus static fncts.schema.ParseError.KeyError __call
|
|
145
|
+
* @tsplus static fncts.schema.ParseErrorOps KeyError
|
|
146
|
+
*/
|
|
147
|
+
function keyError(keyAST, key, error) {
|
|
148
|
+
return new KeyError(keyAST, key, error);
|
|
116
149
|
}
|
|
117
150
|
/**
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
this.actual = actual;
|
|
127
|
-
this._tag = 5 /* ParseErrorTag.Unexpected */;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
151
|
+
* @tsplus companion fncts.schema.ParseError.MissingError
|
|
152
|
+
*/
|
|
153
|
+
var MissingError = class {
|
|
154
|
+
_tag = 4;
|
|
155
|
+
[tsplus_module_1.equalsSymbol](that) {
|
|
156
|
+
return hasTag(that, 4);
|
|
157
|
+
}
|
|
158
|
+
};
|
|
130
159
|
/**
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
export function unexpectedError(actual) {
|
|
135
|
-
return new UnexpectedError(actual);
|
|
136
|
-
}
|
|
160
|
+
* @tsplus static fncts.schema.ParseErrorOps MissingError
|
|
161
|
+
*/
|
|
162
|
+
const missingError = new MissingError();
|
|
137
163
|
/**
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
164
|
+
* @tsplus companion fncts.schema.ParseError.UnexpectedError
|
|
165
|
+
*/
|
|
166
|
+
var UnexpectedError = class {
|
|
167
|
+
actual;
|
|
168
|
+
_tag = 5;
|
|
169
|
+
constructor(actual) {
|
|
170
|
+
this.actual = actual;
|
|
171
|
+
}
|
|
172
|
+
[tsplus_module_1.equalsSymbol](that, context) {
|
|
173
|
+
return hasTag(that, 5) && context.comparator(this.actual, that.actual);
|
|
174
|
+
}
|
|
175
|
+
};
|
|
148
176
|
/**
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
177
|
+
* @tsplus static fncts.schema.ParseError.UnexpectedError __call
|
|
178
|
+
* @tsplus static fncts.schema.ParseErrorOps UnexpectedError
|
|
179
|
+
*/
|
|
180
|
+
function unexpectedError(actual) {
|
|
181
|
+
return new UnexpectedError(actual);
|
|
154
182
|
}
|
|
155
183
|
/**
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
184
|
+
* @tsplus companion fncts.schema.ParseError.UnionError
|
|
185
|
+
*/
|
|
186
|
+
var UnionError = class {
|
|
187
|
+
ast;
|
|
188
|
+
actual;
|
|
189
|
+
errors;
|
|
190
|
+
_tag = 11;
|
|
191
|
+
constructor(ast, actual, errors) {
|
|
192
|
+
this.ast = ast;
|
|
193
|
+
this.actual = actual;
|
|
194
|
+
this.errors = errors;
|
|
195
|
+
}
|
|
196
|
+
[tsplus_module_1.equalsSymbol](that, context) {
|
|
197
|
+
return hasTag(that, 11) && context.comparator(this.ast, that.ast) && context.comparator(this.actual, that.actual) && context.comparator(this.errors, that.errors);
|
|
198
|
+
}
|
|
199
|
+
};
|
|
165
200
|
/**
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
201
|
+
* @tsplus static fncts.schema.ParseError.UnionError __call
|
|
202
|
+
* @tsplus static fncts.schema.ParseErrorOps UnionError
|
|
203
|
+
*/
|
|
204
|
+
function unionError(ast, actual, errors) {
|
|
205
|
+
return new UnionError(ast, actual, errors);
|
|
171
206
|
}
|
|
172
207
|
/**
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
208
|
+
* @tsplus companion fncts.schema.ParseError.UnionMemberError
|
|
209
|
+
*/
|
|
210
|
+
var UnionMemberError = class {
|
|
211
|
+
ast;
|
|
212
|
+
error;
|
|
213
|
+
_tag = 6;
|
|
214
|
+
constructor(ast, error) {
|
|
215
|
+
this.ast = ast;
|
|
216
|
+
this.error = error;
|
|
217
|
+
}
|
|
218
|
+
[tsplus_module_1.equalsSymbol](that, context) {
|
|
219
|
+
return hasTag(that, 6) && context.comparator(this.ast, that.ast) && context.comparator(this.error, that.error);
|
|
220
|
+
}
|
|
221
|
+
};
|
|
184
222
|
/**
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
223
|
+
* @tsplus static fncts.schema.ParseError.UnionMemberError __call
|
|
224
|
+
* @tsplus static fncts.schema.ParseErrorOps UnionMemberError
|
|
225
|
+
*/
|
|
226
|
+
function unionMemberError(ast, error) {
|
|
227
|
+
return new UnionMemberError(ast, error);
|
|
190
228
|
}
|
|
191
229
|
/**
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
230
|
+
* @tsplus companion fncts.schema.ParseError.RefinementError
|
|
231
|
+
*/
|
|
232
|
+
var RefinementError = class {
|
|
233
|
+
ast;
|
|
234
|
+
actual;
|
|
235
|
+
kind;
|
|
236
|
+
error;
|
|
237
|
+
_tag = 7;
|
|
238
|
+
constructor(ast, actual, kind, error) {
|
|
239
|
+
this.ast = ast;
|
|
240
|
+
this.actual = actual;
|
|
241
|
+
this.kind = kind;
|
|
242
|
+
this.error = error;
|
|
243
|
+
}
|
|
244
|
+
[tsplus_module_1.equalsSymbol](that, context) {
|
|
245
|
+
return hasTag(that, 7) && context.comparator(this.ast, that.ast) && context.comparator(this.actual, that.actual) && context.comparator(this.kind, that.kind) && context.comparator(this.error, that.error);
|
|
246
|
+
}
|
|
247
|
+
};
|
|
203
248
|
/**
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
249
|
+
* @tsplus static fncts.schema.ParseError.RefinementError __call
|
|
250
|
+
* @tsplus static fncts.schema.ParseErrorOps RefinementError
|
|
251
|
+
*/
|
|
252
|
+
function refinementError(ast, actual, kind, error) {
|
|
253
|
+
return new RefinementError(ast, actual, kind, error);
|
|
209
254
|
}
|
|
210
255
|
/**
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
256
|
+
* @tsplus companion fncts.schema.ParseError.TransformationError
|
|
257
|
+
*/
|
|
258
|
+
var TransformationError = class {
|
|
259
|
+
ast;
|
|
260
|
+
actual;
|
|
261
|
+
kind;
|
|
262
|
+
error;
|
|
263
|
+
_tag = 8;
|
|
264
|
+
constructor(ast, actual, kind, error) {
|
|
265
|
+
this.ast = ast;
|
|
266
|
+
this.actual = actual;
|
|
267
|
+
this.kind = kind;
|
|
268
|
+
this.error = error;
|
|
269
|
+
}
|
|
270
|
+
[tsplus_module_1.equalsSymbol](that, context) {
|
|
271
|
+
return hasTag(that, 8) && context.comparator(this.ast, that.ast) && context.comparator(this.actual, that.actual) && context.comparator(this.kind, that.kind) && context.comparator(this.error, that.error);
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
/**
|
|
275
|
+
* @tsplus static fncts.schema.ParseError.TransformationError __call
|
|
276
|
+
* @tsplus static fncts.schema.ParseErrorOps TransformationError
|
|
277
|
+
*/
|
|
278
|
+
function transformationError(ast, actual, kind, error) {
|
|
279
|
+
return new TransformationError(ast, actual, kind, error);
|
|
220
280
|
}
|
|
221
281
|
/**
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
282
|
+
* @tsplus companion fncts.schema.ParseError.IterableError
|
|
283
|
+
*/
|
|
284
|
+
var IterableError = class {
|
|
285
|
+
ast;
|
|
286
|
+
actual;
|
|
287
|
+
errors;
|
|
288
|
+
_tag = 12;
|
|
289
|
+
constructor(ast, actual, errors) {
|
|
290
|
+
this.ast = ast;
|
|
291
|
+
this.actual = actual;
|
|
292
|
+
this.errors = errors;
|
|
293
|
+
}
|
|
294
|
+
[tsplus_module_1.equalsSymbol](that, context) {
|
|
295
|
+
return hasTag(that, 12) && context.comparator(this.ast, that.ast) && context.comparator(this.actual, that.actual) && context.comparator(this.errors, that.errors);
|
|
296
|
+
}
|
|
297
|
+
};
|
|
298
|
+
/**
|
|
299
|
+
* @tsplus static fncts.schema.ParseError.IterableError __call
|
|
300
|
+
* @tsplus static fncts.schema.ParseErrorOps IterableError
|
|
301
|
+
*/
|
|
302
|
+
function iterableError(ast, actual, errors) {
|
|
303
|
+
return new IterableError(ast, actual, errors);
|
|
227
304
|
}
|
|
305
|
+
//#endregion
|
|
306
|
+
export { DeclarationError, IndexError, IterableError, KeyError, MissingError, RefinementError, TransformationError, TupleError, TypeError, TypeLiteralError, UnexpectedError, UnionError, UnionMemberError, declarationError, indexError, iterableError, keyError, missingError, refinementError, transformationError, tupleError, typeError, typeLiteralError, unexpectedError, unionError, unionMemberError };
|
|
307
|
+
|
|
228
308
|
//# sourceMappingURL=ParseError.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParseError.mjs","names":["DeclarationError","constructor","ast","actual","error","_tag","declarationError","TypeError","typeError","expected","TypeLiteralError","errors","output","typeLiteralError","TupleError","tupleError","IndexError","index","indexError","KeyError","keyAST","key","keyError","MissingError","missingError","UnexpectedError","unexpectedError","UnionError","unionError","UnionMemberError","unionMemberError","RefinementError","kind","refinementError","TransformationError","transformationError","IterableError","iterableError"],"sources":["../../_src/ParseError/ParseError.ts"],"sourcesContent":[null],"mappings":"AAgCA;;;AAGA,OAAM,MAAOA,gBAAgB;EAE3BC,YACWC,GAAgB,EAChBC,MAAe,EACfC,KAAiB;IAFjB,KAAAF,G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GAAG,GAAHA,GAAG;IACH,KAAAC,MAAM,GAANA,MAAM;IACN,KAAA6B,IAAI,GAAJA,IAAI;IACJ,KAAA5B,KAAK,GAALA,KAAK;IALP,KAAAC,IAAI;EAMV;;AAGL;;;;AAIA,OAAM,SAAU8B,mBAAmBA,CACjCjC,GAAc,EACdC,MAAe,EACf6B,IAA2C,EAC3C5B,KAAiB;EAEjB,OAAO,IAAI8B,mBAAmB,CAAChC,GAAG,EAAEC,MAAM,EAAE6B,IAAI,EAAE5B,KAAK,CAAC;AAC1D;AAEA;;;AAGA,OAAM,MAAOgC,aAAa;EAExBnC,YACWC,GAAQ,EACRC,MAAe,EACfQ,MAAqC;IAFrC,KAAAT,GAAG,GAAHA,GAAG;IACH,KAAAC,MAAM,GAANA,MAAM;IACN,KAAAQ,MAAM,GAANA,MAAM;IAJR,KAAAN,IAAI;EAKV;;AAGL;;;;AAIA,OAAM,SAAUgC,aAAaA,CAACnC,GAAQ,EAAEC,MAAe,EAAEQ,MAAqC;EAC5F,OAAO,IAAIyB,aAAa,CAAClC,GAAG,EAAEC,MAAM,EAAEQ,MAAM,CAAC;AAC/C","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"ParseError.mjs","names":[],"sources":["../../esm/ParseError/ParseError.js"],"sourcesContent":["import * as tsplus_module_1 from \"@fncts/base/data/Equatable/definition\";\nfunction hasTag(u, tag) {\n return typeof u === \"object\" && u !== null && \"_tag\" in u && u._tag === tag;\n}\n/**\n * @tsplus companion fncts.schema.ParseError.DeclarationError\n */\nexport class DeclarationError {\n ast;\n actual;\n error;\n _tag = 0 /* ParseErrorTag.Declaration */;\n constructor(ast, actual, error) {\n this.ast = ast;\n this.actual = actual;\n this.error = error;\n }\n [tsplus_module_1.equalsSymbol](that, context) {\n return (hasTag(that, 0 /* ParseErrorTag.Declaration */) &&\n context.comparator(this.ast, that.ast) &&\n context.comparator(this.actual, that.actual) &&\n context.comparator(this.error, that.error));\n }\n}\n/**\n * @tsplus static fncts.schema.ParseError.DeclarationError __call\n * @tsplus static fncts.schema.ParseErrorOps DeclarationError\n */\nexport function declarationError(ast, actual, error) {\n return new DeclarationError(ast, actual, error);\n}\n/**\n * @tsplus companion fncts.schema.ParseError.TypeError\n */\nexport class TypeError {\n ast;\n actual;\n _tag = 1 /* ParseErrorTag.Type */;\n constructor(ast, actual) {\n this.ast = ast;\n this.actual = actual;\n }\n [tsplus_module_1.equalsSymbol](that, context) {\n return (hasTag(that, 1 /* ParseErrorTag.Type */) &&\n context.comparator(this.ast, that.ast) &&\n context.comparator(this.actual, that.actual));\n }\n}\n/**\n * @tsplus static fncts.schema.ParseError.TypeError __call\n * @tsplus static fncts.schema.ParseErrorOps TypeError\n */\nexport function typeError(expected, actual) {\n return new TypeError(expected, actual);\n}\n/**\n * @tsplus companion fncts.schema.ParseError.TypeLiteralError\n */\nexport class TypeLiteralError {\n ast;\n actual;\n errors;\n output;\n _tag = 9 /* ParseErrorTag.TypeLiteral */;\n constructor(ast, actual, errors, output = {}) {\n this.ast = ast;\n this.actual = actual;\n this.errors = errors;\n this.output = output;\n }\n [tsplus_module_1.equalsSymbol](that, context) {\n return (hasTag(that, 9 /* ParseErrorTag.TypeLiteral */) &&\n context.comparator(this.ast, that.ast) &&\n context.comparator(this.actual, that.actual) &&\n context.comparator(this.errors, that.errors) &&\n context.comparator(this.output, that.output));\n }\n}\n/**\n * @tsplus static fncts.schema.ParseError.TypeLiteralError __call\n * @tsplus static fncts.schema.ParseErrorOps TypeLiteralError\n */\nexport function typeLiteralError(ast, actual, errors, output = {}) {\n return new TypeLiteralError(ast, actual, errors, output);\n}\n/**\n * @tsplus companion fncts.schema.ParseError.TupleError\n */\nexport class TupleError {\n ast;\n actual;\n errors;\n output;\n _tag = 10 /* ParseErrorTag.Tuple */;\n constructor(ast, actual, errors, output = []) {\n this.ast = ast;\n this.actual = actual;\n this.errors = errors;\n this.output = output;\n }\n [tsplus_module_1.equalsSymbol](that, context) {\n return (hasTag(that, 10 /* ParseErrorTag.Tuple */) &&\n context.comparator(this.ast, that.ast) &&\n context.comparator(this.actual, that.actual) &&\n context.comparator(this.errors, that.errors) &&\n context.comparator(this.output, that.output));\n }\n}\n/**\n * @tsplus static fncts.schema.ParseError.TupleError __call\n * @tsplus static fncts.schema.ParseErrorOps TupleError\n */\nexport function tupleError(ast, actual, errors, output = []) {\n return new TupleError(ast, actual, errors, output);\n}\n/**\n * @tsplus companion fncts.schema.ParseError.IndexError\n */\nexport class IndexError {\n index;\n error;\n _tag = 2 /* ParseErrorTag.Index */;\n constructor(index, error) {\n this.index = index;\n this.error = error;\n }\n [tsplus_module_1.equalsSymbol](that, context) {\n return (hasTag(that, 2 /* ParseErrorTag.Index */) &&\n context.comparator(this.index, that.index) &&\n context.comparator(this.error, that.error));\n }\n}\n/**\n * @tsplus static fncts.schema.ParseError.IndexError __call\n * @tsplus static fncts.schema.ParseErrorOps IndexError\n */\nexport function indexError(index, error) {\n return new IndexError(index, error);\n}\n/**\n * @tsplus companion fncts.schema.ParseError.KeyError\n */\nexport class KeyError {\n keyAST;\n key;\n error;\n _tag = 3 /* ParseErrorTag.Key */;\n constructor(keyAST, key, error) {\n this.keyAST = keyAST;\n this.key = key;\n this.error = error;\n }\n [tsplus_module_1.equalsSymbol](that, context) {\n return (hasTag(that, 3 /* ParseErrorTag.Key */) &&\n context.comparator(this.keyAST, that.keyAST) &&\n context.comparator(this.key, that.key) &&\n context.comparator(this.error, that.error));\n }\n}\n/**\n * @tsplus static fncts.schema.ParseError.KeyError __call\n * @tsplus static fncts.schema.ParseErrorOps KeyError\n */\nexport function keyError(keyAST, key, error) {\n return new KeyError(keyAST, key, error);\n}\n/**\n * @tsplus companion fncts.schema.ParseError.MissingError\n */\nexport class MissingError {\n _tag = 4 /* ParseErrorTag.Missing */;\n [tsplus_module_1.equalsSymbol](that) {\n return hasTag(that, 4 /* ParseErrorTag.Missing */);\n }\n}\n/**\n * @tsplus static fncts.schema.ParseErrorOps MissingError\n */\nexport const missingError = new MissingError();\n/**\n * @tsplus companion fncts.schema.ParseError.UnexpectedError\n */\nexport class UnexpectedError {\n actual;\n _tag = 5 /* ParseErrorTag.Unexpected */;\n constructor(actual) {\n this.actual = actual;\n }\n [tsplus_module_1.equalsSymbol](that, context) {\n return hasTag(that, 5 /* ParseErrorTag.Unexpected */) && context.comparator(this.actual, that.actual);\n }\n}\n/**\n * @tsplus static fncts.schema.ParseError.UnexpectedError __call\n * @tsplus static fncts.schema.ParseErrorOps UnexpectedError\n */\nexport function unexpectedError(actual) {\n return new UnexpectedError(actual);\n}\n/**\n * @tsplus companion fncts.schema.ParseError.UnionError\n */\nexport class UnionError {\n ast;\n actual;\n errors;\n _tag = 11 /* ParseErrorTag.Union */;\n constructor(ast, actual, errors) {\n this.ast = ast;\n this.actual = actual;\n this.errors = errors;\n }\n [tsplus_module_1.equalsSymbol](that, context) {\n return (hasTag(that, 11 /* ParseErrorTag.Union */) &&\n context.comparator(this.ast, that.ast) &&\n context.comparator(this.actual, that.actual) &&\n context.comparator(this.errors, that.errors));\n }\n}\n/**\n * @tsplus static fncts.schema.ParseError.UnionError __call\n * @tsplus static fncts.schema.ParseErrorOps UnionError\n */\nexport function unionError(ast, actual, errors) {\n return new UnionError(ast, actual, errors);\n}\n/**\n * @tsplus companion fncts.schema.ParseError.UnionMemberError\n */\nexport class UnionMemberError {\n ast;\n error;\n _tag = 6 /* ParseErrorTag.UnionMember */;\n constructor(ast, error) {\n this.ast = ast;\n this.error = error;\n }\n [tsplus_module_1.equalsSymbol](that, context) {\n return (hasTag(that, 6 /* ParseErrorTag.UnionMember */) &&\n context.comparator(this.ast, that.ast) &&\n context.comparator(this.error, that.error));\n }\n}\n/**\n * @tsplus static fncts.schema.ParseError.UnionMemberError __call\n * @tsplus static fncts.schema.ParseErrorOps UnionMemberError\n */\nexport function unionMemberError(ast, error) {\n return new UnionMemberError(ast, error);\n}\n/**\n * @tsplus companion fncts.schema.ParseError.RefinementError\n */\nexport class RefinementError {\n ast;\n actual;\n kind;\n error;\n _tag = 7 /* ParseErrorTag.Refinement */;\n constructor(ast, actual, kind, error) {\n this.ast = ast;\n this.actual = actual;\n this.kind = kind;\n this.error = error;\n }\n [tsplus_module_1.equalsSymbol](that, context) {\n return (hasTag(that, 7 /* ParseErrorTag.Refinement */) &&\n context.comparator(this.ast, that.ast) &&\n context.comparator(this.actual, that.actual) &&\n context.comparator(this.kind, that.kind) &&\n context.comparator(this.error, that.error));\n }\n}\n/**\n * @tsplus static fncts.schema.ParseError.RefinementError __call\n * @tsplus static fncts.schema.ParseErrorOps RefinementError\n */\nexport function refinementError(ast, actual, kind, error) {\n return new RefinementError(ast, actual, kind, error);\n}\n/**\n * @tsplus companion fncts.schema.ParseError.TransformationError\n */\nexport class TransformationError {\n ast;\n actual;\n kind;\n error;\n _tag = 8 /* ParseErrorTag.Transformation */;\n constructor(ast, actual, kind, error) {\n this.ast = ast;\n this.actual = actual;\n this.kind = kind;\n this.error = error;\n }\n [tsplus_module_1.equalsSymbol](that, context) {\n return (hasTag(that, 8 /* ParseErrorTag.Transformation */) &&\n context.comparator(this.ast, that.ast) &&\n context.comparator(this.actual, that.actual) &&\n context.comparator(this.kind, that.kind) &&\n context.comparator(this.error, that.error));\n }\n}\n/**\n * @tsplus static fncts.schema.ParseError.TransformationError __call\n * @tsplus static fncts.schema.ParseErrorOps TransformationError\n */\nexport function transformationError(ast, actual, kind, error) {\n return new TransformationError(ast, actual, kind, error);\n}\n/**\n * @tsplus companion fncts.schema.ParseError.IterableError\n */\nexport class IterableError {\n ast;\n actual;\n errors;\n _tag = 12 /* ParseErrorTag.Iterable */;\n constructor(ast, actual, errors) {\n this.ast = ast;\n this.actual = actual;\n this.errors = errors;\n }\n [tsplus_module_1.equalsSymbol](that, context) {\n return (hasTag(that, 12 /* ParseErrorTag.Iterable */) &&\n context.comparator(this.ast, that.ast) &&\n context.comparator(this.actual, that.actual) &&\n context.comparator(this.errors, that.errors));\n }\n}\n/**\n * @tsplus static fncts.schema.ParseError.IterableError __call\n * @tsplus static fncts.schema.ParseErrorOps IterableError\n */\nexport function iterableError(ast, actual, errors) {\n return new IterableError(ast, actual, errors);\n}\n//# sourceMappingURL=ParseError.js.map"],"mappings":";;AACA,SAAS,OAAO,GAAG,KAAK;AACpB,QAAO,OAAO,MAAM,YAAY,MAAM,QAAQ,UAAU,KAAK,EAAE,SAAS;;;;;AAK5E,IAAa,mBAAb,MAA8B;CAC1B;CACA;CACA;CACA,OAAO;CACP,YAAY,KAAK,QAAQ,OAAO;AAC5B,OAAK,MAAM;AACX,OAAK,SAAS;AACd,OAAK,QAAQ;;CAEjB,CAAC,gBAAgB,cAAc,MAAM,SAAS;AAC1C,SAAQ,OAAO,MAAM,EAAkC,IACnD,QAAQ,WAAW,KAAK,KAAK,KAAK,IAAI,IACtC,QAAQ,WAAW,KAAK,QAAQ,KAAK,OAAO,IAC5C,QAAQ,WAAW,KAAK,OAAO,KAAK,MAAM;;;;;;;AAOtD,SAAgB,iBAAiB,KAAK,QAAQ,OAAO;AACjD,QAAO,IAAI,iBAAiB,KAAK,QAAQ,MAAM;;;;;AAKnD,IAAa,YAAb,MAAuB;CACnB;CACA;CACA,OAAO;CACP,YAAY,KAAK,QAAQ;AACrB,OAAK,MAAM;AACX,OAAK,SAAS;;CAElB,CAAC,gBAAgB,cAAc,MAAM,SAAS;AAC1C,SAAQ,OAAO,MAAM,EAA2B,IAC5C,QAAQ,WAAW,KAAK,KAAK,KAAK,IAAI,IACtC,QAAQ,WAAW,KAAK,QAAQ,KAAK,OAAO;;;;;;;AAOxD,SAAgB,UAAU,UAAU,QAAQ;AACxC,QAAO,IAAI,UAAU,UAAU,OAAO;;;;;AAK1C,IAAa,mBAAb,MAA8B;CAC1B;CACA;CACA;CACA;CACA,OAAO;CACP,YAAY,KAAK,QAAQ,QAAQ,SAAS,EAAE,EAAE;AAC1C,OAAK,MAAM;AACX,OAAK,SAAS;AACd,OAAK,SAAS;AACd,OAAK,SAAS;;CAElB,CAAC,gBAAgB,cAAc,MAAM,SAAS;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