pareto 0.80.43 → 0.80.44
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/dist/implementation/manual/transformers/implementation/serialized_typescript.d.ts +1 -1
- package/dist/implementation/manual/transformers/implementation/serialized_typescript.js +4 -4
- package/dist/implementation/manual/transformers/implementation/typescript.d.ts +1 -1
- package/dist/implementation/manual/transformers/implementation/typescript.js +224 -224
- package/dist/implementation/manual/transformers/interface/serialized_typescript.d.ts +1 -1
- package/dist/implementation/manual/transformers/interface/serialized_typescript.js +4 -4
- package/dist/implementation/manual/transformers/interface/typescript.d.ts +1 -1
- package/dist/implementation/manual/transformers/interface/typescript.js +106 -106
- package/dist/implementation/manual/transformers/library/typescript.d.ts +1 -1
- package/dist/implementation/manual/transformers/library/typescript.js +2 -2
- package/dist/interface/{to_be_generated → data}/pareto_to_typescript.js +1 -1
- package/dist/interface/generated/liana/schemas/implementation/data/unresolved.d.ts +1 -1
- package/dist/interface/generated/liana/schemas/implementation/signatures/resolved/refiners/unresolved.d.ts +1 -1
- package/dist/interface/generated/liana/schemas/implementation/signatures/unresolved/refiners/astn_parse_tree.d.ts +1 -1
- package/dist/interface/generated/liana/schemas/implementation/signatures/unresolved/refiners/list_of_characters.d.ts +1 -1
- package/dist/interface/generated/liana/schemas/interface/data/unresolved.d.ts +1 -1
- package/dist/interface/generated/liana/schemas/interface/signatures/resolved/refiners/unresolved.d.ts +1 -1
- package/dist/interface/generated/liana/schemas/interface/signatures/unresolved/refiners/astn_parse_tree.d.ts +1 -1
- package/dist/interface/generated/liana/schemas/interface/signatures/unresolved/refiners/list_of_characters.d.ts +1 -1
- package/dist/interface/generated/liana/schemas/typescript_light/signatures/refiners/astn_parse_tree.d.ts +1 -1
- package/dist/interface/generated/liana/schemas/typescript_light/signatures/refiners/list_of_characters.d.ts +1 -1
- package/dist/modules/typescript_light/implementation/manual/transformers/text/identifier.js +2 -2
- package/dist/modules/typescript_light/implementation/manual/transformers/typescript_light/fountain_pen.d.ts +1 -1
- package/dist/modules/typescript_light/implementation/manual/transformers/typescript_light/fountain_pen.js +108 -108
- package/dist/modules/typescript_light/shorthands/typescript_light.js +1 -1
- package/dist/shorthands/implementation.d.ts +28 -28
- package/dist/shorthands/implementation.js +45 -45
- package/dist/shorthands/interface.d.ts +12 -12
- package/dist/shorthands/interface.js +20 -20
- package/package.json +1 -1
- /package/dist/interface/{to_be_generated → data}/pareto_to_typescript.d.ts +0 -0
|
@@ -37,7 +37,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.Select_Lookup = exports.Select_Value = exports.reduce = exports.Assign = exports.Temp_Value_Type_Specification = exports.Package_Set = void 0;
|
|
40
|
-
const
|
|
40
|
+
const p_ = __importStar(require("pareto-core/dist/implementation/transformer"));
|
|
41
41
|
const implement_me_1 = __importDefault(require("pareto-core-dev/dist/implement_me"));
|
|
42
42
|
const variables_1 = __importDefault(require("pareto-core/dist/implementation/specials/variables"));
|
|
43
43
|
//shorthands
|
|
@@ -55,10 +55,10 @@ const join = ($) => {
|
|
|
55
55
|
const temp_rename = ($, abort) => {
|
|
56
56
|
const renamed = {};
|
|
57
57
|
$.__d_map(($, id) => {
|
|
58
|
-
const new_id =
|
|
58
|
+
const new_id = p_.decide.state($, ($) => {
|
|
59
59
|
switch ($[0]) {
|
|
60
|
-
case 'package': return
|
|
61
|
-
case 'set': return
|
|
60
|
+
case 'package': return p_.ss($, ($) => id + ".ts");
|
|
61
|
+
case 'set': return p_.ss($, ($) => {
|
|
62
62
|
const ends_with_ts = ($s) => {
|
|
63
63
|
return false; //implement properly later
|
|
64
64
|
};
|
|
@@ -67,19 +67,19 @@ const temp_rename = ($, abort) => {
|
|
|
67
67
|
}
|
|
68
68
|
return id;
|
|
69
69
|
});
|
|
70
|
-
default: return
|
|
70
|
+
default: return p_.au($[0]);
|
|
71
71
|
}
|
|
72
72
|
});
|
|
73
73
|
renamed[new_id] = $;
|
|
74
74
|
return null;
|
|
75
75
|
});
|
|
76
|
-
return
|
|
76
|
+
return p_.literal.dictionary(renamed);
|
|
77
77
|
};
|
|
78
78
|
const Package_Set = ($, abort) => {
|
|
79
|
-
return temp_rename($, abort).__d_map(($, id) =>
|
|
79
|
+
return temp_rename($, abort).__d_map(($, id) => p_.decide.state($, ($) => {
|
|
80
80
|
switch ($[0]) {
|
|
81
|
-
case 'package': return
|
|
82
|
-
const y =
|
|
81
|
+
case 'package': return p_.ss($, ($) => {
|
|
82
|
+
const y = p_.literal.nested_list([
|
|
83
83
|
[
|
|
84
84
|
sh.s.import_namespace(sh.identifier_raw("pt"), sh.string_literal("pareto-core/dist/assign", 'apostrophe')),
|
|
85
85
|
],
|
|
@@ -109,11 +109,11 @@ const Package_Set = ($, abort) => {
|
|
|
109
109
|
$.specials['variables']
|
|
110
110
|
? [sh.s.import_default(sh.identifier_raw("p_variables"), sh.string_literal("pareto-core/dist/specials/variables", 'apostrophe'))]
|
|
111
111
|
: [],
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
p_.list.from.dictionary($['type imports']).convert(($, id) => sh.s.import_namespace(sh.identifier_escaped(join(p_.literal.list(["t ", id]))), (0, typescript_1.temp_create_file_path)($, 'quote'))),
|
|
113
|
+
p_.list.from.dictionary($['variable imports']).convert(($, id) => sh.s.import_namespace(sh.identifier_escaped(join(p_.literal.list(["v ", id]))), (0, typescript_1.temp_create_file_path)($, 'quote'))),
|
|
114
|
+
p_.list.from.dictionary($.functions).convert(($, id) => sh.s.variable(true, true, sh.identifier_escaped(id), sh.t.type_reference(sh.identifier_escaped("t " + $.type.import), p_.literal.list([
|
|
115
115
|
sh.identifier_escaped($.type.type)
|
|
116
|
-
]), []), sh.e.arrow_function_with_expression(
|
|
116
|
+
]), []), sh.e.arrow_function_with_expression(p_.literal.nested_list([
|
|
117
117
|
[
|
|
118
118
|
sh.parameter(sh.identifier_raw("$"), null),
|
|
119
119
|
],
|
|
@@ -136,8 +136,8 @@ const Package_Set = ($, abort) => {
|
|
|
136
136
|
]);
|
|
137
137
|
return sh.n.file(y);
|
|
138
138
|
});
|
|
139
|
-
case 'set': return
|
|
140
|
-
default: return
|
|
139
|
+
case 'set': return p_.ss($, ($) => ['directory', (0, exports.Package_Set)($, abort)]);
|
|
140
|
+
default: return p_.au($[0]);
|
|
141
141
|
}
|
|
142
142
|
}));
|
|
143
143
|
};
|
|
@@ -145,18 +145,18 @@ exports.Package_Set = Package_Set;
|
|
|
145
145
|
const Temp_Value_Type_Specification = ($) => {
|
|
146
146
|
return sh.t.type_reference(sh.identifier_escaped("t " + $.type.import),
|
|
147
147
|
//tail
|
|
148
|
-
|
|
149
|
-
|
|
148
|
+
p_.literal.nested_list([
|
|
149
|
+
p_.literal.list([
|
|
150
150
|
sh.identifier_escaped($.type.type)
|
|
151
151
|
]),
|
|
152
|
-
|
|
152
|
+
p_.list.from.list($['sub selection']).flatten(($) => p_.decide.state($, ($) => {
|
|
153
153
|
switch ($[0]) {
|
|
154
|
-
case 'dictionary': return
|
|
155
|
-
case 'group': return
|
|
156
|
-
case 'list': return
|
|
157
|
-
case 'optional': return
|
|
158
|
-
case 'state': return
|
|
159
|
-
default: return
|
|
154
|
+
case 'dictionary': return p_.ss($, ($) => p_.literal.list([sh.identifier_raw("D")]));
|
|
155
|
+
case 'group': return p_.ss($, ($) => p_.literal.list([sh.identifier_escaped($)]));
|
|
156
|
+
case 'list': return p_.ss($, ($) => p_.literal.list([sh.identifier_raw("L")]));
|
|
157
|
+
case 'optional': return p_.ss($, ($) => p_.literal.list([sh.identifier_raw("O")]));
|
|
158
|
+
case 'state': return p_.ss($, ($) => p_.literal.list([sh.identifier_escaped($)]));
|
|
159
|
+
default: return p_.au($[0]);
|
|
160
160
|
}
|
|
161
161
|
})),
|
|
162
162
|
]),
|
|
@@ -164,36 +164,36 @@ const Temp_Value_Type_Specification = ($) => {
|
|
|
164
164
|
[]);
|
|
165
165
|
};
|
|
166
166
|
exports.Temp_Value_Type_Specification = Temp_Value_Type_Specification;
|
|
167
|
-
const Assign = ($) =>
|
|
167
|
+
const Assign = ($) => p_.decide.state($, ($) => {
|
|
168
168
|
switch ($[0]) {
|
|
169
|
-
case 'decide': return
|
|
169
|
+
case 'decide': return p_.ss($, ($) => (0, variables_1.default)(() => {
|
|
170
170
|
const selection = (0, exports.Select_Value)($.source);
|
|
171
|
-
return
|
|
171
|
+
return p_.decide.state($.type, ($) => {
|
|
172
172
|
switch ($[0]) {
|
|
173
|
-
case 'boolean': return
|
|
174
|
-
case 'optional': return
|
|
173
|
+
case 'boolean': return p_.ss($, ($) => sh.e.conditional(selection, (0, exports.Assign)($['if true']), (0, exports.Assign)($['if false'])));
|
|
174
|
+
case 'optional': return p_.ss($, ($) => sh.e.call(sh.e.property_access(sh.e.property_access(sh.e.identifier_raw("pt"), sh.identifier_raw("decide")), sh.identifier_raw("optional")), [
|
|
175
175
|
selection,
|
|
176
176
|
sh.e.arrow_function_with_expression([
|
|
177
177
|
sh.parameter(sh.identifier_raw("$"), null)
|
|
178
178
|
], $['temp resulting node'].__decide(($) => (0, exports.Temp_Value_Type_Specification)($), () => null), (0, exports.Assign)($['if set'])),
|
|
179
179
|
sh.e.arrow_function_with_expression([], null, (0, exports.Assign)($['if not set'])),
|
|
180
180
|
]));
|
|
181
|
-
case 'state': return
|
|
181
|
+
case 'state': return p_.ss($, ($) => sh.e.call(sh.e.property_access(sh.e.property_access(sh.e.identifier_raw("pt"), sh.identifier_raw("decide")), sh.identifier_raw("state")), [
|
|
182
182
|
selection,
|
|
183
183
|
sh.e.arrow_function_with_block([
|
|
184
184
|
sh.parameter(sh.identifier_raw("$"), null)
|
|
185
185
|
], $['temp resulting node'].__decide(($) => (0, exports.Temp_Value_Type_Specification)($), () => null), [
|
|
186
|
-
sh.s.switch_(sh.e.element_access(sh.e.identifier_raw("$"), sh.e.number_literal(0)),
|
|
187
|
-
|
|
186
|
+
sh.s.switch_(sh.e.element_access(sh.e.identifier_raw("$"), sh.e.number_literal(0)), p_.literal.nested_list([
|
|
187
|
+
p_.decide.state($.type, ($) => {
|
|
188
188
|
switch ($[0]) {
|
|
189
|
-
case 'partial': return
|
|
190
|
-
case 'full': return
|
|
191
|
-
case 'single': return
|
|
189
|
+
case 'partial': return p_.ss($, ($) => $.options);
|
|
190
|
+
case 'full': return p_.ss($, ($) => $.options);
|
|
191
|
+
case 'single': return p_.ss($, ($) => {
|
|
192
192
|
const temp = {};
|
|
193
193
|
temp[$.option] = $['if true'];
|
|
194
|
-
return
|
|
194
|
+
return p_.literal.dictionary(temp);
|
|
195
195
|
});
|
|
196
|
-
default: return
|
|
196
|
+
default: return p_.au($[0]);
|
|
197
197
|
}
|
|
198
198
|
}).__to_list(($, id) => sh.sw.case_(sh.e.string_literal(sh.string_literal(id, 'apostrophe')), [
|
|
199
199
|
sh.s.return_(sh.e.call(sh.e.property_access(sh.e.identifier_raw("pt"), sh.identifier_raw('ss')), [
|
|
@@ -205,14 +205,14 @@ const Assign = ($) => pt.decide.state($, ($) => {
|
|
|
205
205
|
])),
|
|
206
206
|
[
|
|
207
207
|
sh.sw.default_([
|
|
208
|
-
sh.s.return_(
|
|
208
|
+
sh.s.return_(p_.decide.state($.type, ($) => {
|
|
209
209
|
switch ($[0]) {
|
|
210
|
-
case 'partial': return
|
|
211
|
-
case 'full': return
|
|
210
|
+
case 'partial': return p_.ss($, ($) => (0, exports.Assign)($.default));
|
|
211
|
+
case 'full': return p_.ss($, ($) => sh.e.call(sh.e.property_access(sh.e.identifier_raw("pt"), sh.identifier_raw('au')), [
|
|
212
212
|
sh.e.element_access(sh.e.identifier_raw("$"), sh.e.number_literal(0))
|
|
213
213
|
]));
|
|
214
|
-
case 'single': return
|
|
215
|
-
default: return
|
|
214
|
+
case 'single': return p_.ss($, ($) => (0, exports.Assign)($['if false']));
|
|
215
|
+
default: return p_.au($[0]);
|
|
216
216
|
}
|
|
217
217
|
}))
|
|
218
218
|
])
|
|
@@ -220,12 +220,12 @@ const Assign = ($) => pt.decide.state($, ($) => {
|
|
|
220
220
|
]))
|
|
221
221
|
])
|
|
222
222
|
]));
|
|
223
|
-
case 'text': return
|
|
223
|
+
case 'text': return p_.ss($, ($) => sh.e.call(sh.e.property_access(sh.e.property_access(sh.e.identifier_raw("pt"), sh.identifier_raw("decide")), sh.identifier_raw("text")), [
|
|
224
224
|
selection,
|
|
225
225
|
sh.e.arrow_function_with_block([
|
|
226
226
|
sh.parameter(sh.identifier_raw("$t"), null)
|
|
227
227
|
], $['temp resulting node'].__decide(($) => (0, exports.Temp_Value_Type_Specification)($), () => null), [
|
|
228
|
-
sh.s.switch_(sh.e.identifier_raw("$t"),
|
|
228
|
+
sh.s.switch_(sh.e.identifier_raw("$t"), p_.literal.nested_list([
|
|
229
229
|
$.cases.__to_list(($, id) => sh.sw.case_(sh.e.string_literal(sh.string_literal(id, 'apostrophe')), [
|
|
230
230
|
sh.s.return_((0, exports.Assign)($))
|
|
231
231
|
])),
|
|
@@ -237,64 +237,64 @@ const Assign = ($) => pt.decide.state($, ($) => {
|
|
|
237
237
|
]))
|
|
238
238
|
])
|
|
239
239
|
]));
|
|
240
|
-
default: return
|
|
240
|
+
default: return p_.au($[0]);
|
|
241
241
|
}
|
|
242
242
|
});
|
|
243
243
|
}));
|
|
244
|
-
case 'construct': return
|
|
244
|
+
case 'construct': return p_.ss($, ($) => p_.decide.state($, ($) => {
|
|
245
245
|
switch ($[0]) {
|
|
246
|
-
case 'boolean': return
|
|
246
|
+
case 'boolean': return p_.ss($, ($) => p_.decide.state($, ($) => {
|
|
247
247
|
switch ($[0]) {
|
|
248
|
-
case 'from': return
|
|
248
|
+
case 'from': return p_.ss($, ($) => (0, variables_1.default)(() => {
|
|
249
249
|
const selection = (0, exports.Select_Value)($.selection);
|
|
250
|
-
return
|
|
250
|
+
return p_.decide.state($.type, ($) => {
|
|
251
251
|
switch ($[0]) {
|
|
252
|
-
case 'boolean': return
|
|
252
|
+
case 'boolean': return p_.ss($, ($) => p_.decide.state($, ($) => {
|
|
253
253
|
switch ($[0]) {
|
|
254
|
-
case 'not': return
|
|
255
|
-
case 'copy': return
|
|
256
|
-
default: return
|
|
254
|
+
case 'not': return p_.ss($, ($) => sh.e.not(selection));
|
|
255
|
+
case 'copy': return p_.ss($, ($) => selection);
|
|
256
|
+
default: return p_.au($[0]);
|
|
257
257
|
}
|
|
258
258
|
}));
|
|
259
|
-
case 'dictionary': return
|
|
259
|
+
case 'dictionary': return p_.ss($, ($) => p_.decide.state($, ($) => {
|
|
260
260
|
switch ($[0]) {
|
|
261
|
-
case 'is empty': return
|
|
262
|
-
default: return
|
|
261
|
+
case 'is empty': return p_.ss($, ($) => (0, implement_me_1.default)("X1"));
|
|
262
|
+
default: return p_.au($[0]);
|
|
263
263
|
}
|
|
264
264
|
}));
|
|
265
|
-
case 'list': return
|
|
265
|
+
case 'list': return p_.ss($, ($) => p_.decide.state($, ($) => {
|
|
266
266
|
switch ($[0]) {
|
|
267
|
-
case 'is empty': return
|
|
268
|
-
default: return
|
|
267
|
+
case 'is empty': return p_.ss($, ($) => (0, implement_me_1.default)("X2"));
|
|
268
|
+
default: return p_.au($[0]);
|
|
269
269
|
}
|
|
270
270
|
}));
|
|
271
|
-
default: return
|
|
271
|
+
default: return p_.au($[0]);
|
|
272
272
|
}
|
|
273
273
|
});
|
|
274
274
|
}));
|
|
275
|
-
case 'literal': return
|
|
275
|
+
case 'literal': return p_.ss($, ($) => p_.decide.state($, ($) => {
|
|
276
276
|
switch ($[0]) {
|
|
277
|
-
case 'false': return
|
|
278
|
-
case 'true': return
|
|
279
|
-
default: return
|
|
277
|
+
case 'false': return p_.ss($, ($) => sh.e.false_());
|
|
278
|
+
case 'true': return p_.ss($, ($) => sh.e.true_());
|
|
279
|
+
default: return p_.au($[0]);
|
|
280
280
|
}
|
|
281
281
|
}));
|
|
282
|
-
default: return
|
|
282
|
+
default: return p_.au($[0]);
|
|
283
283
|
}
|
|
284
284
|
}));
|
|
285
|
-
case 'dictionary': return
|
|
285
|
+
case 'dictionary': return p_.ss($, ($) => p_.decide.state($, ($) => {
|
|
286
286
|
switch ($[0]) {
|
|
287
|
-
case 'literal': return
|
|
287
|
+
case 'literal': return p_.ss($, ($) => sh.e.call(sh.e.property_access(sh.e.property_access(sh.e.identifier_raw("pt"), sh.identifier_raw("dictionary")), sh.identifier_raw("literal")), [
|
|
288
288
|
sh.e.object_literal($.__to_list(($, id) => sh.object_property(id, 'quoted string literal', (0, exports.Assign)($))))
|
|
289
289
|
]));
|
|
290
|
-
case 'from': return
|
|
290
|
+
case 'from': return p_.ss($, ($) => (0, variables_1.default)(() => {
|
|
291
291
|
const selection = (0, exports.Select_Value)($.selection);
|
|
292
|
-
return
|
|
292
|
+
return p_.decide.state($.type, ($) => {
|
|
293
293
|
switch ($[0]) {
|
|
294
|
-
case 'dictionary': return
|
|
294
|
+
case 'dictionary': return p_.ss($, ($) => p_.decide.state($, ($) => {
|
|
295
295
|
switch ($[0]) {
|
|
296
|
-
case 'filter': return
|
|
297
|
-
case 'map': return
|
|
296
|
+
case 'filter': return p_.ss($, ($) => (0, implement_me_1.default)("X5"));
|
|
297
|
+
case 'map': return p_.ss($, ($) => sh.e.call(sh.e.property_access(sh.e.call(sh.e.property_access(sh.e.property_access(sh.e.property_access(sh.e.identifier_raw("pt"), sh.identifier_raw("dictionary")), sh.identifier_raw("from")), sh.identifier_raw("dictionary")), [
|
|
298
298
|
selection,
|
|
299
299
|
]), sh.identifier_raw("map")), [
|
|
300
300
|
sh.e.arrow_function_with_expression([
|
|
@@ -302,7 +302,7 @@ const Assign = ($) => pt.decide.state($, ($) => {
|
|
|
302
302
|
sh.parameter(sh.identifier_raw("id"), null),
|
|
303
303
|
], null, (0, exports.Assign)($['assign entry']))
|
|
304
304
|
]));
|
|
305
|
-
case 'resolve': return
|
|
305
|
+
case 'resolve': return p_.ss($, ($) => sh.e.call(sh.e.property_access(sh.e.call(sh.e.property_access(sh.e.property_access(sh.e.property_access(sh.e.identifier_raw("pt"), sh.identifier_raw("dictionary")), sh.identifier_raw("from")), sh.identifier_raw("dictionary")), [
|
|
306
306
|
selection,
|
|
307
307
|
]), sh.identifier_raw("resolve_static")), [
|
|
308
308
|
sh.e.arrow_function_with_expression([
|
|
@@ -312,29 +312,29 @@ const Assign = ($) => pt.decide.state($, ($) => {
|
|
|
312
312
|
sh.parameter(sh.identifier_raw("$c"), null),
|
|
313
313
|
], (0, exports.Temp_Value_Type_Specification)($['temp resulting entry node']), (0, exports.Assign)($['assign entry']))
|
|
314
314
|
]));
|
|
315
|
-
default: return
|
|
315
|
+
default: return p_.au($[0]);
|
|
316
316
|
}
|
|
317
317
|
}));
|
|
318
|
-
case 'list': return
|
|
318
|
+
case 'list': return p_.ss($, ($) => p_.decide.state($, ($) => {
|
|
319
319
|
switch ($[0]) {
|
|
320
|
-
case 'convert': return
|
|
321
|
-
default: return
|
|
320
|
+
case 'convert': return p_.ss($, ($) => (0, implement_me_1.default)("X6"));
|
|
321
|
+
default: return p_.au($[0]);
|
|
322
322
|
}
|
|
323
323
|
}));
|
|
324
|
-
default: return
|
|
324
|
+
default: return p_.au($[0]);
|
|
325
325
|
}
|
|
326
326
|
});
|
|
327
327
|
}));
|
|
328
|
-
default: return
|
|
328
|
+
default: return p_.au($[0]);
|
|
329
329
|
}
|
|
330
330
|
}));
|
|
331
|
-
case 'group': return
|
|
331
|
+
case 'group': return p_.ss($, ($) => p_.decide.state($, ($) => {
|
|
332
332
|
switch ($[0]) {
|
|
333
|
-
case 'literal': return
|
|
333
|
+
case 'literal': return p_.ss($, ($) => $['have dependencies']
|
|
334
334
|
? $.properties.__get_number_of_entries() === 0
|
|
335
335
|
? sh.e.null_()
|
|
336
336
|
: sh.e.call(sh.e.property_access(sh.e.property_access(sh.e.property_access(sh.e.identifier_raw("pt"), sh.identifier_raw("group")), sh.identifier_raw("literal")), sh.identifier_raw("resolve")), [
|
|
337
|
-
sh.e.arrow_function_with_block([], null,
|
|
337
|
+
sh.e.arrow_function_with_block([], null, p_.literal.nested_list([
|
|
338
338
|
$.properties.__to_list(($, id) => sh.s.variable(false, true, sh.identifier_escaped("prop " + id), null, (0, exports.Assign)($))),
|
|
339
339
|
[
|
|
340
340
|
sh.s.return_(sh.e.object_literal($.properties.__to_list(($, id) => sh.object_property(id, 'apostrophized string literal', sh.e.identifier_escaped("prop " + id)))))
|
|
@@ -344,35 +344,35 @@ const Assign = ($) => pt.decide.state($, ($) => {
|
|
|
344
344
|
: $.properties.__get_number_of_entries() === 0
|
|
345
345
|
? sh.e.null_()
|
|
346
346
|
: sh.e.object_literal($.properties.__to_list(($, id) => sh.object_property(id, 'apostrophized string literal', (0, exports.Assign)($)))));
|
|
347
|
-
default: return
|
|
347
|
+
default: return p_.au($[0]);
|
|
348
348
|
}
|
|
349
349
|
}));
|
|
350
|
-
case 'list': return
|
|
350
|
+
case 'list': return p_.ss($, ($) => p_.decide.state($, ($) => {
|
|
351
351
|
switch ($[0]) {
|
|
352
|
-
case 'literal': return
|
|
352
|
+
case 'literal': return p_.ss($, ($) => sh.e.call(sh.e.property_access(sh.e.property_access(sh.e.identifier_raw("pt"), sh.identifier_raw("list")), sh.identifier_raw("literal")), [
|
|
353
353
|
sh.e.array_literal($.__l_map(($) => (0, exports.Assign)($)))
|
|
354
354
|
]));
|
|
355
|
-
case 'from': return
|
|
355
|
+
case 'from': return p_.ss($, ($) => (0, variables_1.default)(() => {
|
|
356
356
|
const selection = (0, exports.Select_Value)($.selection);
|
|
357
|
-
return
|
|
357
|
+
return p_.decide.state($.type, ($) => {
|
|
358
358
|
switch ($[0]) {
|
|
359
|
-
case 'dictionary': return
|
|
359
|
+
case 'dictionary': return p_.ss($, ($) => p_.decide.state($, ($) => {
|
|
360
360
|
switch ($[0]) {
|
|
361
|
-
case 'convert': return
|
|
362
|
-
default: return
|
|
361
|
+
case 'convert': return p_.ss($, ($) => (0, implement_me_1.default)("X9"));
|
|
362
|
+
default: return p_.au($[0]);
|
|
363
363
|
}
|
|
364
364
|
}));
|
|
365
|
-
case 'list': return
|
|
365
|
+
case 'list': return p_.ss($, ($) => p_.decide.state($, ($) => {
|
|
366
366
|
switch ($[0]) {
|
|
367
|
-
case 'filter': return
|
|
368
|
-
case 'map': return
|
|
367
|
+
case 'filter': return p_.ss($, ($) => (0, implement_me_1.default)("X8"));
|
|
368
|
+
case 'map': return p_.ss($, ($) => sh.e.call(sh.e.property_access(sh.e.call(sh.e.property_access(sh.e.property_access(sh.e.property_access(sh.e.identifier_raw("pt"), sh.identifier_raw("list")), sh.identifier_raw("from")), sh.identifier_raw("list")), [
|
|
369
369
|
selection,
|
|
370
370
|
]), sh.identifier_raw("map")), [
|
|
371
371
|
sh.e.arrow_function_with_expression([
|
|
372
372
|
sh.parameter(sh.identifier_raw("$"), null)
|
|
373
373
|
], null, (0, exports.Assign)($['assign item']))
|
|
374
374
|
]));
|
|
375
|
-
case 'map with state': return
|
|
375
|
+
case 'map with state': return p_.ss($, ($) => sh.e.call(sh.e.property_access(sh.e.property_access(sh.e.identifier_raw("pt"), sh.identifier_raw("list")), sh.identifier_raw("map_with_state")), [
|
|
376
376
|
selection,
|
|
377
377
|
(0, exports.Assign)($['initialize state']),
|
|
378
378
|
sh.e.arrow_function_with_expression([
|
|
@@ -387,163 +387,163 @@ const Assign = ($) => pt.decide.state($, ($) => {
|
|
|
387
387
|
sh.parameter(sh.identifier_raw("state"), null),
|
|
388
388
|
], null, (0, exports.Assign)($['wrap up'])),
|
|
389
389
|
]));
|
|
390
|
-
case 'reduce': return
|
|
391
|
-
case 'reverse': return
|
|
392
|
-
default: return
|
|
390
|
+
case 'reduce': return p_.ss($, ($) => (0, implement_me_1.default)("X11"));
|
|
391
|
+
case 'reverse': return p_.ss($, ($) => (0, implement_me_1.default)("X12"));
|
|
392
|
+
default: return p_.au($[0]);
|
|
393
393
|
}
|
|
394
394
|
}));
|
|
395
|
-
default: return
|
|
395
|
+
default: return p_.au($[0]);
|
|
396
396
|
}
|
|
397
397
|
});
|
|
398
398
|
}));
|
|
399
|
-
default: return
|
|
399
|
+
default: return p_.au($[0]);
|
|
400
400
|
}
|
|
401
401
|
}));
|
|
402
|
-
case 'nothing': return
|
|
403
|
-
case 'number': return
|
|
402
|
+
case 'nothing': return p_.ss($, ($) => sh.e.null_());
|
|
403
|
+
case 'number': return p_.ss($, ($) => p_.decide.state($, ($) => {
|
|
404
404
|
switch ($[0]) {
|
|
405
|
-
case 'approximation': return
|
|
405
|
+
case 'approximation': return p_.ss($, ($) => p_.decide.state($, ($) => {
|
|
406
406
|
switch ($[0]) {
|
|
407
|
-
case 'literal': return
|
|
408
|
-
case 'copy': return
|
|
409
|
-
default: return
|
|
407
|
+
case 'literal': return p_.ss($, ($) => sh.e.number_literal($));
|
|
408
|
+
case 'copy': return p_.ss($, ($) => (0, exports.Select_Value)($));
|
|
409
|
+
default: return p_.au($[0]);
|
|
410
410
|
}
|
|
411
411
|
}));
|
|
412
|
-
case 'integer': return
|
|
412
|
+
case 'integer': return p_.ss($, ($) => p_.decide.state($, ($) => {
|
|
413
413
|
switch ($[0]) {
|
|
414
|
-
case 'copy': return
|
|
415
|
-
case 'divide': return
|
|
416
|
-
case 'literal': return
|
|
417
|
-
default: return
|
|
414
|
+
case 'copy': return p_.ss($, ($) => (0, exports.Select_Value)($));
|
|
415
|
+
case 'divide': return p_.ss($, ($) => (0, implement_me_1.default)("X17"));
|
|
416
|
+
case 'literal': return p_.ss($, ($) => sh.e.number_literal($));
|
|
417
|
+
default: return p_.au($[0]);
|
|
418
418
|
}
|
|
419
419
|
}));
|
|
420
|
-
case 'natural': return
|
|
420
|
+
case 'natural': return p_.ss($, ($) => p_.decide.state($, ($) => {
|
|
421
421
|
switch ($[0]) {
|
|
422
|
-
case 'copy': return
|
|
423
|
-
case 'literal': return
|
|
424
|
-
case 'number of dictionary entries': return
|
|
425
|
-
case 'number of list items': return
|
|
426
|
-
case 'source column': return
|
|
427
|
-
case 'source line': return
|
|
428
|
-
default: return
|
|
422
|
+
case 'copy': return p_.ss($, ($) => (0, exports.Select_Value)($));
|
|
423
|
+
case 'literal': return p_.ss($, ($) => sh.e.number_literal($));
|
|
424
|
+
case 'number of dictionary entries': return p_.ss($, ($) => (0, implement_me_1.default)("X13"));
|
|
425
|
+
case 'number of list items': return p_.ss($, ($) => (0, implement_me_1.default)("X14"));
|
|
426
|
+
case 'source column': return p_.ss($, ($) => (0, implement_me_1.default)("X15"));
|
|
427
|
+
case 'source line': return p_.ss($, ($) => (0, implement_me_1.default)("X16"));
|
|
428
|
+
default: return p_.au($[0]);
|
|
429
429
|
}
|
|
430
430
|
}));
|
|
431
|
-
default: return
|
|
431
|
+
default: return p_.au($[0]);
|
|
432
432
|
}
|
|
433
433
|
}));
|
|
434
|
-
case 'optional': return
|
|
434
|
+
case 'optional': return p_.ss($, ($) => p_.decide.state($, ($) => {
|
|
435
435
|
switch ($[0]) {
|
|
436
|
-
case 'literal': return
|
|
436
|
+
case 'literal': return p_.ss($, ($) => p_.decide.state($, ($) => {
|
|
437
437
|
switch ($[0]) {
|
|
438
|
-
case 'not set': return
|
|
439
|
-
case 'set': return
|
|
438
|
+
case 'not set': return p_.ss($, ($) => sh.e.call(sh.e.property_access(sh.e.property_access(sh.e.property_access(sh.e.identifier_raw("pt"), sh.identifier_raw("optional")), sh.identifier_raw("literal")), sh.identifier_raw("not_set")), []));
|
|
439
|
+
case 'set': return p_.ss($, ($) => sh.e.call(sh.e.property_access(sh.e.property_access(sh.e.property_access(sh.e.identifier_raw("pt"), sh.identifier_raw("optional")), sh.identifier_raw("literal")), sh.identifier_raw("set")), [
|
|
440
440
|
(0, exports.Assign)($),
|
|
441
441
|
]));
|
|
442
|
-
default: return
|
|
442
|
+
default: return p_.au($[0]);
|
|
443
443
|
}
|
|
444
444
|
}));
|
|
445
|
-
case 'from': return
|
|
445
|
+
case 'from': return p_.ss($, ($) => (0, variables_1.default)(() => {
|
|
446
446
|
const selection = (0, exports.Select_Value)($.selection);
|
|
447
|
-
return
|
|
447
|
+
return p_.decide.state($.type, ($) => {
|
|
448
448
|
switch ($[0]) {
|
|
449
|
-
case 'boolean': return
|
|
449
|
+
case 'boolean': return p_.ss($, ($) => p_.decide.state($, ($) => {
|
|
450
450
|
switch ($[0]) {
|
|
451
|
-
case 'convert': return
|
|
452
|
-
default: return
|
|
451
|
+
case 'convert': return p_.ss($, ($) => (0, implement_me_1.default)("X18"));
|
|
452
|
+
default: return p_.au($[0]);
|
|
453
453
|
}
|
|
454
454
|
}));
|
|
455
|
-
case 'optional': return
|
|
455
|
+
case 'optional': return p_.ss($, ($) => p_.decide.state($, ($) => {
|
|
456
456
|
switch ($[0]) {
|
|
457
|
-
case 'map': return
|
|
457
|
+
case 'map': return p_.ss($, ($) => sh.e.call(sh.e.property_access(sh.e.call(sh.e.property_access(sh.e.property_access(sh.e.property_access(sh.e.identifier_raw("pt"), sh.identifier_raw("optional")), sh.identifier_raw("from")), sh.identifier_raw("optional")), [
|
|
458
458
|
selection,
|
|
459
459
|
]), sh.identifier_raw("map")), [
|
|
460
460
|
sh.e.arrow_function_with_expression([
|
|
461
461
|
sh.parameter(sh.identifier_raw("$"), null)
|
|
462
462
|
], null, (0, exports.Assign)($['assign set'])),
|
|
463
463
|
]));
|
|
464
|
-
default: return
|
|
464
|
+
default: return p_.au($[0]);
|
|
465
465
|
}
|
|
466
466
|
}));
|
|
467
|
-
default: return
|
|
467
|
+
default: return p_.au($[0]);
|
|
468
468
|
}
|
|
469
469
|
});
|
|
470
470
|
}));
|
|
471
|
-
default: return
|
|
471
|
+
default: return p_.au($[0]);
|
|
472
472
|
}
|
|
473
473
|
}));
|
|
474
|
-
case 'state': return
|
|
474
|
+
case 'state': return p_.ss($, ($) => p_.decide.state($, ($) => {
|
|
475
475
|
switch ($[0]) {
|
|
476
|
-
case 'literal': return
|
|
476
|
+
case 'literal': return p_.ss($, ($) => sh.e.array_literal([
|
|
477
477
|
sh.e.string_literal(sh.string_literal($.option, 'apostrophe')),
|
|
478
478
|
(0, exports.Assign)($['assign option'])
|
|
479
479
|
]));
|
|
480
|
-
default: return
|
|
480
|
+
default: return p_.au($[0]);
|
|
481
481
|
}
|
|
482
482
|
}));
|
|
483
|
-
case 'text': return
|
|
483
|
+
case 'text': return p_.ss($, ($) => p_.decide.state($, ($) => {
|
|
484
484
|
switch ($[0]) {
|
|
485
|
-
case 'literal': return
|
|
485
|
+
case 'literal': return p_.ss($, ($) => sh.e.string_literal(sh.string_literal($.value, p_.decide.state($.type, ($) => {
|
|
486
486
|
switch ($[0]) {
|
|
487
|
-
case 'freeform': return
|
|
488
|
-
case 'identifier': return
|
|
489
|
-
default: return
|
|
487
|
+
case 'freeform': return p_.ss($, ($) => 'quote');
|
|
488
|
+
case 'identifier': return p_.ss($, ($) => 'apostrophe');
|
|
489
|
+
default: return p_.au($[0]);
|
|
490
490
|
}
|
|
491
491
|
}))));
|
|
492
|
-
case 'from': return
|
|
492
|
+
case 'from': return p_.ss($, ($) => (0, variables_1.default)(() => {
|
|
493
493
|
const selection = (0, exports.Select_Value)($.selection);
|
|
494
|
-
return
|
|
494
|
+
return p_.decide.state($.type, ($) => {
|
|
495
495
|
switch ($[0]) {
|
|
496
|
-
case 'text': return
|
|
496
|
+
case 'text': return p_.ss($, ($) => p_.decide.state($, ($) => {
|
|
497
497
|
switch ($[0]) {
|
|
498
|
-
case 'copy': return
|
|
499
|
-
default: return
|
|
498
|
+
case 'copy': return p_.ss($, ($) => selection);
|
|
499
|
+
default: return p_.au($[0]);
|
|
500
500
|
}
|
|
501
501
|
}));
|
|
502
|
-
default: return
|
|
502
|
+
default: return p_.au($[0]);
|
|
503
503
|
}
|
|
504
504
|
});
|
|
505
505
|
}));
|
|
506
|
-
case 'source document': return
|
|
507
|
-
case 'entry id': return
|
|
508
|
-
case 'option name': return
|
|
509
|
-
default: return
|
|
506
|
+
case 'source document': return p_.ss($, ($) => (0, implement_me_1.default)("X20"));
|
|
507
|
+
case 'entry id': return p_.ss($, ($) => sh.e.identifier_raw("id"));
|
|
508
|
+
case 'option name': return p_.ss($, ($) => sh.e.identifier_raw("$[0]"));
|
|
509
|
+
default: return p_.au($[0]);
|
|
510
510
|
}
|
|
511
511
|
}));
|
|
512
|
-
default: return
|
|
512
|
+
default: return p_.au($[0]);
|
|
513
513
|
}
|
|
514
514
|
}));
|
|
515
|
-
case 'select': return
|
|
516
|
-
case 'special': return
|
|
515
|
+
case 'select': return p_.ss($, ($) => (0, exports.Select_Value)($));
|
|
516
|
+
case 'special': return p_.ss($, ($) => p_.decide.state($, ($) => {
|
|
517
517
|
switch ($[0]) {
|
|
518
|
-
case 'assert': return
|
|
519
|
-
case 'abort': return
|
|
518
|
+
case 'assert': return p_.ss($, ($) => (0, implement_me_1.default)("X22"));
|
|
519
|
+
case 'abort': return p_.ss($, ($) => sh.e.call(sh.e.identifier_raw("abort"), [
|
|
520
520
|
(0, exports.Assign)($)
|
|
521
521
|
]));
|
|
522
|
-
case 'change context': return
|
|
522
|
+
case 'change context': return p_.ss($, ($) => sh.e.call(sh.e.identifier_raw("p_change_context"), [
|
|
523
523
|
(0, exports.Select_Value)($['new context']),
|
|
524
524
|
sh.e.arrow_function_with_expression([
|
|
525
525
|
sh.parameter(sh.identifier_raw("$"), null)
|
|
526
526
|
], null, (0, exports.Assign)($['expression']))
|
|
527
527
|
]));
|
|
528
|
-
case 'implement me': return
|
|
528
|
+
case 'implement me': return p_.ss($, ($) => sh.e.call(sh.e.property_access(sh.e.identifier_raw("_pdev"), sh.identifier_raw("implement_me")), [
|
|
529
529
|
sh.e.string_literal(sh.string_literal($, 'quote'))
|
|
530
530
|
]));
|
|
531
|
-
case 'iterate': return
|
|
532
|
-
case 'unreachable': return
|
|
531
|
+
case 'iterate': return p_.ss($, ($) => (0, implement_me_1.default)("X23"));
|
|
532
|
+
case 'unreachable': return p_.ss($, ($) => sh.e.call(sh.e.identifier_raw("p_unreachable_code_path"), [
|
|
533
533
|
sh.e.string_literal(sh.string_literal($.explanation, 'quote'))
|
|
534
534
|
]));
|
|
535
|
-
case 'variables': return
|
|
536
|
-
sh.e.arrow_function_with_block([], null,
|
|
535
|
+
case 'variables': return p_.ss($, ($) => sh.e.call(sh.e.identifier_raw("p_variables"), [
|
|
536
|
+
sh.e.arrow_function_with_block([], null, p_.literal.nested_list([
|
|
537
537
|
$.variables.__to_list(($, id) => sh.s.variable(false, true, sh.identifier_escaped("var " + id), null, (0, exports.Assign)($))),
|
|
538
538
|
[
|
|
539
539
|
sh.s.return_((0, exports.Assign)($.assign))
|
|
540
540
|
]
|
|
541
541
|
]))
|
|
542
542
|
]));
|
|
543
|
-
default: return
|
|
543
|
+
default: return p_.au($[0]);
|
|
544
544
|
}
|
|
545
545
|
}));
|
|
546
|
-
default: return
|
|
546
|
+
default: return p_.au($[0]);
|
|
547
547
|
}
|
|
548
548
|
});
|
|
549
549
|
exports.Assign = Assign;
|
|
@@ -556,63 +556,63 @@ const reduce = ($, initial_state, update_state) => {
|
|
|
556
556
|
return current_state;
|
|
557
557
|
};
|
|
558
558
|
exports.reduce = reduce;
|
|
559
|
-
const Select_Value = ($) =>
|
|
559
|
+
const Select_Value = ($) => p_.decide.state($, ($) => {
|
|
560
560
|
switch ($[0]) {
|
|
561
|
-
case 'implement me': return
|
|
561
|
+
case 'implement me': return p_.ss($, ($) => sh.e.call(sh.e.property_access(sh.e.identifier_raw("_pdev"), sh.identifier_raw("implement_me")), [
|
|
562
562
|
sh.e.string_literal(sh.string_literal($, 'quote'))
|
|
563
563
|
]));
|
|
564
|
-
case 'regular': return
|
|
564
|
+
case 'regular': return p_.ss($, ($) => (0, exports.reduce)($.tail, p_.decide.state($.start, ($) => {
|
|
565
565
|
switch ($[0]) {
|
|
566
|
-
case 'call': return
|
|
566
|
+
case 'call': return p_.ss($, ($) => sh.e.call(p_.decide.state($.source, ($) => {
|
|
567
567
|
switch ($[0]) {
|
|
568
|
-
case 'local': return
|
|
569
|
-
case 'imported': return
|
|
570
|
-
default: return
|
|
568
|
+
case 'local': return p_.ss($, ($) => sh.e.identifier_escaped($));
|
|
569
|
+
case 'imported': return p_.ss($, ($) => sh.e.property_access(sh.e.identifier_escaped(join(p_.literal.list(["v ", $.import]))), sh.identifier_escaped($.variable)));
|
|
570
|
+
default: return p_.au($[0]);
|
|
571
571
|
}
|
|
572
|
-
}),
|
|
572
|
+
}), p_.literal.nested_list([
|
|
573
573
|
[
|
|
574
574
|
(0, exports.Assign)($.context),
|
|
575
575
|
],
|
|
576
|
-
$.abort.__decide(($) =>
|
|
576
|
+
$.abort.__decide(($) => p_.literal.list([
|
|
577
577
|
sh.e.arrow_function_with_expression([
|
|
578
578
|
sh.parameter(sh.identifier_raw("$"), null)
|
|
579
579
|
], null, sh.e.call(sh.e.identifier_raw("abort"), [
|
|
580
580
|
(0, exports.Assign)($)
|
|
581
581
|
]))
|
|
582
|
-
]), () =>
|
|
583
|
-
$.lookups.__decide(($) =>
|
|
582
|
+
]), () => p_.literal.list([])),
|
|
583
|
+
$.lookups.__decide(($) => p_.decide.state($, ($) => {
|
|
584
584
|
switch ($[0]) {
|
|
585
|
-
case 'initialize': return
|
|
586
|
-
?
|
|
585
|
+
case 'initialize': return p_.ss($, ($) => p_.boolean.from.dictionary($).is_empty()
|
|
586
|
+
? p_.literal.list([
|
|
587
587
|
sh.e.null_(),
|
|
588
588
|
])
|
|
589
|
-
:
|
|
589
|
+
: p_.literal.list([
|
|
590
590
|
sh.e.object_literal($.__to_list(($, id) => sh.object_property(id, 'apostrophized string literal', (0, exports.Select_Lookup)($))))
|
|
591
591
|
]));
|
|
592
|
-
case 'pass through': return
|
|
592
|
+
case 'pass through': return p_.ss($, ($) => p_.literal.list([
|
|
593
593
|
sh.e.identifier_raw("$l")
|
|
594
594
|
]));
|
|
595
|
-
default: return
|
|
595
|
+
default: return p_.au($[0]);
|
|
596
596
|
}
|
|
597
|
-
}), () =>
|
|
598
|
-
$.arguments.__decide(($) =>
|
|
597
|
+
}), () => p_.literal.list([])),
|
|
598
|
+
$.arguments.__decide(($) => p_.decide.state($, ($) => {
|
|
599
599
|
switch ($[0]) {
|
|
600
|
-
case 'initialize': return
|
|
601
|
-
?
|
|
600
|
+
case 'initialize': return p_.ss($, ($) => p_.boolean.from.dictionary($).is_empty()
|
|
601
|
+
? p_.literal.list([
|
|
602
602
|
sh.e.null_(),
|
|
603
603
|
])
|
|
604
|
-
:
|
|
604
|
+
: p_.literal.list([
|
|
605
605
|
sh.e.object_literal($.__to_list(($, id) => sh.object_property(id, 'apostrophized string literal', (0, exports.Assign)($))))
|
|
606
606
|
]));
|
|
607
|
-
case 'pass through': return
|
|
607
|
+
case 'pass through': return p_.ss($, ($) => p_.literal.list([
|
|
608
608
|
sh.e.identifier_raw("$p")
|
|
609
609
|
]));
|
|
610
|
-
default: return
|
|
610
|
+
default: return p_.au($[0]);
|
|
611
611
|
}
|
|
612
|
-
}), () =>
|
|
612
|
+
}), () => p_.literal.list([])),
|
|
613
613
|
])));
|
|
614
|
-
case 'context': return
|
|
615
|
-
case 'dictionary entry': return
|
|
614
|
+
case 'context': return p_.ss($, ($) => sh.e.identifier_raw("$"));
|
|
615
|
+
case 'dictionary entry': return p_.ss($, ($) => sh.e.call(sh.e.property_access((0, exports.Select_Value)($.dictionary), sh.identifier_raw("__get_entry_deprecated")), [
|
|
616
616
|
(0, exports.Assign)($.id),
|
|
617
617
|
sh.e.object_literal([
|
|
618
618
|
sh.object_property("no_such_entry", 'identifier', sh.e.arrow_function_with_expression([
|
|
@@ -622,17 +622,17 @@ const Select_Value = ($) => pt.decide.state($, ($) => {
|
|
|
622
622
|
])))
|
|
623
623
|
])
|
|
624
624
|
]));
|
|
625
|
-
case 'list from text': return
|
|
625
|
+
case 'list from text': return p_.ss($, ($) => sh.e.call(sh.e.identifier_raw("p_list_from_text"), [
|
|
626
626
|
(0, exports.Select_Value)($.source),
|
|
627
627
|
sh.e.arrow_function_with_expression([
|
|
628
628
|
sh.parameter(sh.identifier_raw("$"), null)
|
|
629
629
|
], null, (0, exports.Assign)($['assign item']))
|
|
630
630
|
]));
|
|
631
|
-
case 'lookup entry': return
|
|
631
|
+
case 'lookup entry': return p_.ss($, ($) => sh.e.call(sh.e.property_access((0, exports.Select_Lookup)($.lookup), sh.identifier_raw("get_entry")), [
|
|
632
632
|
(0, exports.Assign)($.id),
|
|
633
|
-
|
|
633
|
+
p_.decide.state($.type, ($) => {
|
|
634
634
|
switch ($[0]) {
|
|
635
|
-
case 'acyclic': return
|
|
635
|
+
case 'acyclic': return p_.ss($, ($) => sh.e.object_literal([
|
|
636
636
|
sh.object_property("no_such_entry", 'identifier', sh.e.arrow_function_with_expression([], null, sh.e.call(sh.e.identifier_raw("abort"), [
|
|
637
637
|
(0, exports.Assign)($['abort handlers']['no such entry'])
|
|
638
638
|
]))),
|
|
@@ -643,7 +643,7 @@ const Select_Value = ($) => pt.decide.state($, ($) => {
|
|
|
643
643
|
(0, exports.Assign)($['abort handlers']['cycle detected'])
|
|
644
644
|
]))),
|
|
645
645
|
]));
|
|
646
|
-
case 'cyclic': return
|
|
646
|
+
case 'cyclic': return p_.ss($, ($) => sh.e.object_literal([
|
|
647
647
|
sh.object_property("no_such_entry", 'identifier', sh.e.arrow_function_with_expression([], null, sh.e.call(sh.e.identifier_raw("abort"), [
|
|
648
648
|
(0, exports.Assign)($['abort handlers']['no such entry'])
|
|
649
649
|
]))),
|
|
@@ -654,7 +654,7 @@ const Select_Value = ($) => pt.decide.state($, ($) => {
|
|
|
654
654
|
(0, exports.Assign)($['abort handlers']['accessing cyclic sibling before it is resolved'])
|
|
655
655
|
]))),
|
|
656
656
|
]));
|
|
657
|
-
case 'stack': return
|
|
657
|
+
case 'stack': return p_.ss($, ($) => sh.e.object_literal([
|
|
658
658
|
sh.object_property("no_such_entry", 'identifier', sh.e.arrow_function_with_expression([], null, sh.e.call(sh.e.identifier_raw("abort"), [
|
|
659
659
|
(0, exports.Assign)($['abort handlers']['no such entry'])
|
|
660
660
|
]))),
|
|
@@ -665,11 +665,11 @@ const Select_Value = ($) => pt.decide.state($, ($) => {
|
|
|
665
665
|
(0, exports.Assign)($['abort handlers']['cycle detected'])
|
|
666
666
|
]))),
|
|
667
667
|
]));
|
|
668
|
-
default: return
|
|
668
|
+
default: return p_.au($[0]);
|
|
669
669
|
}
|
|
670
670
|
}),
|
|
671
671
|
]));
|
|
672
|
-
case 'lookup entry depth': return
|
|
672
|
+
case 'lookup entry depth': return p_.ss($, ($) => sh.e.call(sh.e.property_access((0, exports.Select_Lookup)($.lookup), sh.identifier_raw("get_entry_depth")), [
|
|
673
673
|
(0, exports.Assign)($.id),
|
|
674
674
|
sh.e.object_literal([
|
|
675
675
|
sh.object_property("no_such_entry", 'identifier', sh.e.arrow_function_with_expression([], null, sh.e.call(sh.e.identifier_raw("abort"), [
|
|
@@ -683,60 +683,60 @@ const Select_Value = ($) => pt.decide.state($, ($) => {
|
|
|
683
683
|
]))),
|
|
684
684
|
]),
|
|
685
685
|
]));
|
|
686
|
-
case 'parameter': return
|
|
687
|
-
case 'parent sibling': return
|
|
688
|
-
case 'sibling': return
|
|
689
|
-
case 'state': return
|
|
690
|
-
case 'text from list': return
|
|
686
|
+
case 'parameter': return p_.ss($, ($) => sh.e.element_access(sh.e.identifier_raw("$p"), sh.e.string_literal(sh.string_literal($, 'apostrophe'))));
|
|
687
|
+
case 'parent sibling': return p_.ss($, ($) => sh.e.identifier_escaped("parent.prop " + $));
|
|
688
|
+
case 'sibling': return p_.ss($, ($) => sh.e.identifier_escaped("prop " + $));
|
|
689
|
+
case 'state': return p_.ss($, ($) => sh.e.identifier_raw("state"));
|
|
690
|
+
case 'text from list': return p_.ss($, ($) => sh.e.call(sh.e.identifier_raw("p_text_from_list"), [
|
|
691
691
|
(0, exports.Select_Value)($.source),
|
|
692
692
|
sh.e.arrow_function_with_expression([
|
|
693
693
|
sh.parameter(sh.identifier_raw("$"), null)
|
|
694
694
|
], null, (0, exports.Assign)($['assign character']))
|
|
695
695
|
]));
|
|
696
|
-
case 'variable': return
|
|
697
|
-
default: return
|
|
696
|
+
case 'variable': return p_.ss($, ($) => sh.e.identifier_escaped("var " + $));
|
|
697
|
+
default: return p_.au($[0]);
|
|
698
698
|
}
|
|
699
699
|
}), ($, current_expression) => {
|
|
700
700
|
return sh.e.element_access(current_expression, sh.e.string_literal(sh.string_literal($, 'apostrophe')));
|
|
701
701
|
}));
|
|
702
|
-
default: return
|
|
702
|
+
default: return p_.au($[0]);
|
|
703
703
|
}
|
|
704
704
|
});
|
|
705
705
|
exports.Select_Value = Select_Value;
|
|
706
|
-
const Select_Lookup = ($) =>
|
|
706
|
+
const Select_Lookup = ($) => p_.decide.state($, ($) => {
|
|
707
707
|
switch ($[0]) {
|
|
708
|
-
case 'implement me': return
|
|
708
|
+
case 'implement me': return p_.ss($, ($) => sh.e.call(sh.e.property_access(sh.e.identifier_raw("_pdev"), sh.identifier_raw("implement_me")), [
|
|
709
709
|
sh.e.string_literal(sh.string_literal($, 'quote'))
|
|
710
710
|
]));
|
|
711
|
-
case 'acyclic': return
|
|
711
|
+
case 'acyclic': return p_.ss($, ($) => p_.decide.state($, ($) => {
|
|
712
712
|
switch ($[0]) {
|
|
713
|
-
case 'not set': return
|
|
714
|
-
case 'siblings': return
|
|
715
|
-
case 'resolved dictionary': return
|
|
713
|
+
case 'not set': return p_.ss($, ($) => sh.e.call(sh.e.property_access(sh.e.property_access(sh.e.identifier_raw("p_sl"), sh.identifier_raw("acyclic")), sh.identifier_raw("not_set")), []));
|
|
714
|
+
case 'siblings': return p_.ss($, ($) => sh.e.identifier_raw("$a"));
|
|
715
|
+
case 'resolved dictionary': return p_.ss($, ($) => sh.e.call(sh.e.property_access(sh.e.property_access(sh.e.identifier_raw("p_sl"), sh.identifier_raw("acyclic")), sh.identifier_raw("from_resolved_dictionary")), [
|
|
716
716
|
(0, exports.Select_Value)($)
|
|
717
717
|
]));
|
|
718
|
-
default: return
|
|
718
|
+
default: return p_.au($[0]);
|
|
719
719
|
}
|
|
720
720
|
}));
|
|
721
|
-
case 'from parameter': return
|
|
722
|
-
case 'stack': return
|
|
721
|
+
case 'from parameter': return p_.ss($, ($) => sh.e.element_access(sh.e.identifier_raw("$l"), sh.e.string_literal(sh.string_literal($, 'apostrophe'))));
|
|
722
|
+
case 'stack': return p_.ss($, ($) => p_.decide.state($, ($) => {
|
|
723
723
|
switch ($[0]) {
|
|
724
|
-
case 'empty': return
|
|
725
|
-
case 'push': return
|
|
724
|
+
case 'empty': return p_.ss($, ($) => sh.e.call(sh.e.property_access(sh.e.property_access(sh.e.identifier_raw("p_sl"), sh.identifier_raw("stack")), sh.identifier_raw("empty")), []));
|
|
725
|
+
case 'push': return p_.ss($, ($) => sh.e.call(sh.e.property_access(sh.e.property_access(sh.e.identifier_raw("p_sl"), sh.identifier_raw("stack")), sh.identifier_raw("push")), [
|
|
726
726
|
(0, exports.Select_Lookup)($.stack),
|
|
727
727
|
(0, exports.Select_Lookup)($.acyclic)
|
|
728
728
|
]));
|
|
729
|
-
default: return
|
|
729
|
+
default: return p_.au($[0]);
|
|
730
730
|
}
|
|
731
731
|
}));
|
|
732
|
-
case 'cyclic': return
|
|
732
|
+
case 'cyclic': return p_.ss($, ($) => p_.decide.state($, ($) => {
|
|
733
733
|
switch ($[0]) {
|
|
734
|
-
case 'not set': return
|
|
735
|
-
case 'siblings': return
|
|
736
|
-
default: return
|
|
734
|
+
case 'not set': return p_.ss($, ($) => sh.e.call(sh.e.property_access(sh.e.property_access(sh.e.identifier_raw("p_sl"), sh.identifier_raw("cyclic")), sh.identifier_raw("not_set")), []));
|
|
735
|
+
case 'siblings': return p_.ss($, ($) => sh.e.identifier_raw("$c"));
|
|
736
|
+
default: return p_.au($[0]);
|
|
737
737
|
}
|
|
738
738
|
}));
|
|
739
|
-
default: return
|
|
739
|
+
default: return p_.au($[0]);
|
|
740
740
|
}
|
|
741
741
|
});
|
|
742
742
|
exports.Select_Lookup = Select_Lookup;
|