@elaraai/east 0.0.1-beta.1 → 0.0.1-beta.3
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/README.md +4 -0
- package/dist/src/analyze.d.ts +4 -4
- package/dist/src/analyze.d.ts.map +1 -1
- package/dist/src/analyze.js +142 -44
- package/dist/src/analyze.js.map +1 -1
- package/dist/src/ast.d.ts +18 -7
- package/dist/src/ast.d.ts.map +1 -1
- package/dist/src/ast.js +1 -146
- package/dist/src/ast.js.map +1 -1
- package/dist/src/ast_to_ir.d.ts +1 -0
- package/dist/src/ast_to_ir.d.ts.map +1 -1
- package/dist/src/ast_to_ir.js +71 -10
- package/dist/src/ast_to_ir.js.map +1 -1
- package/dist/src/builtins.d.ts.map +1 -1
- package/dist/src/builtins.js +79 -64
- package/dist/src/builtins.js.map +1 -1
- package/dist/src/comparison.d.ts.map +1 -1
- package/dist/src/comparison.js +9 -0
- package/dist/src/comparison.js.map +1 -1
- package/dist/src/compile.d.ts.map +1 -1
- package/dist/src/compile.js +114 -220
- package/dist/src/compile.js.map +1 -1
- package/dist/src/default.d.ts.map +1 -1
- package/dist/src/default.js +2 -0
- package/dist/src/default.js.map +1 -1
- package/dist/src/eastir.d.ts +12 -10
- package/dist/src/eastir.d.ts.map +1 -1
- package/dist/src/eastir.js +20 -19
- package/dist/src/eastir.js.map +1 -1
- package/dist/src/expr/array.js +51 -51
- package/dist/src/expr/array.js.map +1 -1
- package/dist/src/expr/ast.d.ts.map +1 -1
- package/dist/src/expr/ast.js +6 -0
- package/dist/src/expr/ast.js.map +1 -1
- package/dist/src/expr/asyncfunction.d.ts +49 -0
- package/dist/src/expr/asyncfunction.d.ts.map +1 -0
- package/dist/src/expr/asyncfunction.js +60 -0
- package/dist/src/expr/asyncfunction.js.map +1 -0
- package/dist/src/expr/block.d.ts +60 -6
- package/dist/src/expr/block.d.ts.map +1 -1
- package/dist/src/expr/block.js +251 -14
- package/dist/src/expr/block.js.map +1 -1
- package/dist/src/expr/dict.js +47 -47
- package/dist/src/expr/dict.js.map +1 -1
- package/dist/src/expr/expr.d.ts +9 -0
- package/dist/src/expr/expr.d.ts.map +1 -1
- package/dist/src/expr/expr.js +5 -1
- package/dist/src/expr/expr.js.map +1 -1
- package/dist/src/expr/index.d.ts +73 -2
- package/dist/src/expr/index.d.ts.map +1 -1
- package/dist/src/expr/index.js +72 -8
- package/dist/src/expr/index.js.map +1 -1
- package/dist/src/expr/libs/array.js +1 -1
- package/dist/src/expr/libs/array.js.map +1 -1
- package/dist/src/expr/libs/dict.js +3 -3
- package/dist/src/expr/libs/dict.js.map +1 -1
- package/dist/src/expr/libs/set.js +2 -2
- package/dist/src/expr/libs/set.js.map +1 -1
- package/dist/src/expr/ref.js +1 -1
- package/dist/src/expr/ref.js.map +1 -1
- package/dist/src/expr/set.js +38 -38
- package/dist/src/expr/set.js.map +1 -1
- package/dist/src/expr/struct.d.ts +2 -0
- package/dist/src/expr/struct.d.ts.map +1 -1
- package/dist/src/expr/types.d.ts +8 -5
- package/dist/src/expr/types.d.ts.map +1 -1
- package/dist/src/fuzz.d.ts.map +1 -1
- package/dist/src/fuzz.js +5 -0
- package/dist/src/fuzz.js.map +1 -1
- package/dist/src/internal.d.ts +1 -0
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +1 -0
- package/dist/src/internal.js.map +1 -1
- package/dist/src/ir.d.ts +231 -33
- package/dist/src/ir.d.ts.map +1 -1
- package/dist/src/ir.js +3 -1
- package/dist/src/ir.js.map +1 -1
- package/dist/src/serialization/beast.d.ts.map +1 -1
- package/dist/src/serialization/beast.js +6 -0
- package/dist/src/serialization/beast.js.map +1 -1
- package/dist/src/serialization/beast2-stream.d.ts.map +1 -1
- package/dist/src/serialization/beast2-stream.js +5 -0
- package/dist/src/serialization/beast2-stream.js.map +1 -1
- package/dist/src/serialization/beast2.d.ts.map +1 -1
- package/dist/src/serialization/beast2.js +6 -0
- package/dist/src/serialization/beast2.js.map +1 -1
- package/dist/src/serialization/east.d.ts.map +1 -1
- package/dist/src/serialization/east.js +9 -1
- package/dist/src/serialization/east.js.map +1 -1
- package/dist/src/serialization/json.d.ts.map +1 -1
- package/dist/src/serialization/json.js +8 -2
- package/dist/src/serialization/json.js.map +1 -1
- package/dist/src/type_of_type.d.ts +9 -3
- package/dist/src/type_of_type.d.ts.map +1 -1
- package/dist/src/type_of_type.js +40 -13
- package/dist/src/type_of_type.js.map +1 -1
- package/dist/src/types.d.ts +59 -16
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +141 -91
- package/dist/src/types.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../../src/expr/block.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAgB,KAAK,GAAG,EAAE,KAAK,SAAS,EAAE,KAAK,KAAK,EAAE,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AACnH,OAAO,EAA+B,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,KAAK,QAAQ,EAA2B,QAAQ,EAA0B,UAAU,EAAE,SAAS,EAAE,WAAW,EAAe,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAEzN,OAAO,KAAK,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACvE,OAAO,EAAa,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,a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AAY,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,IAAI,GAAG,QAAQ;IA4C3D,mEAAmE;IACnE,MAAM,CAAC,SAAS,EAAE,WAAW,GAAG,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,IAAI,GAAG,IAAI;CAiC5F;AAED,wDAAwD;AACxD,cAAM,YAAY,CAAC,GAAG,CAAE,SAAQ,QAAQ;IAIR,OAAO,CAAC,gBAAgB;IAAe,OAAO,CAAC,cAAc;IAAe,OAAO,CAAC,WAAW;IAH7H,OAAO,CAAC,WAAW,CAAS;IAE5B,gBAAgB;gBACJ,GAAG,EAAE,WAAW,EAAU,gBAAgB,EAAE,WAAW,EAAU,cAAc,EAAE,WAAW,EAAU,WAAW,EAAE,GAAG;IAMlI,yGAAyG;IACzG,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,CAAC,UAAU,CAAC;QAAE,QAAQ,EAAE,UAAU,CAAC;QAAC,IAAI,EAAE,WAAW,CAAC;QAAC,MAAM,EAAE,WAAW,CAAA;KAAE,CAAC,CAAC,KAAK,IAAI,GAAG,IAAI,GAAG,IAAI;IAkC7K,0KAA0K;IAC1K,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,IAAI,GAAG,IAAI;CAsB3D"}
|
package/dist/src/expr/block.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
3
|
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import {} from "../ast.js";
|
|
6
6
|
import { get_location, printLocation } from "../location.js";
|
|
7
|
-
import { FunctionType, isSubtype, NullType, printType, isTypeEqual, StringType, NeverType, VariantType, BooleanType, TypeUnion, IntegerType, StructType, ArrayType } from "../types.js";
|
|
7
|
+
import { FunctionType, isSubtype, NullType, printType, isTypeEqual, StringType, NeverType, VariantType, BooleanType, TypeUnion, IntegerType, StructType, ArrayType, AsyncFunctionType } from "../types.js";
|
|
8
8
|
import { AstSymbol, Expr } from "./expr.js";
|
|
9
9
|
import { NeverExpr } from "./never.js";
|
|
10
10
|
import { NullExpr } from "./null.js";
|
|
@@ -23,6 +23,7 @@ import { createFunctionExpr } from "./function.js";
|
|
|
23
23
|
import { valueOrExprToAst, valueOrExprToAstTyped } from "./ast.js";
|
|
24
24
|
import { toEastTypeValue } from "../type_of_type.js";
|
|
25
25
|
import { RefExpr } from "./ref.js";
|
|
26
|
+
import { createAsyncFunctionExpr } from "./asyncfunction.js";
|
|
26
27
|
/** A factory function to help build `Expr` from AST.
|
|
27
28
|
* We inject this into each concrete `Expr` type so they can create new expressions recursively, without having circular dependencies between JavaScript modules.
|
|
28
29
|
*/
|
|
@@ -83,6 +84,9 @@ export function fromAst(ast) {
|
|
|
83
84
|
else if (type === "Function") {
|
|
84
85
|
return createFunctionExpr(ast.type.inputs, ast.type.output, ast, fromAst);
|
|
85
86
|
}
|
|
87
|
+
else if (type === "AsyncFunction") {
|
|
88
|
+
return createAsyncFunctionExpr(ast.type.inputs, ast.type.output, ast, fromAst);
|
|
89
|
+
}
|
|
86
90
|
else {
|
|
87
91
|
throw new Error(`fromAst not implemented for type ${printType(ast.type)} at ${printLocation(ast.location)}`);
|
|
88
92
|
}
|
|
@@ -172,15 +176,92 @@ export function from(value, type) {
|
|
|
172
176
|
if (!isSubtype(body_ast.type, output)) {
|
|
173
177
|
throw new Error(`Expected function definition to return type ${printType(output)}, got ${printType(body_ast.type)}`);
|
|
174
178
|
}
|
|
175
|
-
const
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
+
const ast = {
|
|
180
|
+
ast_type: "Function",
|
|
181
|
+
type: FunctionType(inputs, output),
|
|
182
|
+
location: get_location(3),
|
|
183
|
+
parameters: input_variables,
|
|
184
|
+
body: body_ast,
|
|
185
|
+
};
|
|
186
|
+
return fromAst(ast);
|
|
187
|
+
}
|
|
188
|
+
else if (type && type.type === "AsyncFunction") {
|
|
189
|
+
if (typeof value !== "function") {
|
|
190
|
+
throw new Error(`Expected function but got ${typeof value}`);
|
|
191
|
+
}
|
|
192
|
+
const { inputs, output } = type;
|
|
193
|
+
const input_variables = inputs.map(i => ({
|
|
194
|
+
ast_type: "Variable",
|
|
195
|
+
type: i,
|
|
196
|
+
location: get_location(3),
|
|
197
|
+
mutable: false,
|
|
198
|
+
}));
|
|
199
|
+
const $ = BlockBuilder(output);
|
|
200
|
+
const input_exprs = input_variables.map(fromAst);
|
|
201
|
+
const ret = value($, ...input_exprs);
|
|
202
|
+
const statements = $.statements;
|
|
203
|
+
if (ret !== undefined) {
|
|
204
|
+
if (ret instanceof Expr) {
|
|
205
|
+
// It is possible this expression is already the last statement.
|
|
206
|
+
// Input of the form `$ => $.xxx()` or `$ => { ...; return $.xxx(); }` will cause this
|
|
207
|
+
// So we filter out this case to avoid unintended repeated statements (and if users write an identical expression twice, they won't be `===`)
|
|
208
|
+
if (statements.length === 0 || statements[statements.length - 1] !== ret[AstSymbol]) {
|
|
209
|
+
statements.push(Expr.ast(ret));
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
else {
|
|
213
|
+
const retAst = valueOrExprToAstTyped(ret, output);
|
|
214
|
+
statements.push(retAst);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
let body_ast;
|
|
218
|
+
if (isTypeEqual(output, NullType)) {
|
|
219
|
+
if (statements.length === 0) {
|
|
220
|
+
body_ast = { ast_type: "Value", type: NullType, location: get_location(2), value: null };
|
|
221
|
+
}
|
|
222
|
+
else if (statements.length === 1 && isSubtype(statements[0].type, NullType)) {
|
|
223
|
+
body_ast = statements[0];
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
if (!isSubtype(statements[statements.length - 1].type, NullType)) {
|
|
227
|
+
statements.push({ ast_type: "Value", type: NullType, location: get_location(3), value: null });
|
|
228
|
+
}
|
|
229
|
+
body_ast = {
|
|
230
|
+
ast_type: "Block",
|
|
231
|
+
type: statements[statements.length - 1].type,
|
|
232
|
+
location: get_location(3),
|
|
233
|
+
statements: statements,
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
238
|
+
if (statements.length === 0) {
|
|
239
|
+
throw new Error(`Function expected output of type ${printType(output)}, but no function body or statements were provided`);
|
|
240
|
+
}
|
|
241
|
+
else if (statements.length === 1) {
|
|
242
|
+
if (!isSubtype(statements[0].type, output)) {
|
|
243
|
+
throw new Error(`Function expected output of type ${printType(output)}, but function body has type ${printType(statements[0].type)}`);
|
|
244
|
+
}
|
|
245
|
+
body_ast = statements[0];
|
|
179
246
|
}
|
|
247
|
+
else {
|
|
248
|
+
if (!isSubtype(statements[statements.length - 1].type, output)) {
|
|
249
|
+
throw new Error(`Function expected output of type ${printType(output)}, but function body has type ${printType(statements[statements.length - 1].type)}`);
|
|
250
|
+
}
|
|
251
|
+
body_ast = {
|
|
252
|
+
ast_type: "Block",
|
|
253
|
+
type: statements[statements.length - 1].type,
|
|
254
|
+
location: get_location(3),
|
|
255
|
+
statements: statements,
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
if (!isSubtype(body_ast.type, output)) {
|
|
260
|
+
throw new Error(`Expected function definition to return type ${printType(output)}, got ${printType(body_ast.type)}`);
|
|
180
261
|
}
|
|
181
262
|
const ast = {
|
|
182
|
-
ast_type: "
|
|
183
|
-
type: FunctionType(inputs, output
|
|
263
|
+
ast_type: "AsyncFunction",
|
|
264
|
+
type: FunctionType(inputs, output),
|
|
184
265
|
location: get_location(3),
|
|
185
266
|
parameters: input_variables,
|
|
186
267
|
body: body_ast,
|
|
@@ -229,7 +310,7 @@ export function func(input_types, output_type, body) {
|
|
|
229
310
|
}
|
|
230
311
|
const ast = {
|
|
231
312
|
ast_type: "Function",
|
|
232
|
-
type: FunctionType(input_types, ret_type
|
|
313
|
+
type: FunctionType(input_types, ret_type),
|
|
233
314
|
location: get_location(2),
|
|
234
315
|
parameters: parameters,
|
|
235
316
|
body: body_ast,
|
|
@@ -264,7 +345,89 @@ export function func(input_types, output_type, body) {
|
|
|
264
345
|
// }
|
|
265
346
|
const ast = {
|
|
266
347
|
ast_type: "Function",
|
|
267
|
-
type: FunctionType(input_types, output_type
|
|
348
|
+
type: FunctionType(input_types, output_type),
|
|
349
|
+
location: get_location(2),
|
|
350
|
+
parameters: parameters,
|
|
351
|
+
body: body_ast,
|
|
352
|
+
};
|
|
353
|
+
return fromAst(ast);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
export function asyncFunction(input_types, output_type, body) {
|
|
357
|
+
const parameters = input_types.map(i => ({
|
|
358
|
+
ast_type: "Variable",
|
|
359
|
+
type: i,
|
|
360
|
+
location: get_location(2),
|
|
361
|
+
mutable: false,
|
|
362
|
+
}));
|
|
363
|
+
const $ = BlockBuilder(output_type ?? NeverType);
|
|
364
|
+
let ret = body($, ...parameters.map(fromAst));
|
|
365
|
+
const statements = $.statements;
|
|
366
|
+
if (output_type === undefined) {
|
|
367
|
+
if (ret === undefined) {
|
|
368
|
+
throw new Error(`When output_type is not specified, function body must return a value`);
|
|
369
|
+
}
|
|
370
|
+
const ret_ast = ret instanceof Expr ? Expr.ast(ret) : valueOrExprToAst(ret);
|
|
371
|
+
if (statements.length === 0 || statements[statements.length - 1] !== ret_ast) { // avoid duplicate statements
|
|
372
|
+
statements.push(ret_ast);
|
|
373
|
+
}
|
|
374
|
+
const ret_type = ret_ast.type;
|
|
375
|
+
let body_ast;
|
|
376
|
+
if (statements.length === 0) {
|
|
377
|
+
body_ast = { ast_type: "Value", type: NullType, location: get_location(2), value: null };
|
|
378
|
+
}
|
|
379
|
+
else if (statements.length === 1) {
|
|
380
|
+
body_ast = statements[0];
|
|
381
|
+
}
|
|
382
|
+
else {
|
|
383
|
+
body_ast = {
|
|
384
|
+
ast_type: "Block",
|
|
385
|
+
type: statements[statements.length - 1].type,
|
|
386
|
+
location: get_location(2),
|
|
387
|
+
statements: statements,
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
if (!isSubtype(body_ast.type, ret_type)) {
|
|
391
|
+
throw new Error(`function expected to return a value of type ${printType(ret_type)}, got ${printType(body_ast.type)}`);
|
|
392
|
+
}
|
|
393
|
+
const ast = {
|
|
394
|
+
ast_type: "AsyncFunction",
|
|
395
|
+
type: AsyncFunctionType(input_types, ret_type),
|
|
396
|
+
location: get_location(2),
|
|
397
|
+
parameters: parameters,
|
|
398
|
+
body: body_ast,
|
|
399
|
+
};
|
|
400
|
+
return fromAst(ast);
|
|
401
|
+
}
|
|
402
|
+
else {
|
|
403
|
+
if (ret !== undefined) {
|
|
404
|
+
const ret_ast = valueOrExprToAstTyped(ret, output_type);
|
|
405
|
+
if (statements.length === 0 || statements[statements.length - 1] !== ret_ast) { // avoid duplicate statements
|
|
406
|
+
statements.push(ret_ast);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
let body_ast;
|
|
410
|
+
if (statements.length === 0) {
|
|
411
|
+
body_ast = { ast_type: "Value", type: NullType, location: get_location(2), value: null };
|
|
412
|
+
}
|
|
413
|
+
else if (statements.length === 1) {
|
|
414
|
+
body_ast = statements[0];
|
|
415
|
+
}
|
|
416
|
+
else {
|
|
417
|
+
body_ast = {
|
|
418
|
+
ast_type: "Block",
|
|
419
|
+
type: statements[statements.length - 1].type,
|
|
420
|
+
location: get_location(2),
|
|
421
|
+
statements: statements,
|
|
422
|
+
};
|
|
423
|
+
}
|
|
424
|
+
// This is an interesting one - do we have implicit returns? Do we need to track the absence of control flow?
|
|
425
|
+
// if (!isSubtype(expr.type, output_type)) {
|
|
426
|
+
// throw new Error(`func expected to return a value of type ${printType(output_type)}, got ${printType(expr.type)}`);
|
|
427
|
+
// }
|
|
428
|
+
const ast = {
|
|
429
|
+
ast_type: "AsyncFunction",
|
|
430
|
+
type: AsyncFunctionType(input_types, output_type),
|
|
268
431
|
location: get_location(2),
|
|
269
432
|
parameters: parameters,
|
|
270
433
|
body: body_ast,
|
|
@@ -682,16 +845,18 @@ export function print(value) {
|
|
|
682
845
|
arguments: [valueAst],
|
|
683
846
|
});
|
|
684
847
|
}
|
|
685
|
-
/** Create a callable helper to invoke a platform function.
|
|
848
|
+
/** Create a callable helper to invoke a synchronous platform function.
|
|
686
849
|
*
|
|
687
850
|
* Platform functions provide access to external capabilities (logging, I/O, database access, etc.)
|
|
688
851
|
* that East code can call. They are defined by the platform when compiling and executing East IR.
|
|
689
852
|
*
|
|
690
|
-
* @param name - The name of the platform function
|
|
853
|
+
* @param name - The name of the platform function
|
|
691
854
|
* @param input_types - Array of input parameter types for the platform function
|
|
692
855
|
* @param output_type - The return type of the platform function
|
|
693
856
|
* @returns A callable function that creates Platform AST nodes when invoked
|
|
694
857
|
*
|
|
858
|
+
* @see {@link asyncPlatform} for defining asynchronous platform functions (that return `Promise`s)
|
|
859
|
+
*
|
|
695
860
|
* @example
|
|
696
861
|
* ```ts
|
|
697
862
|
// Define a platform function helper for logging
|
|
@@ -742,6 +907,7 @@ export function platform(name, input_types, output_type) {
|
|
|
742
907
|
location: get_location(2),
|
|
743
908
|
name: name,
|
|
744
909
|
arguments: argAsts,
|
|
910
|
+
async: false,
|
|
745
911
|
});
|
|
746
912
|
};
|
|
747
913
|
fn.implement = (fnImpl) => {
|
|
@@ -767,7 +933,73 @@ export function platform(name, input_types, output_type) {
|
|
|
767
933
|
};
|
|
768
934
|
}
|
|
769
935
|
};
|
|
770
|
-
fn
|
|
936
|
+
return fn;
|
|
937
|
+
}
|
|
938
|
+
/** Create a callable helper to invoke an asynchronous platform function.
|
|
939
|
+
*
|
|
940
|
+
* Platform functions provide access to external capabilities (logging, I/O, database access, etc.)
|
|
941
|
+
* that East code can call. They are defined by the platform when compiling and executing East IR.
|
|
942
|
+
*
|
|
943
|
+
* @param name - The name of the asynchronous platform function
|
|
944
|
+
* @param input_types - Array of input parameter types for the platform function
|
|
945
|
+
* @param output_type - The return type of the platform function
|
|
946
|
+
* @returns A callable function that creates Platform AST nodes when invoked
|
|
947
|
+
*
|
|
948
|
+
* @see {@link platform} for defining synchronous platform functions
|
|
949
|
+
*
|
|
950
|
+
* @example
|
|
951
|
+
* ```ts
|
|
952
|
+
// Define a platform function for reading files as a string
|
|
953
|
+
const readFile = East.asyncPlatform("readFile", [StringType], StringType);
|
|
954
|
+
|
|
955
|
+
// Use it in East code
|
|
956
|
+
const myFunction = East.asyncFunction([], StringType, ($) => {
|
|
957
|
+
$.return(readFile("data.txt"));
|
|
958
|
+
});
|
|
959
|
+
|
|
960
|
+
// Provide the (async) implementation when compiling
|
|
961
|
+
const platform = [
|
|
962
|
+
readFile.implement((filename: string) => fs.promises.readFile(filename, 'utf-8')),
|
|
963
|
+
];
|
|
964
|
+
const compiled = myFunction.toIR().compile(platform);
|
|
965
|
+
compiled(); // Logs "Hello, world!" to the console
|
|
966
|
+
* ```
|
|
967
|
+
*/
|
|
968
|
+
export function asyncPlatform(name, input_types, output_type) {
|
|
969
|
+
const fn = (...args) => {
|
|
970
|
+
if (args.length !== input_types.length) {
|
|
971
|
+
throw new Error(`Platform function ${name} expected ${input_types.length} arguments, got ${args.length}`);
|
|
972
|
+
}
|
|
973
|
+
const argAsts = args.map((arg, index) => {
|
|
974
|
+
const expectedType = input_types[index];
|
|
975
|
+
let ast = valueOrExprToAstTyped(arg, expectedType);
|
|
976
|
+
if (ast.type.type === "Never") {
|
|
977
|
+
throw new Error(`Platform function ${name} argument ${index} expected type ${printType(expectedType)}, got Never type`);
|
|
978
|
+
}
|
|
979
|
+
if (!isTypeEqual(ast.type, expectedType)) {
|
|
980
|
+
if (!isSubtype(ast.type, expectedType)) {
|
|
981
|
+
throw new Error(`Platform function ${name} argument ${index} expected type ${printType(expectedType)}, got ${printType(ast.type)}`);
|
|
982
|
+
}
|
|
983
|
+
// Insert implicit cast
|
|
984
|
+
ast = {
|
|
985
|
+
ast_type: "As",
|
|
986
|
+
type: expectedType,
|
|
987
|
+
location: get_location(2),
|
|
988
|
+
value: ast,
|
|
989
|
+
};
|
|
990
|
+
}
|
|
991
|
+
return ast;
|
|
992
|
+
});
|
|
993
|
+
return fromAst({
|
|
994
|
+
ast_type: "Platform",
|
|
995
|
+
type: output_type,
|
|
996
|
+
location: get_location(2),
|
|
997
|
+
name: name,
|
|
998
|
+
arguments: argAsts,
|
|
999
|
+
async: true,
|
|
1000
|
+
});
|
|
1001
|
+
};
|
|
1002
|
+
fn.implement = (fnImpl) => {
|
|
771
1003
|
// Convert types from EastType to EastTypeValue once at implementation time
|
|
772
1004
|
const inputsAsValues = input_types.map(t => toEastTypeValue(t));
|
|
773
1005
|
const outputAsValue = toEastTypeValue(output_type);
|
|
@@ -870,7 +1102,11 @@ export const BlockBuilder = (return_type) => {
|
|
|
870
1102
|
if (isTypeEqual($.type(), NeverType)) {
|
|
871
1103
|
throw new Error(`Unreachable statement detected at ${printLocation(get_location(2))}`);
|
|
872
1104
|
}
|
|
873
|
-
|
|
1105
|
+
let v = Expr.ast(variable);
|
|
1106
|
+
// Handle RecursiveType variables which are auto-unwrapped by fromAst
|
|
1107
|
+
if (v.ast_type === "UnwrapRecursive") {
|
|
1108
|
+
v = v.value;
|
|
1109
|
+
}
|
|
874
1110
|
if (v.ast_type !== "Variable") {
|
|
875
1111
|
throw new Error("Can only assign to a variable");
|
|
876
1112
|
}
|
|
@@ -1491,6 +1727,7 @@ Object.assign(Expr, {
|
|
|
1491
1727
|
error,
|
|
1492
1728
|
tryCatch,
|
|
1493
1729
|
function: func,
|
|
1730
|
+
asyncFunction,
|
|
1494
1731
|
print,
|
|
1495
1732
|
str,
|
|
1496
1733
|
equal,
|