mevento 1.9.6 → 1.9.8
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/esm2020/lib/mevento.mjs +136 -16
- package/fesm2015/mevento.mjs +138 -16
- package/fesm2015/mevento.mjs.map +1 -1
- package/fesm2020/mevento.mjs +136 -16
- package/fesm2020/mevento.mjs.map +1 -1
- package/lib/mevento.d.ts +16 -3
- package/package.json +1 -1
package/lib/mevento.d.ts
CHANGED
|
@@ -44,6 +44,8 @@ export declare class TokenType {
|
|
|
44
44
|
static TILL: number;
|
|
45
45
|
static BREAK: number;
|
|
46
46
|
static CONTINUE: number;
|
|
47
|
+
static nullity: number;
|
|
48
|
+
static RETURN: number;
|
|
47
49
|
}
|
|
48
50
|
export declare class Token {
|
|
49
51
|
type: number;
|
|
@@ -191,6 +193,10 @@ export declare class TupleExpression extends AST {
|
|
|
191
193
|
export declare class BreakAST extends AST {
|
|
192
194
|
constructor(line?: number, col?: number);
|
|
193
195
|
}
|
|
196
|
+
export declare class ReturnAST extends AST {
|
|
197
|
+
value?: AST;
|
|
198
|
+
constructor(value?: AST, line?: number, col?: number);
|
|
199
|
+
}
|
|
194
200
|
export declare class ContinueAST extends AST {
|
|
195
201
|
constructor(line?: number, col?: number);
|
|
196
202
|
}
|
|
@@ -200,6 +206,10 @@ export declare class BreakBranch extends LoopControl {
|
|
|
200
206
|
}
|
|
201
207
|
export declare class ContinueBranch extends LoopControl {
|
|
202
208
|
}
|
|
209
|
+
export declare class ReturnBranch {
|
|
210
|
+
value: any;
|
|
211
|
+
constructor(value: any);
|
|
212
|
+
}
|
|
203
213
|
declare type Func = (node: any) => any;
|
|
204
214
|
declare abstract class ANodeVisitor {
|
|
205
215
|
protected _nodesVisitors: {
|
|
@@ -232,6 +242,7 @@ export declare abstract class NodeVisitor extends ANodeVisitor {
|
|
|
232
242
|
protected abstract visitForLoopStatement(node: ForLoopStatement): any;
|
|
233
243
|
protected abstract visitForOfStatement(node: ForOfStatement): any;
|
|
234
244
|
protected abstract visitContinueAST(node: ContinueAST): any;
|
|
245
|
+
protected abstract visitReturnAST(node: ReturnAST): any;
|
|
235
246
|
}
|
|
236
247
|
export declare class MEventScope {
|
|
237
248
|
name: string;
|
|
@@ -282,6 +293,7 @@ export declare class MEvento extends NodeVisitor {
|
|
|
282
293
|
protected visitForLoopStatement(node: ForLoopStatement): any;
|
|
283
294
|
protected visitForOfStatement(node: ForOfStatement): any;
|
|
284
295
|
protected visitContinueAST(node: ContinueAST): ContinueBranch;
|
|
296
|
+
protected visitReturnAST(node: ReturnAST): any;
|
|
285
297
|
protected _declareForIdentifier(node: AST, value: any): any;
|
|
286
298
|
resolveArguments(args: AST[]): any;
|
|
287
299
|
setFunctionResolver(resolver: (name: string) => MEventoFBinding | undefined): void;
|
|
@@ -314,9 +326,10 @@ export declare class MEventoAsync extends MEvento {
|
|
|
314
326
|
protected visitObjectProperty(node: AST): Promise<void>;
|
|
315
327
|
protected visitObjectExpression(ast: AST): Promise<any>;
|
|
316
328
|
protected visitArrayExpression(ast: AST): Promise<any[]>;
|
|
317
|
-
protected visitWhileLoopStatement(node: WhileLoopStatement): Promise<any[] | undefined>;
|
|
318
|
-
protected visitForLoopStatement(node: ForLoopStatement): Promise<any[] | null>;
|
|
319
|
-
protected visitForOfStatement(node: ForOfStatement): Promise<any[] | undefined>;
|
|
329
|
+
protected visitWhileLoopStatement(node: WhileLoopStatement): Promise<any[] | ReturnBranch | undefined>;
|
|
330
|
+
protected visitForLoopStatement(node: ForLoopStatement): Promise<any[] | ReturnBranch | null>;
|
|
331
|
+
protected visitForOfStatement(node: ForOfStatement): Promise<any[] | ReturnBranch | undefined>;
|
|
332
|
+
protected visitReturnAST(node: ReturnAST): Promise<any>;
|
|
320
333
|
resolveArgumentsAsync(args: AST[]): Promise<any[]>;
|
|
321
334
|
registerFunction(id: string, fn: MEventoFBinding): void;
|
|
322
335
|
unregisterFunction(id: string): void;
|