@quenk/wml 2.11.4 → 2.13.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 +1 -13
- package/lib/compile/codegen.js +550 -656
- package/lib/compile/codegen.js.map +1 -1
- package/lib/compile/codegen.ts +43 -44
- package/lib/compile/index.js +6 -11
- package/lib/compile/index.js.map +1 -1
- package/lib/compile/transform.js +14 -23
- package/lib/compile/transform.js.map +1 -1
- 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 +8 -12
- package/lib/parse/ast.js +167 -227
- package/lib/parse/ast.js.map +1 -1
- package/lib/parse/ast.ts +4 -14
- package/lib/parse/generated.js +2335 -2288
- package/lib/parse/index.js +7 -10
- package/lib/parse/index.js.map +1 -1
- package/lib/parse/test.js +285 -55
- package/lib/parse/test.js.map +1 -1
- package/lib/parse/test.ts +23 -2
- package/lib/parse/wml.y +58 -59
- package/lib/tsconfig.json +1 -1
- package/package.json +1 -2
package/lib/parse/ast.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Types corresponding to the WML AST.
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ContextVariable = exports.ContextProperty = exports.BooleanLiteral = exports.NumberLiteral = exports.StringLiteral = exports.Property = exports.Record = exports.List = exports.FunctionExpression = exports.ReadExpression = exports.MemberExpression = exports.CallExpression = exports.ConstructExpression = exports.FunApplication = exports.ViewConstruction = exports.
|
|
7
|
-
exports.QualifiedIdentifier = exports.UnqualifiedIdentifier = exports.QualifiedConstructor =
|
|
6
|
+
exports.UnqualifiedConstructor = exports.ContextVariable = exports.ContextProperty = exports.BooleanLiteral = exports.NumberLiteral = exports.StringLiteral = exports.Property = exports.Record = exports.List = exports.FunctionExpression = exports.ReadExpression = exports.MemberExpression = exports.CallExpression = exports.ConstructExpression = exports.FunApplication = exports.ViewConstruction = exports.UnaryExpression = exports.BinaryExpression = exports.IfThenExpression = exports.Characters = exports.ElseIfClause = exports.ElseClause = exports.IfStatement = exports.ForFromStatement = exports.ForOfStatement = exports.ForInStatement = exports.Interpolation = exports.Attribute = exports.Widget = exports.Node = exports.UntypedParameter = exports.TypedParameter = exports.TupleType = exports.ListType = exports.RecordType = exports.FunctionType = exports.ConstructorType = exports.TypeParameter = exports.FunStatement = exports.ViewStatement = exports.ContextFromStatement = exports.LetStatement = exports.MemberDeclaration = exports.ContextStatement = exports.AliasStatement = exports.CompositeMember = exports.AggregateMember = exports.AliasedMember = exports.ImportStatement = exports.Module = void 0;
|
|
7
|
+
exports.QualifiedIdentifier = exports.UnqualifiedIdentifier = exports.QualifiedConstructor = void 0;
|
|
8
8
|
;
|
|
9
9
|
/**
|
|
10
10
|
* Module is what a wml file compiles to.
|
|
@@ -13,8 +13,8 @@ exports.QualifiedIdentifier = exports.UnqualifiedIdentifier = exports.QualifiedC
|
|
|
13
13
|
* All declarations in wml are exported. There is no such thing
|
|
14
14
|
* as private here.
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
class Module {
|
|
17
|
+
constructor(imports, exports, location) {
|
|
18
18
|
this.imports = imports;
|
|
19
19
|
this.exports = exports;
|
|
20
20
|
this.location = location;
|
|
@@ -23,139 +23,129 @@ var Module = /** @class */ (function () {
|
|
|
23
23
|
/**
|
|
24
24
|
* clone this node.
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
clone() {
|
|
27
27
|
return new Module(this.imports.slice(), this.exports.slice(), this.location);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
}());
|
|
28
|
+
}
|
|
29
|
+
}
|
|
31
30
|
exports.Module = Module;
|
|
32
31
|
/**
|
|
33
32
|
* ImportStatement
|
|
34
33
|
*/
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
class ImportStatement {
|
|
35
|
+
constructor(member, module, location) {
|
|
37
36
|
this.member = member;
|
|
38
37
|
this.module = module;
|
|
39
38
|
this.location = location;
|
|
40
39
|
this.type = 'import-statement';
|
|
41
40
|
}
|
|
42
|
-
|
|
43
|
-
}());
|
|
41
|
+
}
|
|
44
42
|
exports.ImportStatement = ImportStatement;
|
|
45
43
|
/**
|
|
46
44
|
* AliasedMember
|
|
47
45
|
* @property {Identifier} alias - The identifier introduced to scope.
|
|
48
46
|
* @property {Identifier} member - The identifier that is aliased.
|
|
49
47
|
*/
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
class AliasedMember {
|
|
49
|
+
constructor(member, alias, location) {
|
|
52
50
|
this.member = member;
|
|
53
51
|
this.alias = alias;
|
|
54
52
|
this.location = location;
|
|
55
53
|
this.type = 'aliased-member';
|
|
56
54
|
}
|
|
57
|
-
|
|
58
|
-
}());
|
|
55
|
+
}
|
|
59
56
|
exports.AliasedMember = AliasedMember;
|
|
60
57
|
/**
|
|
61
58
|
* AggregateMember
|
|
62
59
|
*/
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
class AggregateMember {
|
|
61
|
+
constructor(id, location) {
|
|
65
62
|
this.id = id;
|
|
66
63
|
this.location = location;
|
|
67
64
|
this.type = 'qualified-member';
|
|
68
65
|
}
|
|
69
|
-
|
|
70
|
-
}());
|
|
66
|
+
}
|
|
71
67
|
exports.AggregateMember = AggregateMember;
|
|
72
68
|
/**
|
|
73
69
|
* CompositeMember
|
|
74
70
|
* @property {...Identifier|Aliased_Member} members
|
|
75
71
|
*/
|
|
76
|
-
|
|
77
|
-
|
|
72
|
+
class CompositeMember {
|
|
73
|
+
constructor(members, location) {
|
|
78
74
|
this.members = members;
|
|
79
75
|
this.location = location;
|
|
80
76
|
this.type = 'composite-member';
|
|
81
77
|
}
|
|
82
|
-
|
|
83
|
-
}());
|
|
78
|
+
}
|
|
84
79
|
exports.CompositeMember = CompositeMember;
|
|
85
80
|
/**
|
|
86
81
|
* AliasStatement
|
|
87
82
|
*/
|
|
88
|
-
|
|
89
|
-
|
|
83
|
+
class AliasStatement {
|
|
84
|
+
constructor(id, typeParameters, members, location) {
|
|
90
85
|
this.id = id;
|
|
91
86
|
this.typeParameters = typeParameters;
|
|
92
87
|
this.members = members;
|
|
93
88
|
this.location = location;
|
|
94
89
|
this.type = 'alias-statement';
|
|
95
90
|
}
|
|
96
|
-
|
|
97
|
-
}());
|
|
91
|
+
}
|
|
98
92
|
exports.AliasStatement = AliasStatement;
|
|
99
93
|
/**
|
|
100
94
|
* ContextStatement
|
|
101
95
|
*/
|
|
102
|
-
|
|
103
|
-
|
|
96
|
+
class ContextStatement {
|
|
97
|
+
constructor(id, typeParameters, members, location) {
|
|
104
98
|
this.id = id;
|
|
105
99
|
this.typeParameters = typeParameters;
|
|
106
100
|
this.members = members;
|
|
107
101
|
this.location = location;
|
|
108
102
|
this.type = 'context-statement';
|
|
109
103
|
}
|
|
110
|
-
|
|
111
|
-
}());
|
|
104
|
+
}
|
|
112
105
|
exports.ContextStatement = ContextStatement;
|
|
113
106
|
/**
|
|
114
107
|
* MemberDeclaration
|
|
115
108
|
*/
|
|
116
|
-
|
|
117
|
-
|
|
109
|
+
class MemberDeclaration {
|
|
110
|
+
constructor(path, kind, optional, location) {
|
|
118
111
|
this.path = path;
|
|
119
112
|
this.kind = kind;
|
|
120
113
|
this.optional = optional;
|
|
121
114
|
this.location = location;
|
|
122
115
|
this.type = 'member-declaration';
|
|
123
116
|
}
|
|
124
|
-
|
|
125
|
-
}());
|
|
117
|
+
}
|
|
126
118
|
exports.MemberDeclaration = MemberDeclaration;
|
|
127
119
|
/**
|
|
128
120
|
* LetStatement
|
|
129
121
|
*/
|
|
130
|
-
|
|
131
|
-
|
|
122
|
+
class LetStatement {
|
|
123
|
+
constructor(id, cons, expression, location) {
|
|
132
124
|
this.id = id;
|
|
133
125
|
this.cons = cons;
|
|
134
126
|
this.expression = expression;
|
|
135
127
|
this.location = location;
|
|
136
128
|
this.type = 'let-statement';
|
|
137
129
|
}
|
|
138
|
-
|
|
139
|
-
}());
|
|
130
|
+
}
|
|
140
131
|
exports.LetStatement = LetStatement;
|
|
141
132
|
/**
|
|
142
133
|
* ContextFromStatement
|
|
143
134
|
*/
|
|
144
|
-
|
|
145
|
-
|
|
135
|
+
class ContextFromStatement {
|
|
136
|
+
constructor(cons, module, location) {
|
|
146
137
|
this.cons = cons;
|
|
147
138
|
this.module = module;
|
|
148
139
|
this.location = location;
|
|
149
140
|
this.type = 'context-from-statement';
|
|
150
141
|
}
|
|
151
|
-
|
|
152
|
-
}());
|
|
142
|
+
}
|
|
153
143
|
exports.ContextFromStatement = ContextFromStatement;
|
|
154
144
|
/**
|
|
155
145
|
* ViewStatement
|
|
156
146
|
*/
|
|
157
|
-
|
|
158
|
-
|
|
147
|
+
class ViewStatement {
|
|
148
|
+
constructor(id, typeParameters, context, directives, root, location) {
|
|
159
149
|
this.id = id;
|
|
160
150
|
this.typeParameters = typeParameters;
|
|
161
151
|
this.context = context;
|
|
@@ -164,11 +154,10 @@ var ViewStatement = /** @class */ (function () {
|
|
|
164
154
|
this.location = location;
|
|
165
155
|
this.type = 'view-statement';
|
|
166
156
|
}
|
|
167
|
-
|
|
168
|
-
}());
|
|
157
|
+
}
|
|
169
158
|
exports.ViewStatement = ViewStatement;
|
|
170
|
-
|
|
171
|
-
|
|
159
|
+
class FunStatement {
|
|
160
|
+
constructor(id, typeParameters, parameters, body, location) {
|
|
172
161
|
this.id = id;
|
|
173
162
|
this.typeParameters = typeParameters;
|
|
174
163
|
this.parameters = parameters;
|
|
@@ -176,151 +165,139 @@ var FunStatement = /** @class */ (function () {
|
|
|
176
165
|
this.location = location;
|
|
177
166
|
this.type = 'fun-statement';
|
|
178
167
|
}
|
|
179
|
-
|
|
180
|
-
}());
|
|
168
|
+
}
|
|
181
169
|
exports.FunStatement = FunStatement;
|
|
182
170
|
/**
|
|
183
171
|
* TypeParameter
|
|
184
172
|
*/
|
|
185
|
-
|
|
186
|
-
|
|
173
|
+
class TypeParameter {
|
|
174
|
+
constructor(id, constraint, location) {
|
|
187
175
|
this.id = id;
|
|
188
176
|
this.constraint = constraint;
|
|
189
177
|
this.location = location;
|
|
190
178
|
this.type = 'type-parameter';
|
|
191
179
|
}
|
|
192
|
-
|
|
193
|
-
}());
|
|
180
|
+
}
|
|
194
181
|
exports.TypeParameter = TypeParameter;
|
|
195
182
|
/**
|
|
196
183
|
* ConstructorType
|
|
197
184
|
*/
|
|
198
|
-
|
|
199
|
-
|
|
185
|
+
class ConstructorType {
|
|
186
|
+
constructor(id, typeParameters, location) {
|
|
200
187
|
this.id = id;
|
|
201
188
|
this.typeParameters = typeParameters;
|
|
202
189
|
this.location = location;
|
|
203
190
|
this.type = 'constructor-type';
|
|
204
191
|
}
|
|
205
|
-
|
|
206
|
-
}());
|
|
192
|
+
}
|
|
207
193
|
exports.ConstructorType = ConstructorType;
|
|
208
194
|
/**
|
|
209
195
|
* FunctionType
|
|
210
196
|
*/
|
|
211
|
-
|
|
212
|
-
|
|
197
|
+
class FunctionType {
|
|
198
|
+
constructor(parameters, returnType, location) {
|
|
213
199
|
this.parameters = parameters;
|
|
214
200
|
this.returnType = returnType;
|
|
215
201
|
this.location = location;
|
|
216
202
|
this.type = 'function-type';
|
|
217
203
|
}
|
|
218
|
-
|
|
219
|
-
}());
|
|
204
|
+
}
|
|
220
205
|
exports.FunctionType = FunctionType;
|
|
221
206
|
/**
|
|
222
207
|
* RecordType
|
|
223
208
|
*/
|
|
224
|
-
|
|
225
|
-
|
|
209
|
+
class RecordType {
|
|
210
|
+
constructor(members, location) {
|
|
226
211
|
this.members = members;
|
|
227
212
|
this.location = location;
|
|
228
213
|
this.type = 'record-type';
|
|
229
214
|
}
|
|
230
|
-
|
|
231
|
-
}());
|
|
215
|
+
}
|
|
232
216
|
exports.RecordType = RecordType;
|
|
233
217
|
/**
|
|
234
218
|
* ListType
|
|
235
219
|
*/
|
|
236
|
-
|
|
237
|
-
|
|
220
|
+
class ListType {
|
|
221
|
+
constructor(elementType, location) {
|
|
238
222
|
this.elementType = elementType;
|
|
239
223
|
this.location = location;
|
|
240
224
|
this.type = 'list-type';
|
|
241
225
|
}
|
|
242
|
-
|
|
243
|
-
}());
|
|
226
|
+
}
|
|
244
227
|
exports.ListType = ListType;
|
|
245
228
|
/**
|
|
246
229
|
* TupleType
|
|
247
230
|
*/
|
|
248
|
-
|
|
249
|
-
|
|
231
|
+
class TupleType {
|
|
232
|
+
constructor(members, location) {
|
|
250
233
|
this.members = members;
|
|
251
234
|
this.location = location;
|
|
252
235
|
this.type = 'tuple-type';
|
|
253
236
|
}
|
|
254
|
-
|
|
255
|
-
}());
|
|
237
|
+
}
|
|
256
238
|
exports.TupleType = TupleType;
|
|
257
239
|
/**
|
|
258
240
|
* TypeParameter
|
|
259
241
|
*/
|
|
260
|
-
|
|
261
|
-
|
|
242
|
+
class TypedParameter {
|
|
243
|
+
constructor(id, hint, location) {
|
|
262
244
|
this.id = id;
|
|
263
245
|
this.hint = hint;
|
|
264
246
|
this.location = location;
|
|
265
247
|
this.type = 'typed-parameter';
|
|
266
248
|
}
|
|
267
|
-
|
|
268
|
-
}());
|
|
249
|
+
}
|
|
269
250
|
exports.TypedParameter = TypedParameter;
|
|
270
|
-
|
|
271
|
-
|
|
251
|
+
class UntypedParameter {
|
|
252
|
+
constructor(id, location) {
|
|
272
253
|
this.id = id;
|
|
273
254
|
this.location = location;
|
|
274
255
|
this.type = 'untyped-parameter';
|
|
275
256
|
}
|
|
276
|
-
|
|
277
|
-
}());
|
|
257
|
+
}
|
|
278
258
|
exports.UntypedParameter = UntypedParameter;
|
|
279
|
-
|
|
280
|
-
|
|
259
|
+
class Node {
|
|
260
|
+
constructor(open, attributes, children, close) {
|
|
281
261
|
this.open = open;
|
|
282
262
|
this.attributes = attributes;
|
|
283
263
|
this.children = children;
|
|
284
264
|
this.close = close;
|
|
285
265
|
this.type = 'node';
|
|
286
266
|
}
|
|
287
|
-
|
|
288
|
-
}());
|
|
267
|
+
}
|
|
289
268
|
exports.Node = Node;
|
|
290
|
-
|
|
291
|
-
|
|
269
|
+
class Widget {
|
|
270
|
+
constructor(open, typeArgs, attributes, children, close) {
|
|
292
271
|
this.open = open;
|
|
272
|
+
this.typeArgs = typeArgs;
|
|
293
273
|
this.attributes = attributes;
|
|
294
274
|
this.children = children;
|
|
295
275
|
this.close = close;
|
|
296
276
|
this.type = 'widget';
|
|
297
277
|
}
|
|
298
|
-
|
|
299
|
-
}());
|
|
278
|
+
}
|
|
300
279
|
exports.Widget = Widget;
|
|
301
|
-
|
|
302
|
-
|
|
280
|
+
class Attribute {
|
|
281
|
+
constructor(namespace, name, value, location) {
|
|
303
282
|
this.namespace = namespace;
|
|
304
283
|
this.name = name;
|
|
305
284
|
this.value = value;
|
|
306
285
|
this.location = location;
|
|
307
286
|
this.type = 'attribute';
|
|
308
287
|
}
|
|
309
|
-
|
|
310
|
-
}());
|
|
288
|
+
}
|
|
311
289
|
exports.Attribute = Attribute;
|
|
312
|
-
|
|
313
|
-
|
|
290
|
+
class Interpolation {
|
|
291
|
+
constructor(expression, filters, location) {
|
|
314
292
|
this.expression = expression;
|
|
315
293
|
this.filters = filters;
|
|
316
294
|
this.location = location;
|
|
317
295
|
this.type = 'interpolation';
|
|
318
296
|
}
|
|
319
|
-
|
|
320
|
-
}());
|
|
297
|
+
}
|
|
321
298
|
exports.Interpolation = Interpolation;
|
|
322
|
-
|
|
323
|
-
|
|
299
|
+
class ForInStatement {
|
|
300
|
+
constructor(variables, expression, body, otherwise, location) {
|
|
324
301
|
this.variables = variables;
|
|
325
302
|
this.expression = expression;
|
|
326
303
|
this.body = body;
|
|
@@ -328,11 +305,10 @@ var ForInStatement = /** @class */ (function () {
|
|
|
328
305
|
this.location = location;
|
|
329
306
|
this.type = 'for-in-statement';
|
|
330
307
|
}
|
|
331
|
-
|
|
332
|
-
}());
|
|
308
|
+
}
|
|
333
309
|
exports.ForInStatement = ForInStatement;
|
|
334
|
-
|
|
335
|
-
|
|
310
|
+
class ForOfStatement {
|
|
311
|
+
constructor(variables, expression, body, otherwise, location) {
|
|
336
312
|
this.variables = variables;
|
|
337
313
|
this.expression = expression;
|
|
338
314
|
this.body = body;
|
|
@@ -340,11 +316,10 @@ var ForOfStatement = /** @class */ (function () {
|
|
|
340
316
|
this.location = location;
|
|
341
317
|
this.type = 'for-of-statement';
|
|
342
318
|
}
|
|
343
|
-
|
|
344
|
-
}());
|
|
319
|
+
}
|
|
345
320
|
exports.ForOfStatement = ForOfStatement;
|
|
346
|
-
|
|
347
|
-
|
|
321
|
+
class ForFromStatement {
|
|
322
|
+
constructor(variable, start, end, body, otherwise, location) {
|
|
348
323
|
this.variable = variable;
|
|
349
324
|
this.start = start;
|
|
350
325
|
this.end = end;
|
|
@@ -353,144 +328,123 @@ var ForFromStatement = /** @class */ (function () {
|
|
|
353
328
|
this.location = location;
|
|
354
329
|
this.type = 'for-from-statement';
|
|
355
330
|
}
|
|
356
|
-
|
|
357
|
-
}());
|
|
331
|
+
}
|
|
358
332
|
exports.ForFromStatement = ForFromStatement;
|
|
359
|
-
|
|
360
|
-
|
|
333
|
+
class IfStatement {
|
|
334
|
+
constructor(condition, then, elseClause, location) {
|
|
361
335
|
this.condition = condition;
|
|
362
336
|
this.then = then;
|
|
363
337
|
this.elseClause = elseClause;
|
|
364
338
|
this.location = location;
|
|
365
339
|
this.type = 'if-statement';
|
|
366
340
|
}
|
|
367
|
-
|
|
368
|
-
}());
|
|
341
|
+
}
|
|
369
342
|
exports.IfStatement = IfStatement;
|
|
370
|
-
|
|
371
|
-
|
|
343
|
+
class ElseClause {
|
|
344
|
+
constructor(children, location) {
|
|
372
345
|
this.children = children;
|
|
373
346
|
this.location = location;
|
|
374
347
|
this.type = 'else-clause';
|
|
375
348
|
}
|
|
376
|
-
|
|
377
|
-
}());
|
|
349
|
+
}
|
|
378
350
|
exports.ElseClause = ElseClause;
|
|
379
|
-
|
|
380
|
-
|
|
351
|
+
class ElseIfClause {
|
|
352
|
+
constructor(condition, then, elseClause, location) {
|
|
381
353
|
this.condition = condition;
|
|
382
354
|
this.then = then;
|
|
383
355
|
this.elseClause = elseClause;
|
|
384
356
|
this.location = location;
|
|
385
357
|
this.type = 'else-if-clause';
|
|
386
358
|
}
|
|
387
|
-
|
|
388
|
-
}());
|
|
359
|
+
}
|
|
389
360
|
exports.ElseIfClause = ElseIfClause;
|
|
390
|
-
|
|
391
|
-
|
|
361
|
+
class Characters {
|
|
362
|
+
constructor(value, location) {
|
|
392
363
|
this.value = value;
|
|
393
364
|
this.location = location;
|
|
394
365
|
this.type = 'characters';
|
|
395
366
|
}
|
|
396
|
-
|
|
397
|
-
}());
|
|
367
|
+
}
|
|
398
368
|
exports.Characters = Characters;
|
|
399
|
-
|
|
400
|
-
|
|
369
|
+
class IfThenExpression {
|
|
370
|
+
constructor(condition, iftrue, iffalse, location) {
|
|
401
371
|
this.condition = condition;
|
|
402
372
|
this.iftrue = iftrue;
|
|
403
373
|
this.iffalse = iffalse;
|
|
404
374
|
this.location = location;
|
|
405
375
|
this.type = 'if-then-expression';
|
|
406
376
|
}
|
|
407
|
-
|
|
408
|
-
}());
|
|
377
|
+
}
|
|
409
378
|
exports.IfThenExpression = IfThenExpression;
|
|
410
|
-
|
|
411
|
-
|
|
379
|
+
class BinaryExpression {
|
|
380
|
+
constructor(left, operator, right, location) {
|
|
412
381
|
this.left = left;
|
|
413
382
|
this.operator = operator;
|
|
414
383
|
this.right = right;
|
|
415
384
|
this.location = location;
|
|
416
385
|
this.type = 'binary-expression';
|
|
417
386
|
}
|
|
418
|
-
|
|
419
|
-
}());
|
|
387
|
+
}
|
|
420
388
|
exports.BinaryExpression = BinaryExpression;
|
|
421
|
-
|
|
422
|
-
|
|
389
|
+
class UnaryExpression {
|
|
390
|
+
constructor(operator, expression) {
|
|
423
391
|
this.operator = operator;
|
|
424
392
|
this.expression = expression;
|
|
425
393
|
this.type = 'unary-expression';
|
|
426
394
|
}
|
|
427
|
-
|
|
428
|
-
}());
|
|
395
|
+
}
|
|
429
396
|
exports.UnaryExpression = UnaryExpression;
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
this.target = target;
|
|
433
|
-
this.expression = expression;
|
|
434
|
-
this.type = 'type-assertion';
|
|
435
|
-
}
|
|
436
|
-
return TypeAssertion;
|
|
437
|
-
}());
|
|
438
|
-
exports.TypeAssertion = TypeAssertion;
|
|
439
|
-
var ViewConstruction = /** @class */ (function () {
|
|
440
|
-
function ViewConstruction(expression, location) {
|
|
397
|
+
class ViewConstruction {
|
|
398
|
+
constructor(expression, location) {
|
|
441
399
|
this.expression = expression;
|
|
442
400
|
this.location = location;
|
|
443
401
|
this.type = 'view-construction';
|
|
444
402
|
}
|
|
445
|
-
|
|
446
|
-
}());
|
|
403
|
+
}
|
|
447
404
|
exports.ViewConstruction = ViewConstruction;
|
|
448
|
-
|
|
449
|
-
|
|
405
|
+
class FunApplication {
|
|
406
|
+
constructor(target, typeArgs, args, location) {
|
|
450
407
|
this.target = target;
|
|
451
408
|
this.typeArgs = typeArgs;
|
|
452
409
|
this.args = args;
|
|
453
410
|
this.location = location;
|
|
454
411
|
this.type = 'fun-application';
|
|
455
412
|
}
|
|
456
|
-
|
|
457
|
-
}());
|
|
413
|
+
}
|
|
458
414
|
exports.FunApplication = FunApplication;
|
|
459
|
-
|
|
460
|
-
|
|
415
|
+
class ConstructExpression {
|
|
416
|
+
constructor(cons, typeArgs, args, location) {
|
|
461
417
|
this.cons = cons;
|
|
418
|
+
this.typeArgs = typeArgs;
|
|
462
419
|
this.args = args;
|
|
463
420
|
this.location = location;
|
|
464
421
|
this.type = 'construct-expression';
|
|
465
422
|
}
|
|
466
|
-
|
|
467
|
-
}());
|
|
423
|
+
}
|
|
468
424
|
exports.ConstructExpression = ConstructExpression;
|
|
469
|
-
|
|
470
|
-
|
|
425
|
+
class CallExpression {
|
|
426
|
+
constructor(target, typeArgs, args, location) {
|
|
471
427
|
this.target = target;
|
|
472
428
|
this.typeArgs = typeArgs;
|
|
473
429
|
this.args = args;
|
|
474
430
|
this.location = location;
|
|
475
431
|
this.type = 'call-expression';
|
|
476
432
|
}
|
|
477
|
-
|
|
478
|
-
}());
|
|
433
|
+
}
|
|
479
434
|
exports.CallExpression = CallExpression;
|
|
480
435
|
/**
|
|
481
436
|
* MemberExpression
|
|
482
437
|
*/
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
this.
|
|
486
|
-
this.
|
|
438
|
+
class MemberExpression {
|
|
439
|
+
constructor(head, tail, location) {
|
|
440
|
+
this.head = head;
|
|
441
|
+
this.tail = tail;
|
|
487
442
|
this.location = location;
|
|
488
443
|
}
|
|
489
|
-
|
|
490
|
-
}());
|
|
444
|
+
}
|
|
491
445
|
exports.MemberExpression = MemberExpression;
|
|
492
|
-
|
|
493
|
-
|
|
446
|
+
class ReadExpression {
|
|
447
|
+
constructor(target, path, hint, defaults, location) {
|
|
494
448
|
this.target = target;
|
|
495
449
|
this.path = path;
|
|
496
450
|
this.hint = hint;
|
|
@@ -498,130 +452,116 @@ var ReadExpression = /** @class */ (function () {
|
|
|
498
452
|
this.location = location;
|
|
499
453
|
this.type = 'read-expression';
|
|
500
454
|
}
|
|
501
|
-
|
|
502
|
-
}());
|
|
455
|
+
}
|
|
503
456
|
exports.ReadExpression = ReadExpression;
|
|
504
|
-
|
|
505
|
-
|
|
457
|
+
class FunctionExpression {
|
|
458
|
+
constructor(parameters, body, location) {
|
|
506
459
|
this.parameters = parameters;
|
|
507
460
|
this.body = body;
|
|
508
461
|
this.location = location;
|
|
509
462
|
this.type = 'function-expression';
|
|
510
463
|
}
|
|
511
|
-
|
|
512
|
-
}());
|
|
464
|
+
}
|
|
513
465
|
exports.FunctionExpression = FunctionExpression;
|
|
514
|
-
|
|
515
|
-
|
|
466
|
+
class List {
|
|
467
|
+
constructor(members, location) {
|
|
516
468
|
this.members = members;
|
|
517
469
|
this.location = location;
|
|
518
470
|
this.type = 'list';
|
|
519
471
|
}
|
|
520
|
-
|
|
521
|
-
}());
|
|
472
|
+
}
|
|
522
473
|
exports.List = List;
|
|
523
|
-
|
|
524
|
-
|
|
474
|
+
class Record {
|
|
475
|
+
constructor(properties, location) {
|
|
525
476
|
this.properties = properties;
|
|
526
477
|
this.location = location;
|
|
527
478
|
this.type = 'record';
|
|
528
479
|
}
|
|
529
|
-
|
|
530
|
-
}());
|
|
480
|
+
}
|
|
531
481
|
exports.Record = Record;
|
|
532
|
-
|
|
533
|
-
|
|
482
|
+
class Property {
|
|
483
|
+
constructor(key, value, location) {
|
|
534
484
|
this.key = key;
|
|
535
485
|
this.value = value;
|
|
536
486
|
this.location = location;
|
|
537
487
|
this.type = 'property';
|
|
538
488
|
}
|
|
539
|
-
|
|
540
|
-
}());
|
|
489
|
+
}
|
|
541
490
|
exports.Property = Property;
|
|
542
|
-
|
|
543
|
-
|
|
491
|
+
class StringLiteral {
|
|
492
|
+
constructor(value, location) {
|
|
544
493
|
this.value = value;
|
|
545
494
|
this.location = location;
|
|
546
495
|
this.type = 'string';
|
|
547
496
|
}
|
|
548
|
-
|
|
549
|
-
}());
|
|
497
|
+
}
|
|
550
498
|
exports.StringLiteral = StringLiteral;
|
|
551
|
-
|
|
552
|
-
|
|
499
|
+
class NumberLiteral {
|
|
500
|
+
constructor(value, location) {
|
|
553
501
|
this.value = value;
|
|
554
502
|
this.location = location;
|
|
555
503
|
this.type = 'number-literal';
|
|
556
504
|
}
|
|
557
|
-
|
|
558
|
-
}());
|
|
505
|
+
}
|
|
559
506
|
exports.NumberLiteral = NumberLiteral;
|
|
560
|
-
|
|
561
|
-
|
|
507
|
+
class BooleanLiteral {
|
|
508
|
+
constructor(value, location) {
|
|
562
509
|
this.value = value;
|
|
563
510
|
this.location = location;
|
|
564
511
|
this.type = 'boolean-literal';
|
|
565
512
|
}
|
|
566
|
-
|
|
567
|
-
}());
|
|
513
|
+
}
|
|
568
514
|
exports.BooleanLiteral = BooleanLiteral;
|
|
569
|
-
|
|
570
|
-
|
|
515
|
+
class ContextProperty {
|
|
516
|
+
constructor(member, location) {
|
|
571
517
|
this.member = member;
|
|
572
518
|
this.location = location;
|
|
573
519
|
this.type = 'context-property';
|
|
574
520
|
}
|
|
575
|
-
|
|
576
|
-
}());
|
|
521
|
+
}
|
|
577
522
|
exports.ContextProperty = ContextProperty;
|
|
578
|
-
|
|
579
|
-
|
|
523
|
+
class ContextVariable {
|
|
524
|
+
constructor(location) {
|
|
580
525
|
this.location = location;
|
|
581
526
|
this.type = 'context-variable';
|
|
582
527
|
}
|
|
583
|
-
|
|
584
|
-
}());
|
|
528
|
+
}
|
|
585
529
|
exports.ContextVariable = ContextVariable;
|
|
586
|
-
|
|
587
|
-
|
|
530
|
+
class UnqualifiedConstructor {
|
|
531
|
+
constructor(value, location) {
|
|
588
532
|
this.value = value;
|
|
589
533
|
this.location = location;
|
|
590
534
|
this.type = 'unqualified-constructor';
|
|
591
535
|
}
|
|
592
|
-
|
|
593
|
-
}());
|
|
536
|
+
}
|
|
594
537
|
exports.UnqualifiedConstructor = UnqualifiedConstructor;
|
|
595
|
-
|
|
596
|
-
|
|
538
|
+
class QualifiedConstructor {
|
|
539
|
+
constructor(qualifier, member, location) {
|
|
597
540
|
this.qualifier = qualifier;
|
|
598
541
|
this.member = member;
|
|
599
542
|
this.location = location;
|
|
600
543
|
this.type = 'qualified-constructor';
|
|
601
544
|
}
|
|
602
|
-
|
|
603
|
-
}());
|
|
545
|
+
}
|
|
604
546
|
exports.QualifiedConstructor = QualifiedConstructor;
|
|
605
|
-
|
|
606
|
-
|
|
547
|
+
class UnqualifiedIdentifier {
|
|
548
|
+
constructor(value, location) {
|
|
607
549
|
this.value = value;
|
|
608
550
|
this.location = location;
|
|
609
551
|
this.type = 'unqualified-identifier';
|
|
610
552
|
}
|
|
611
|
-
|
|
612
|
-
}());
|
|
553
|
+
}
|
|
613
554
|
exports.UnqualifiedIdentifier = UnqualifiedIdentifier;
|
|
614
555
|
/**
|
|
615
556
|
* QualifiedIdentifier
|
|
616
557
|
*/
|
|
617
|
-
|
|
618
|
-
|
|
558
|
+
class QualifiedIdentifier {
|
|
559
|
+
constructor(qualifier, member, location) {
|
|
619
560
|
this.qualifier = qualifier;
|
|
620
561
|
this.member = member;
|
|
621
562
|
this.location = location;
|
|
622
563
|
this.type = 'qualified-identifier';
|
|
623
564
|
}
|
|
624
|
-
|
|
625
|
-
}());
|
|
565
|
+
}
|
|
626
566
|
exports.QualifiedIdentifier = QualifiedIdentifier;
|
|
627
567
|
//# sourceMappingURL=ast.js.map
|