@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/parse/ast.ts CHANGED
@@ -110,7 +110,7 @@ export type Export =
110
110
  | AliasStatement
111
111
  | ContextStatement
112
112
  | LetStatement
113
- | FunStatement
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 FunStatement {
207
- type = "fun-statement";
206
+ export class PartStatement {
207
+ type = "part-statement";
208
208
 
209
209
  constructor(
210
210
  public id: UnqualifiedIdentifier,
211
- public typeParameters: TypeParameter[],
212
- public parameters: Parameter[],
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