@quenk/wml 2.11.4 → 2.12.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 -9
- package/lib/compile/codegen.js +547 -646
- package/lib/compile/codegen.js.map +1 -1
- package/lib/compile/codegen.ts +26 -22
- 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 +3 -3
- package/lib/parse/ast.js +166 -220
- package/lib/parse/ast.js.map +1 -1
- package/lib/parse/ast.ts +2 -2
- package/lib/parse/generated.js +1649 -1685
- package/lib/parse/index.js +7 -10
- package/lib/parse/index.js.map +1 -1
- package/lib/parse/test.js +277 -54
- package/lib/parse/test.js.map +1 -1
- package/lib/parse/test.ts +10 -1
- package/lib/parse/wml.y +30 -39
- package/lib/tsconfig.json +1 -1
- package/package.json +1 -2
package/lib/parse/ast.js
CHANGED
|
@@ -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,138 @@ 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, attributes, children, close) {
|
|
292
271
|
this.open = open;
|
|
293
272
|
this.attributes = attributes;
|
|
294
273
|
this.children = children;
|
|
295
274
|
this.close = close;
|
|
296
275
|
this.type = 'widget';
|
|
297
276
|
}
|
|
298
|
-
|
|
299
|
-
}());
|
|
277
|
+
}
|
|
300
278
|
exports.Widget = Widget;
|
|
301
|
-
|
|
302
|
-
|
|
279
|
+
class Attribute {
|
|
280
|
+
constructor(namespace, name, value, location) {
|
|
303
281
|
this.namespace = namespace;
|
|
304
282
|
this.name = name;
|
|
305
283
|
this.value = value;
|
|
306
284
|
this.location = location;
|
|
307
285
|
this.type = 'attribute';
|
|
308
286
|
}
|
|
309
|
-
|
|
310
|
-
}());
|
|
287
|
+
}
|
|
311
288
|
exports.Attribute = Attribute;
|
|
312
|
-
|
|
313
|
-
|
|
289
|
+
class Interpolation {
|
|
290
|
+
constructor(expression, filters, location) {
|
|
314
291
|
this.expression = expression;
|
|
315
292
|
this.filters = filters;
|
|
316
293
|
this.location = location;
|
|
317
294
|
this.type = 'interpolation';
|
|
318
295
|
}
|
|
319
|
-
|
|
320
|
-
}());
|
|
296
|
+
}
|
|
321
297
|
exports.Interpolation = Interpolation;
|
|
322
|
-
|
|
323
|
-
|
|
298
|
+
class ForInStatement {
|
|
299
|
+
constructor(variables, expression, body, otherwise, location) {
|
|
324
300
|
this.variables = variables;
|
|
325
301
|
this.expression = expression;
|
|
326
302
|
this.body = body;
|
|
@@ -328,11 +304,10 @@ var ForInStatement = /** @class */ (function () {
|
|
|
328
304
|
this.location = location;
|
|
329
305
|
this.type = 'for-in-statement';
|
|
330
306
|
}
|
|
331
|
-
|
|
332
|
-
}());
|
|
307
|
+
}
|
|
333
308
|
exports.ForInStatement = ForInStatement;
|
|
334
|
-
|
|
335
|
-
|
|
309
|
+
class ForOfStatement {
|
|
310
|
+
constructor(variables, expression, body, otherwise, location) {
|
|
336
311
|
this.variables = variables;
|
|
337
312
|
this.expression = expression;
|
|
338
313
|
this.body = body;
|
|
@@ -340,11 +315,10 @@ var ForOfStatement = /** @class */ (function () {
|
|
|
340
315
|
this.location = location;
|
|
341
316
|
this.type = 'for-of-statement';
|
|
342
317
|
}
|
|
343
|
-
|
|
344
|
-
}());
|
|
318
|
+
}
|
|
345
319
|
exports.ForOfStatement = ForOfStatement;
|
|
346
|
-
|
|
347
|
-
|
|
320
|
+
class ForFromStatement {
|
|
321
|
+
constructor(variable, start, end, body, otherwise, location) {
|
|
348
322
|
this.variable = variable;
|
|
349
323
|
this.start = start;
|
|
350
324
|
this.end = end;
|
|
@@ -353,144 +327,130 @@ var ForFromStatement = /** @class */ (function () {
|
|
|
353
327
|
this.location = location;
|
|
354
328
|
this.type = 'for-from-statement';
|
|
355
329
|
}
|
|
356
|
-
|
|
357
|
-
}());
|
|
330
|
+
}
|
|
358
331
|
exports.ForFromStatement = ForFromStatement;
|
|
359
|
-
|
|
360
|
-
|
|
332
|
+
class IfStatement {
|
|
333
|
+
constructor(condition, then, elseClause, location) {
|
|
361
334
|
this.condition = condition;
|
|
362
335
|
this.then = then;
|
|
363
336
|
this.elseClause = elseClause;
|
|
364
337
|
this.location = location;
|
|
365
338
|
this.type = 'if-statement';
|
|
366
339
|
}
|
|
367
|
-
|
|
368
|
-
}());
|
|
340
|
+
}
|
|
369
341
|
exports.IfStatement = IfStatement;
|
|
370
|
-
|
|
371
|
-
|
|
342
|
+
class ElseClause {
|
|
343
|
+
constructor(children, location) {
|
|
372
344
|
this.children = children;
|
|
373
345
|
this.location = location;
|
|
374
346
|
this.type = 'else-clause';
|
|
375
347
|
}
|
|
376
|
-
|
|
377
|
-
}());
|
|
348
|
+
}
|
|
378
349
|
exports.ElseClause = ElseClause;
|
|
379
|
-
|
|
380
|
-
|
|
350
|
+
class ElseIfClause {
|
|
351
|
+
constructor(condition, then, elseClause, location) {
|
|
381
352
|
this.condition = condition;
|
|
382
353
|
this.then = then;
|
|
383
354
|
this.elseClause = elseClause;
|
|
384
355
|
this.location = location;
|
|
385
356
|
this.type = 'else-if-clause';
|
|
386
357
|
}
|
|
387
|
-
|
|
388
|
-
}());
|
|
358
|
+
}
|
|
389
359
|
exports.ElseIfClause = ElseIfClause;
|
|
390
|
-
|
|
391
|
-
|
|
360
|
+
class Characters {
|
|
361
|
+
constructor(value, location) {
|
|
392
362
|
this.value = value;
|
|
393
363
|
this.location = location;
|
|
394
364
|
this.type = 'characters';
|
|
395
365
|
}
|
|
396
|
-
|
|
397
|
-
}());
|
|
366
|
+
}
|
|
398
367
|
exports.Characters = Characters;
|
|
399
|
-
|
|
400
|
-
|
|
368
|
+
class IfThenExpression {
|
|
369
|
+
constructor(condition, iftrue, iffalse, location) {
|
|
401
370
|
this.condition = condition;
|
|
402
371
|
this.iftrue = iftrue;
|
|
403
372
|
this.iffalse = iffalse;
|
|
404
373
|
this.location = location;
|
|
405
374
|
this.type = 'if-then-expression';
|
|
406
375
|
}
|
|
407
|
-
|
|
408
|
-
}());
|
|
376
|
+
}
|
|
409
377
|
exports.IfThenExpression = IfThenExpression;
|
|
410
|
-
|
|
411
|
-
|
|
378
|
+
class BinaryExpression {
|
|
379
|
+
constructor(left, operator, right, location) {
|
|
412
380
|
this.left = left;
|
|
413
381
|
this.operator = operator;
|
|
414
382
|
this.right = right;
|
|
415
383
|
this.location = location;
|
|
416
384
|
this.type = 'binary-expression';
|
|
417
385
|
}
|
|
418
|
-
|
|
419
|
-
}());
|
|
386
|
+
}
|
|
420
387
|
exports.BinaryExpression = BinaryExpression;
|
|
421
|
-
|
|
422
|
-
|
|
388
|
+
class UnaryExpression {
|
|
389
|
+
constructor(operator, expression) {
|
|
423
390
|
this.operator = operator;
|
|
424
391
|
this.expression = expression;
|
|
425
392
|
this.type = 'unary-expression';
|
|
426
393
|
}
|
|
427
|
-
|
|
428
|
-
}());
|
|
394
|
+
}
|
|
429
395
|
exports.UnaryExpression = UnaryExpression;
|
|
430
|
-
|
|
431
|
-
|
|
396
|
+
class TypeAssertion {
|
|
397
|
+
constructor(target, expression) {
|
|
432
398
|
this.target = target;
|
|
433
399
|
this.expression = expression;
|
|
434
400
|
this.type = 'type-assertion';
|
|
435
401
|
}
|
|
436
|
-
|
|
437
|
-
}());
|
|
402
|
+
}
|
|
438
403
|
exports.TypeAssertion = TypeAssertion;
|
|
439
|
-
|
|
440
|
-
|
|
404
|
+
class ViewConstruction {
|
|
405
|
+
constructor(expression, location) {
|
|
441
406
|
this.expression = expression;
|
|
442
407
|
this.location = location;
|
|
443
408
|
this.type = 'view-construction';
|
|
444
409
|
}
|
|
445
|
-
|
|
446
|
-
}());
|
|
410
|
+
}
|
|
447
411
|
exports.ViewConstruction = ViewConstruction;
|
|
448
|
-
|
|
449
|
-
|
|
412
|
+
class FunApplication {
|
|
413
|
+
constructor(target, typeArgs, args, location) {
|
|
450
414
|
this.target = target;
|
|
451
415
|
this.typeArgs = typeArgs;
|
|
452
416
|
this.args = args;
|
|
453
417
|
this.location = location;
|
|
454
418
|
this.type = 'fun-application';
|
|
455
419
|
}
|
|
456
|
-
|
|
457
|
-
}());
|
|
420
|
+
}
|
|
458
421
|
exports.FunApplication = FunApplication;
|
|
459
|
-
|
|
460
|
-
|
|
422
|
+
class ConstructExpression {
|
|
423
|
+
constructor(cons, args, location) {
|
|
461
424
|
this.cons = cons;
|
|
462
425
|
this.args = args;
|
|
463
426
|
this.location = location;
|
|
464
427
|
this.type = 'construct-expression';
|
|
465
428
|
}
|
|
466
|
-
|
|
467
|
-
}());
|
|
429
|
+
}
|
|
468
430
|
exports.ConstructExpression = ConstructExpression;
|
|
469
|
-
|
|
470
|
-
|
|
431
|
+
class CallExpression {
|
|
432
|
+
constructor(target, typeArgs, args, location) {
|
|
471
433
|
this.target = target;
|
|
472
434
|
this.typeArgs = typeArgs;
|
|
473
435
|
this.args = args;
|
|
474
436
|
this.location = location;
|
|
475
437
|
this.type = 'call-expression';
|
|
476
438
|
}
|
|
477
|
-
|
|
478
|
-
}());
|
|
439
|
+
}
|
|
479
440
|
exports.CallExpression = CallExpression;
|
|
480
441
|
/**
|
|
481
442
|
* MemberExpression
|
|
482
443
|
*/
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
this.
|
|
486
|
-
this.
|
|
444
|
+
class MemberExpression {
|
|
445
|
+
constructor(head, tail, location) {
|
|
446
|
+
this.head = head;
|
|
447
|
+
this.tail = tail;
|
|
487
448
|
this.location = location;
|
|
488
449
|
}
|
|
489
|
-
|
|
490
|
-
}());
|
|
450
|
+
}
|
|
491
451
|
exports.MemberExpression = MemberExpression;
|
|
492
|
-
|
|
493
|
-
|
|
452
|
+
class ReadExpression {
|
|
453
|
+
constructor(target, path, hint, defaults, location) {
|
|
494
454
|
this.target = target;
|
|
495
455
|
this.path = path;
|
|
496
456
|
this.hint = hint;
|
|
@@ -498,130 +458,116 @@ var ReadExpression = /** @class */ (function () {
|
|
|
498
458
|
this.location = location;
|
|
499
459
|
this.type = 'read-expression';
|
|
500
460
|
}
|
|
501
|
-
|
|
502
|
-
}());
|
|
461
|
+
}
|
|
503
462
|
exports.ReadExpression = ReadExpression;
|
|
504
|
-
|
|
505
|
-
|
|
463
|
+
class FunctionExpression {
|
|
464
|
+
constructor(parameters, body, location) {
|
|
506
465
|
this.parameters = parameters;
|
|
507
466
|
this.body = body;
|
|
508
467
|
this.location = location;
|
|
509
468
|
this.type = 'function-expression';
|
|
510
469
|
}
|
|
511
|
-
|
|
512
|
-
}());
|
|
470
|
+
}
|
|
513
471
|
exports.FunctionExpression = FunctionExpression;
|
|
514
|
-
|
|
515
|
-
|
|
472
|
+
class List {
|
|
473
|
+
constructor(members, location) {
|
|
516
474
|
this.members = members;
|
|
517
475
|
this.location = location;
|
|
518
476
|
this.type = 'list';
|
|
519
477
|
}
|
|
520
|
-
|
|
521
|
-
}());
|
|
478
|
+
}
|
|
522
479
|
exports.List = List;
|
|
523
|
-
|
|
524
|
-
|
|
480
|
+
class Record {
|
|
481
|
+
constructor(properties, location) {
|
|
525
482
|
this.properties = properties;
|
|
526
483
|
this.location = location;
|
|
527
484
|
this.type = 'record';
|
|
528
485
|
}
|
|
529
|
-
|
|
530
|
-
}());
|
|
486
|
+
}
|
|
531
487
|
exports.Record = Record;
|
|
532
|
-
|
|
533
|
-
|
|
488
|
+
class Property {
|
|
489
|
+
constructor(key, value, location) {
|
|
534
490
|
this.key = key;
|
|
535
491
|
this.value = value;
|
|
536
492
|
this.location = location;
|
|
537
493
|
this.type = 'property';
|
|
538
494
|
}
|
|
539
|
-
|
|
540
|
-
}());
|
|
495
|
+
}
|
|
541
496
|
exports.Property = Property;
|
|
542
|
-
|
|
543
|
-
|
|
497
|
+
class StringLiteral {
|
|
498
|
+
constructor(value, location) {
|
|
544
499
|
this.value = value;
|
|
545
500
|
this.location = location;
|
|
546
501
|
this.type = 'string';
|
|
547
502
|
}
|
|
548
|
-
|
|
549
|
-
}());
|
|
503
|
+
}
|
|
550
504
|
exports.StringLiteral = StringLiteral;
|
|
551
|
-
|
|
552
|
-
|
|
505
|
+
class NumberLiteral {
|
|
506
|
+
constructor(value, location) {
|
|
553
507
|
this.value = value;
|
|
554
508
|
this.location = location;
|
|
555
509
|
this.type = 'number-literal';
|
|
556
510
|
}
|
|
557
|
-
|
|
558
|
-
}());
|
|
511
|
+
}
|
|
559
512
|
exports.NumberLiteral = NumberLiteral;
|
|
560
|
-
|
|
561
|
-
|
|
513
|
+
class BooleanLiteral {
|
|
514
|
+
constructor(value, location) {
|
|
562
515
|
this.value = value;
|
|
563
516
|
this.location = location;
|
|
564
517
|
this.type = 'boolean-literal';
|
|
565
518
|
}
|
|
566
|
-
|
|
567
|
-
}());
|
|
519
|
+
}
|
|
568
520
|
exports.BooleanLiteral = BooleanLiteral;
|
|
569
|
-
|
|
570
|
-
|
|
521
|
+
class ContextProperty {
|
|
522
|
+
constructor(member, location) {
|
|
571
523
|
this.member = member;
|
|
572
524
|
this.location = location;
|
|
573
525
|
this.type = 'context-property';
|
|
574
526
|
}
|
|
575
|
-
|
|
576
|
-
}());
|
|
527
|
+
}
|
|
577
528
|
exports.ContextProperty = ContextProperty;
|
|
578
|
-
|
|
579
|
-
|
|
529
|
+
class ContextVariable {
|
|
530
|
+
constructor(location) {
|
|
580
531
|
this.location = location;
|
|
581
532
|
this.type = 'context-variable';
|
|
582
533
|
}
|
|
583
|
-
|
|
584
|
-
}());
|
|
534
|
+
}
|
|
585
535
|
exports.ContextVariable = ContextVariable;
|
|
586
|
-
|
|
587
|
-
|
|
536
|
+
class UnqualifiedConstructor {
|
|
537
|
+
constructor(value, location) {
|
|
588
538
|
this.value = value;
|
|
589
539
|
this.location = location;
|
|
590
540
|
this.type = 'unqualified-constructor';
|
|
591
541
|
}
|
|
592
|
-
|
|
593
|
-
}());
|
|
542
|
+
}
|
|
594
543
|
exports.UnqualifiedConstructor = UnqualifiedConstructor;
|
|
595
|
-
|
|
596
|
-
|
|
544
|
+
class QualifiedConstructor {
|
|
545
|
+
constructor(qualifier, member, location) {
|
|
597
546
|
this.qualifier = qualifier;
|
|
598
547
|
this.member = member;
|
|
599
548
|
this.location = location;
|
|
600
549
|
this.type = 'qualified-constructor';
|
|
601
550
|
}
|
|
602
|
-
|
|
603
|
-
}());
|
|
551
|
+
}
|
|
604
552
|
exports.QualifiedConstructor = QualifiedConstructor;
|
|
605
|
-
|
|
606
|
-
|
|
553
|
+
class UnqualifiedIdentifier {
|
|
554
|
+
constructor(value, location) {
|
|
607
555
|
this.value = value;
|
|
608
556
|
this.location = location;
|
|
609
557
|
this.type = 'unqualified-identifier';
|
|
610
558
|
}
|
|
611
|
-
|
|
612
|
-
}());
|
|
559
|
+
}
|
|
613
560
|
exports.UnqualifiedIdentifier = UnqualifiedIdentifier;
|
|
614
561
|
/**
|
|
615
562
|
* QualifiedIdentifier
|
|
616
563
|
*/
|
|
617
|
-
|
|
618
|
-
|
|
564
|
+
class QualifiedIdentifier {
|
|
565
|
+
constructor(qualifier, member, location) {
|
|
619
566
|
this.qualifier = qualifier;
|
|
620
567
|
this.member = member;
|
|
621
568
|
this.location = location;
|
|
622
569
|
this.type = 'qualified-identifier';
|
|
623
570
|
}
|
|
624
|
-
|
|
625
|
-
}());
|
|
571
|
+
}
|
|
626
572
|
exports.QualifiedIdentifier = QualifiedIdentifier;
|
|
627
573
|
//# sourceMappingURL=ast.js.map
|