@quenk/wml 2.11.2 → 2.12.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/cli.js +24 -29
- package/lib/cli.js.map +1 -1
- package/lib/cli.ts +20 -13
- package/lib/compile/codegen.d.ts +6 -10
- package/lib/compile/codegen.js +556 -633
- package/lib/compile/codegen.js.map +1 -1
- package/lib/compile/codegen.ts +58 -25
- package/lib/compile/index.js +6 -11
- package/lib/compile/index.js.map +1 -1
- package/lib/compile/transform.js +19 -25
- package/lib/compile/transform.js.map +1 -1
- package/lib/compile/transform.ts +12 -6
- package/lib/dom.js +118 -167
- package/lib/dom.js.map +1 -1
- package/lib/index.js +7 -10
- package/lib/index.js.map +1 -1
- package/lib/main.js +31 -56
- package/lib/main.js.map +1 -1
- package/lib/parse/ast.d.ts +25 -5
- package/lib/parse/ast.js +186 -214
- package/lib/parse/ast.js.map +1 -1
- package/lib/parse/ast.ts +33 -5
- package/lib/parse/generated.js +2527 -2454
- package/lib/parse/index.js +7 -10
- package/lib/parse/index.js.map +1 -1
- package/lib/parse/test.js +279 -53
- package/lib/parse/test.js.map +1 -1
- package/lib/parse/test.ts +20 -1
- package/lib/parse/wml.y +60 -50
- package/lib/tsconfig.json +1 -1
- package/package.json +1 -2
package/lib/parse/ast.d.ts
CHANGED
|
@@ -124,7 +124,17 @@ export declare class LetStatement {
|
|
|
124
124
|
type: string;
|
|
125
125
|
constructor(id: UnqualifiedIdentifier, cons: ConstructorType, expression: Expression, location: Location);
|
|
126
126
|
}
|
|
127
|
-
export declare type ContextTypeIndicator =
|
|
127
|
+
export declare type ContextTypeIndicator = ConstructorType | ContextFromStatement;
|
|
128
|
+
/**
|
|
129
|
+
* ContextFromStatement
|
|
130
|
+
*/
|
|
131
|
+
export declare class ContextFromStatement {
|
|
132
|
+
cons: ConstructorType;
|
|
133
|
+
module: StringLiteral;
|
|
134
|
+
location: Location;
|
|
135
|
+
type: string;
|
|
136
|
+
constructor(cons: ConstructorType, module: StringLiteral, location: Location);
|
|
137
|
+
}
|
|
128
138
|
/**
|
|
129
139
|
* ViewStatement
|
|
130
140
|
*/
|
|
@@ -263,7 +273,7 @@ export declare class Interpolation {
|
|
|
263
273
|
constructor(expression: Expression, filters: Expression[], location: Location);
|
|
264
274
|
}
|
|
265
275
|
export declare type Control = ForStatement | IfStatement;
|
|
266
|
-
export declare type ForStatement = ForInStatement | ForOfStatement;
|
|
276
|
+
export declare type ForStatement = ForInStatement | ForOfStatement | ForFromStatement;
|
|
267
277
|
export declare class ForInStatement {
|
|
268
278
|
variables: Parameter[];
|
|
269
279
|
expression: Expression;
|
|
@@ -282,6 +292,16 @@ export declare class ForOfStatement {
|
|
|
282
292
|
type: string;
|
|
283
293
|
constructor(variables: Parameter[], expression: Expression, body: Child[], otherwise: Child[], location: Location);
|
|
284
294
|
}
|
|
295
|
+
export declare class ForFromStatement {
|
|
296
|
+
variable: UntypedParameter;
|
|
297
|
+
start: Expression;
|
|
298
|
+
end: Expression;
|
|
299
|
+
body: Child[];
|
|
300
|
+
otherwise: Child[];
|
|
301
|
+
location: Location;
|
|
302
|
+
type: string;
|
|
303
|
+
constructor(variable: UntypedParameter, start: Expression, end: Expression, body: Child[], otherwise: Child[], location: Location);
|
|
304
|
+
}
|
|
285
305
|
export declare class IfStatement {
|
|
286
306
|
condition: Expression;
|
|
287
307
|
then: Child[];
|
|
@@ -372,10 +392,10 @@ export declare class CallExpression {
|
|
|
372
392
|
* MemberExpression
|
|
373
393
|
*/
|
|
374
394
|
export declare class MemberExpression {
|
|
375
|
-
|
|
376
|
-
|
|
395
|
+
head: Expression;
|
|
396
|
+
tail: UnqualifiedIdentifier | UnqualifiedConstructor | StringLiteral;
|
|
377
397
|
location: Location;
|
|
378
|
-
constructor(
|
|
398
|
+
constructor(head: Expression, tail: UnqualifiedIdentifier | UnqualifiedConstructor | StringLiteral, location: Location);
|
|
379
399
|
}
|
|
380
400
|
export declare class ReadExpression {
|
|
381
401
|
target: Expression;
|