@quenk/wml 2.14.0 → 2.15.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/compile/codegen.d.ts +9 -0
- package/lib/compile/codegen.js +47 -6
- package/lib/compile/codegen.js.map +1 -1
- package/lib/compile/codegen.ts +57 -4
- package/lib/index.d.ts +1 -1
- package/lib/index.js.map +1 -1
- package/lib/index.ts +1 -1
- package/lib/parse/ast.d.ts +20 -6
- package/lib/parse/ast.js +25 -8
- package/lib/parse/ast.js.map +1 -1
- package/lib/parse/ast.ts +27 -6
- package/lib/parse/generated.js +2914 -2403
- package/lib/parse/test.js +29 -56
- package/lib/parse/test.js.map +1 -1
- package/lib/parse/test.ts +29 -68
- package/lib/parse/wml.y +59 -19
- package/lib/view/frame.d.ts +49 -13
- package/lib/view/frame.js +10 -47
- package/lib/view/frame.js.map +1 -1
- package/lib/view/frame.ts +100 -47
- package/lib/view/index.d.ts +9 -8
- package/lib/view/index.js +6 -5
- package/lib/view/index.js.map +1 -1
- package/lib/view/index.ts +13 -10
- package/package.json +6 -2
package/lib/parse/ast.ts
CHANGED
|
@@ -110,7 +110,7 @@ export type Export =
|
|
|
110
110
|
| AliasStatement
|
|
111
111
|
| ContextStatement
|
|
112
112
|
| LetStatement
|
|
113
|
-
|
|
|
113
|
+
| PartStatement
|
|
114
114
|
| ViewStatement
|
|
115
115
|
| Tag;
|
|
116
116
|
|
|
@@ -203,13 +203,13 @@ export class ViewStatement {
|
|
|
203
203
|
) {}
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
export class
|
|
207
|
-
type = "
|
|
206
|
+
export class PartStatement {
|
|
207
|
+
type = "part-statement";
|
|
208
208
|
|
|
209
209
|
constructor(
|
|
210
210
|
public id: UnqualifiedIdentifier,
|
|
211
|
-
public
|
|
212
|
-
public
|
|
211
|
+
public context: ContextTypeIndicator | undefined,
|
|
212
|
+
public directives: LetStatement[],
|
|
213
213
|
public body: Child[],
|
|
214
214
|
public location: Location,
|
|
215
215
|
) {}
|
|
@@ -372,7 +372,7 @@ export class Interpolation {
|
|
|
372
372
|
) {}
|
|
373
373
|
}
|
|
374
374
|
|
|
375
|
-
export type Control = ForStatement | IfStatement;
|
|
375
|
+
export type Control = ForStatement | IfStatement | UseStatement;
|
|
376
376
|
|
|
377
377
|
export abstract class ForStatement {
|
|
378
378
|
abstract type: string;
|
|
@@ -458,6 +458,27 @@ export class ElseIfClause {
|
|
|
458
458
|
) {}
|
|
459
459
|
}
|
|
460
460
|
|
|
461
|
+
export type UseStatement = UsePartStatement | UseViewStatement;
|
|
462
|
+
|
|
463
|
+
export class UsePartStatement {
|
|
464
|
+
type = "use-part-statement";
|
|
465
|
+
|
|
466
|
+
constructor(
|
|
467
|
+
public target: Expression,
|
|
468
|
+
public context: Expression | undefined,
|
|
469
|
+
public location: Location,
|
|
470
|
+
) {}
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
export class UseViewStatement {
|
|
474
|
+
type = "use-view-statement";
|
|
475
|
+
|
|
476
|
+
constructor(
|
|
477
|
+
public target: Expression,
|
|
478
|
+
public location: Location,
|
|
479
|
+
) {}
|
|
480
|
+
}
|
|
481
|
+
|
|
461
482
|
export class Characters {
|
|
462
483
|
type = "characters";
|
|
463
484
|
|