@quenk/wml 2.11.1 → 2.11.4
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/compile/codegen.d.ts +5 -1
- package/lib/compile/codegen.js +31 -6
- package/lib/compile/codegen.js.map +1 -1
- package/lib/compile/codegen.ts +45 -13
- package/lib/compile/transform.js +8 -5
- package/lib/compile/transform.js.map +1 -1
- package/lib/compile/transform.ts +12 -6
- package/lib/parse/ast.d.ts +22 -2
- package/lib/parse/ast.js +28 -2
- package/lib/parse/ast.js.map +1 -1
- package/lib/parse/ast.ts +31 -3
- package/lib/parse/generated.js +2316 -2207
- package/lib/parse/test.js +10 -1
- package/lib/parse/test.js.map +1 -1
- package/lib/parse/test.ts +21 -1
- package/lib/parse/wml.y +30 -11
- package/package.json +1 -1
package/lib/parse/ast.ts
CHANGED
|
@@ -191,11 +191,24 @@ export class LetStatement {
|
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
export type ContextTypeIndicator
|
|
194
|
-
=
|
|
195
|
-
|
|
|
196
|
-
| ImportStatement
|
|
194
|
+
= ConstructorType
|
|
195
|
+
| ContextFromStatement
|
|
197
196
|
;
|
|
198
197
|
|
|
198
|
+
/**
|
|
199
|
+
* ContextFromStatement
|
|
200
|
+
*/
|
|
201
|
+
export class ContextFromStatement {
|
|
202
|
+
|
|
203
|
+
type = 'context-from-statement';
|
|
204
|
+
|
|
205
|
+
constructor(
|
|
206
|
+
public cons: ConstructorType,
|
|
207
|
+
public module: StringLiteral,
|
|
208
|
+
public location: Location) { }
|
|
209
|
+
|
|
210
|
+
}
|
|
211
|
+
|
|
199
212
|
/**
|
|
200
213
|
* ViewStatement
|
|
201
214
|
*/
|
|
@@ -423,6 +436,7 @@ export type Control
|
|
|
423
436
|
export type ForStatement
|
|
424
437
|
= ForInStatement
|
|
425
438
|
| ForOfStatement
|
|
439
|
+
| ForFromStatement
|
|
426
440
|
;
|
|
427
441
|
|
|
428
442
|
export class ForInStatement {
|
|
@@ -451,6 +465,20 @@ export class ForOfStatement {
|
|
|
451
465
|
|
|
452
466
|
}
|
|
453
467
|
|
|
468
|
+
export class ForFromStatement {
|
|
469
|
+
|
|
470
|
+
type = 'for-from-statement';
|
|
471
|
+
|
|
472
|
+
constructor(
|
|
473
|
+
public variable: UntypedParameter,
|
|
474
|
+
public start: Expression,
|
|
475
|
+
public end: Expression,
|
|
476
|
+
public body: Child[],
|
|
477
|
+
public otherwise: Child[],
|
|
478
|
+
public location: Location) { }
|
|
479
|
+
|
|
480
|
+
}
|
|
481
|
+
|
|
454
482
|
export class IfStatement {
|
|
455
483
|
|
|
456
484
|
type = 'if-statement';
|