mevento 1.0.0 → 1.2.0

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/lib/mevento.d.ts CHANGED
@@ -91,6 +91,33 @@ declare class IndexAccessorAST extends AST {
91
91
  constructor(owner: AST, key: AST, computed?: boolean);
92
92
  toString(): string;
93
93
  }
94
+ declare class WhileLoopStatement extends AST {
95
+ test: AST;
96
+ body: AST;
97
+ retain: boolean;
98
+ constructor(test: AST, body: AST, startToken?: Token, endToken?: Token, retain?: boolean);
99
+ }
100
+ declare class ForLoopStatement extends AST {
101
+ init: AssignmentExpressionAST;
102
+ test: AST;
103
+ update: AST;
104
+ direction: Token;
105
+ body: AST;
106
+ retain: boolean;
107
+ constructor(init: AssignmentExpressionAST, test: AST, update: AST, direction: Token, body: AST, startToken?: Token, endToken?: Token, retain?: boolean);
108
+ }
109
+ declare class ForOfStatement extends AST {
110
+ identifier: AST;
111
+ collection: AST;
112
+ body: AST;
113
+ retain: boolean;
114
+ constructor(identifier: AST, collection: AST, body: AST, startToken?: Token, endToken?: Token, retain?: boolean);
115
+ }
116
+ declare class BreakAST extends AST {
117
+ constructor(line?: number, col?: number);
118
+ }
119
+ declare class BreakBranch {
120
+ }
94
121
  declare type Func = (node: any) => any;
95
122
  declare abstract class ANodeVisitor {
96
123
  protected _nodesVisitors: {
@@ -107,12 +134,14 @@ export declare class MEvento extends NodeVisitor {
107
134
  _memory: {
108
135
  [k: string]: any;
109
136
  };
137
+ debug: boolean;
110
138
  private static _globalFunctionsRegistry;
111
139
  private static _cache;
112
140
  _functionsRegistry: {
113
141
  [k: string]: MEventoFBinding;
114
142
  };
115
143
  constructor();
144
+ protected log(message: any): void;
116
145
  protected visitRootAST(node: RootAST): any;
117
146
  protected visitBlockStatementAST(node: BlockStatementAST): any;
118
147
  protected visitIdentifierAST(node: IdentifierAST): any;
@@ -129,6 +158,11 @@ export declare class MEvento extends NodeVisitor {
129
158
  protected visitObjectProperty(node: AST): any;
130
159
  protected visitObjectExpression(ast: AST): any;
131
160
  protected visitArrayExpression(ast: AST): any;
161
+ protected visitBreakAST(node: BreakAST): BreakBranch;
162
+ protected visitWhileLoopStatement(node: WhileLoopStatement): any;
163
+ protected visitForLoopStatement(node: ForLoopStatement): any;
164
+ protected visitForOfStatement(node: ForOfStatement): any;
165
+ protected _declareForIdentifier(node: AST, value: any): any;
132
166
  resolveArguments(args: AST[]): any;
133
167
  registerFunction(id: string, fn: MEventoFBinding): void;
134
168
  unregisterFunction(id: string): void;
@@ -158,6 +192,9 @@ export declare class MEventoAsync extends MEvento {
158
192
  protected visitObjectProperty(node: AST): Promise<void>;
159
193
  protected visitObjectExpression(ast: AST): Promise<any>;
160
194
  protected visitArrayExpression(ast: AST): Promise<any[]>;
195
+ protected visitWhileLoopStatement(node: WhileLoopStatement): Promise<any[] | undefined>;
196
+ protected visitForLoopStatement(node: ForLoopStatement): Promise<any[] | undefined>;
197
+ protected visitForOfStatement(node: ForOfStatement): Promise<any[] | undefined>;
161
198
  resolveArgumentsAsync(args: AST[]): Promise<any[]>;
162
199
  registerFunction(id: string, fn: MEventoFBinding): void;
163
200
  unregisterFunction(id: string): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mevento",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "dependencies": {
5
5
  "tslib": "^2.0.3"
6
6
  },