@quenk/wml 2.10.5 → 2.11.2
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.js +5 -2
- package/lib/compile/codegen.js.map +1 -1
- package/lib/compile/codegen.ts +12 -9
- package/lib/compile/transform.d.ts +5 -5
- package/lib/compile/transform.js +20 -6
- package/lib/compile/transform.js.map +1 -1
- package/lib/compile/transform.ts +37 -12
- package/lib/dom.d.ts +4 -4
- package/lib/dom.js +12 -7
- package/lib/dom.js.map +1 -1
- package/lib/dom.ts +14 -8
- package/lib/parse/ast.d.ts +5 -1
- package/lib/parse/ast.js +6 -0
- package/lib/parse/ast.js.map +1 -1
- package/lib/parse/ast.ts +17 -3
- package/lib/parse/generated.js +1568 -1520
- package/lib/parse/test.js +9 -0
- package/lib/parse/test.js.map +1 -1
- package/lib/parse/test.ts +15 -0
- package/lib/parse/wml.y +19 -5
- package/package.json +1 -1
package/lib/parse/ast.ts
CHANGED
|
@@ -38,6 +38,16 @@ export class Module {
|
|
|
38
38
|
public exports: Export[],
|
|
39
39
|
public location: Location) { }
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* clone this node.
|
|
43
|
+
*/
|
|
44
|
+
clone() {
|
|
45
|
+
|
|
46
|
+
return new Module(this.imports.slice(), this.exports.slice(),
|
|
47
|
+
this.location);
|
|
48
|
+
|
|
49
|
+
}
|
|
50
|
+
|
|
41
51
|
}
|
|
42
52
|
|
|
43
53
|
/**
|
|
@@ -180,7 +190,11 @@ export class LetStatement {
|
|
|
180
190
|
|
|
181
191
|
}
|
|
182
192
|
|
|
183
|
-
export type ContextTypeIndicator
|
|
193
|
+
export type ContextTypeIndicator
|
|
194
|
+
= Type
|
|
195
|
+
| ContextStatementMember[]
|
|
196
|
+
| ImportStatement
|
|
197
|
+
;
|
|
184
198
|
|
|
185
199
|
/**
|
|
186
200
|
* ViewStatement
|
|
@@ -597,7 +611,7 @@ export class MemberExpression {
|
|
|
597
611
|
|
|
598
612
|
constructor(
|
|
599
613
|
public target: Expression,
|
|
600
|
-
public member: UnqualifiedIdentifier|StringLiteral,
|
|
614
|
+
public member: UnqualifiedIdentifier | StringLiteral,
|
|
601
615
|
public location: Location) { }
|
|
602
616
|
|
|
603
617
|
}
|
|
@@ -694,7 +708,7 @@ export class ContextProperty {
|
|
|
694
708
|
type = 'context-property';
|
|
695
709
|
|
|
696
710
|
constructor(
|
|
697
|
-
public member: UnqualifiedIdentifier|StringLiteral,
|
|
711
|
+
public member: UnqualifiedIdentifier | StringLiteral,
|
|
698
712
|
public location: Location) { }
|
|
699
713
|
|
|
700
714
|
}
|