@quenk/wml 2.11.3 → 2.12.1
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 +548 -647
- package/lib/compile/codegen.js.map +1 -1
- package/lib/compile/codegen.ts +28 -24
- package/lib/compile/index.js +6 -11
- package/lib/compile/index.js.map +1 -1
- package/lib/compile/transform.js +19 -25
- package/lib/compile/transform.js.map +1 -1
- package/lib/compile/transform.ts +12 -6
- 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 +14 -4
- package/lib/parse/ast.js +177 -218
- package/lib/parse/ast.js.map +1 -1
- package/lib/parse/ast.ts +18 -5
- package/lib/parse/generated.js +2068 -2039
- 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 +46 -46
- 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.
|
|
7
|
-
exports.QualifiedIdentifier = exports.UnqualifiedIdentifier = exports.QualifiedConstructor = void 0;
|
|
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.TypeAssertion = 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 = exports.UnqualifiedConstructor = 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,126 +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;
|
|
132
|
+
/**
|
|
133
|
+
* ContextFromStatement
|
|
134
|
+
*/
|
|
135
|
+
class ContextFromStatement {
|
|
136
|
+
constructor(cons, module, location) {
|
|
137
|
+
this.cons = cons;
|
|
138
|
+
this.module = module;
|
|
139
|
+
this.location = location;
|
|
140
|
+
this.type = 'context-from-statement';
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
exports.ContextFromStatement = ContextFromStatement;
|
|
141
144
|
/**
|
|
142
145
|
* ViewStatement
|
|
143
146
|
*/
|
|
144
|
-
|
|
145
|
-
|
|
147
|
+
class ViewStatement {
|
|
148
|
+
constructor(id, typeParameters, context, directives, root, location) {
|
|
146
149
|
this.id = id;
|
|
147
150
|
this.typeParameters = typeParameters;
|
|
148
151
|
this.context = context;
|
|
@@ -151,11 +154,10 @@ var ViewStatement = /** @class */ (function () {
|
|
|
151
154
|
this.location = location;
|
|
152
155
|
this.type = 'view-statement';
|
|
153
156
|
}
|
|
154
|
-
|
|
155
|
-
}());
|
|
157
|
+
}
|
|
156
158
|
exports.ViewStatement = ViewStatement;
|
|
157
|
-
|
|
158
|
-
|
|
159
|
+
class FunStatement {
|
|
160
|
+
constructor(id, typeParameters, parameters, body, location) {
|
|
159
161
|
this.id = id;
|
|
160
162
|
this.typeParameters = typeParameters;
|
|
161
163
|
this.parameters = parameters;
|
|
@@ -163,151 +165,138 @@ var FunStatement = /** @class */ (function () {
|
|
|
163
165
|
this.location = location;
|
|
164
166
|
this.type = 'fun-statement';
|
|
165
167
|
}
|
|
166
|
-
|
|
167
|
-
}());
|
|
168
|
+
}
|
|
168
169
|
exports.FunStatement = FunStatement;
|
|
169
170
|
/**
|
|
170
171
|
* TypeParameter
|
|
171
172
|
*/
|
|
172
|
-
|
|
173
|
-
|
|
173
|
+
class TypeParameter {
|
|
174
|
+
constructor(id, constraint, location) {
|
|
174
175
|
this.id = id;
|
|
175
176
|
this.constraint = constraint;
|
|
176
177
|
this.location = location;
|
|
177
178
|
this.type = 'type-parameter';
|
|
178
179
|
}
|
|
179
|
-
|
|
180
|
-
}());
|
|
180
|
+
}
|
|
181
181
|
exports.TypeParameter = TypeParameter;
|
|
182
182
|
/**
|
|
183
183
|
* ConstructorType
|
|
184
184
|
*/
|
|
185
|
-
|
|
186
|
-
|
|
185
|
+
class ConstructorType {
|
|
186
|
+
constructor(id, typeParameters, location) {
|
|
187
187
|
this.id = id;
|
|
188
188
|
this.typeParameters = typeParameters;
|
|
189
189
|
this.location = location;
|
|
190
190
|
this.type = 'constructor-type';
|
|
191
191
|
}
|
|
192
|
-
|
|
193
|
-
}());
|
|
192
|
+
}
|
|
194
193
|
exports.ConstructorType = ConstructorType;
|
|
195
194
|
/**
|
|
196
195
|
* FunctionType
|
|
197
196
|
*/
|
|
198
|
-
|
|
199
|
-
|
|
197
|
+
class FunctionType {
|
|
198
|
+
constructor(parameters, returnType, location) {
|
|
200
199
|
this.parameters = parameters;
|
|
201
200
|
this.returnType = returnType;
|
|
202
201
|
this.location = location;
|
|
203
202
|
this.type = 'function-type';
|
|
204
203
|
}
|
|
205
|
-
|
|
206
|
-
}());
|
|
204
|
+
}
|
|
207
205
|
exports.FunctionType = FunctionType;
|
|
208
206
|
/**
|
|
209
207
|
* RecordType
|
|
210
208
|
*/
|
|
211
|
-
|
|
212
|
-
|
|
209
|
+
class RecordType {
|
|
210
|
+
constructor(members, location) {
|
|
213
211
|
this.members = members;
|
|
214
212
|
this.location = location;
|
|
215
213
|
this.type = 'record-type';
|
|
216
214
|
}
|
|
217
|
-
|
|
218
|
-
}());
|
|
215
|
+
}
|
|
219
216
|
exports.RecordType = RecordType;
|
|
220
217
|
/**
|
|
221
218
|
* ListType
|
|
222
219
|
*/
|
|
223
|
-
|
|
224
|
-
|
|
220
|
+
class ListType {
|
|
221
|
+
constructor(elementType, location) {
|
|
225
222
|
this.elementType = elementType;
|
|
226
223
|
this.location = location;
|
|
227
224
|
this.type = 'list-type';
|
|
228
225
|
}
|
|
229
|
-
|
|
230
|
-
}());
|
|
226
|
+
}
|
|
231
227
|
exports.ListType = ListType;
|
|
232
228
|
/**
|
|
233
229
|
* TupleType
|
|
234
230
|
*/
|
|
235
|
-
|
|
236
|
-
|
|
231
|
+
class TupleType {
|
|
232
|
+
constructor(members, location) {
|
|
237
233
|
this.members = members;
|
|
238
234
|
this.location = location;
|
|
239
235
|
this.type = 'tuple-type';
|
|
240
236
|
}
|
|
241
|
-
|
|
242
|
-
}());
|
|
237
|
+
}
|
|
243
238
|
exports.TupleType = TupleType;
|
|
244
239
|
/**
|
|
245
240
|
* TypeParameter
|
|
246
241
|
*/
|
|
247
|
-
|
|
248
|
-
|
|
242
|
+
class TypedParameter {
|
|
243
|
+
constructor(id, hint, location) {
|
|
249
244
|
this.id = id;
|
|
250
245
|
this.hint = hint;
|
|
251
246
|
this.location = location;
|
|
252
247
|
this.type = 'typed-parameter';
|
|
253
248
|
}
|
|
254
|
-
|
|
255
|
-
}());
|
|
249
|
+
}
|
|
256
250
|
exports.TypedParameter = TypedParameter;
|
|
257
|
-
|
|
258
|
-
|
|
251
|
+
class UntypedParameter {
|
|
252
|
+
constructor(id, location) {
|
|
259
253
|
this.id = id;
|
|
260
254
|
this.location = location;
|
|
261
255
|
this.type = 'untyped-parameter';
|
|
262
256
|
}
|
|
263
|
-
|
|
264
|
-
}());
|
|
257
|
+
}
|
|
265
258
|
exports.UntypedParameter = UntypedParameter;
|
|
266
|
-
|
|
267
|
-
|
|
259
|
+
class Node {
|
|
260
|
+
constructor(open, attributes, children, close) {
|
|
268
261
|
this.open = open;
|
|
269
262
|
this.attributes = attributes;
|
|
270
263
|
this.children = children;
|
|
271
264
|
this.close = close;
|
|
272
265
|
this.type = 'node';
|
|
273
266
|
}
|
|
274
|
-
|
|
275
|
-
}());
|
|
267
|
+
}
|
|
276
268
|
exports.Node = Node;
|
|
277
|
-
|
|
278
|
-
|
|
269
|
+
class Widget {
|
|
270
|
+
constructor(open, attributes, children, close) {
|
|
279
271
|
this.open = open;
|
|
280
272
|
this.attributes = attributes;
|
|
281
273
|
this.children = children;
|
|
282
274
|
this.close = close;
|
|
283
275
|
this.type = 'widget';
|
|
284
276
|
}
|
|
285
|
-
|
|
286
|
-
}());
|
|
277
|
+
}
|
|
287
278
|
exports.Widget = Widget;
|
|
288
|
-
|
|
289
|
-
|
|
279
|
+
class Attribute {
|
|
280
|
+
constructor(namespace, name, value, location) {
|
|
290
281
|
this.namespace = namespace;
|
|
291
282
|
this.name = name;
|
|
292
283
|
this.value = value;
|
|
293
284
|
this.location = location;
|
|
294
285
|
this.type = 'attribute';
|
|
295
286
|
}
|
|
296
|
-
|
|
297
|
-
}());
|
|
287
|
+
}
|
|
298
288
|
exports.Attribute = Attribute;
|
|
299
|
-
|
|
300
|
-
|
|
289
|
+
class Interpolation {
|
|
290
|
+
constructor(expression, filters, location) {
|
|
301
291
|
this.expression = expression;
|
|
302
292
|
this.filters = filters;
|
|
303
293
|
this.location = location;
|
|
304
294
|
this.type = 'interpolation';
|
|
305
295
|
}
|
|
306
|
-
|
|
307
|
-
}());
|
|
296
|
+
}
|
|
308
297
|
exports.Interpolation = Interpolation;
|
|
309
|
-
|
|
310
|
-
|
|
298
|
+
class ForInStatement {
|
|
299
|
+
constructor(variables, expression, body, otherwise, location) {
|
|
311
300
|
this.variables = variables;
|
|
312
301
|
this.expression = expression;
|
|
313
302
|
this.body = body;
|
|
@@ -315,11 +304,10 @@ var ForInStatement = /** @class */ (function () {
|
|
|
315
304
|
this.location = location;
|
|
316
305
|
this.type = 'for-in-statement';
|
|
317
306
|
}
|
|
318
|
-
|
|
319
|
-
}());
|
|
307
|
+
}
|
|
320
308
|
exports.ForInStatement = ForInStatement;
|
|
321
|
-
|
|
322
|
-
|
|
309
|
+
class ForOfStatement {
|
|
310
|
+
constructor(variables, expression, body, otherwise, location) {
|
|
323
311
|
this.variables = variables;
|
|
324
312
|
this.expression = expression;
|
|
325
313
|
this.body = body;
|
|
@@ -327,11 +315,10 @@ var ForOfStatement = /** @class */ (function () {
|
|
|
327
315
|
this.location = location;
|
|
328
316
|
this.type = 'for-of-statement';
|
|
329
317
|
}
|
|
330
|
-
|
|
331
|
-
}());
|
|
318
|
+
}
|
|
332
319
|
exports.ForOfStatement = ForOfStatement;
|
|
333
|
-
|
|
334
|
-
|
|
320
|
+
class ForFromStatement {
|
|
321
|
+
constructor(variable, start, end, body, otherwise, location) {
|
|
335
322
|
this.variable = variable;
|
|
336
323
|
this.start = start;
|
|
337
324
|
this.end = end;
|
|
@@ -340,144 +327,130 @@ var ForFromStatement = /** @class */ (function () {
|
|
|
340
327
|
this.location = location;
|
|
341
328
|
this.type = 'for-from-statement';
|
|
342
329
|
}
|
|
343
|
-
|
|
344
|
-
}());
|
|
330
|
+
}
|
|
345
331
|
exports.ForFromStatement = ForFromStatement;
|
|
346
|
-
|
|
347
|
-
|
|
332
|
+
class IfStatement {
|
|
333
|
+
constructor(condition, then, elseClause, location) {
|
|
348
334
|
this.condition = condition;
|
|
349
335
|
this.then = then;
|
|
350
336
|
this.elseClause = elseClause;
|
|
351
337
|
this.location = location;
|
|
352
338
|
this.type = 'if-statement';
|
|
353
339
|
}
|
|
354
|
-
|
|
355
|
-
}());
|
|
340
|
+
}
|
|
356
341
|
exports.IfStatement = IfStatement;
|
|
357
|
-
|
|
358
|
-
|
|
342
|
+
class ElseClause {
|
|
343
|
+
constructor(children, location) {
|
|
359
344
|
this.children = children;
|
|
360
345
|
this.location = location;
|
|
361
346
|
this.type = 'else-clause';
|
|
362
347
|
}
|
|
363
|
-
|
|
364
|
-
}());
|
|
348
|
+
}
|
|
365
349
|
exports.ElseClause = ElseClause;
|
|
366
|
-
|
|
367
|
-
|
|
350
|
+
class ElseIfClause {
|
|
351
|
+
constructor(condition, then, elseClause, location) {
|
|
368
352
|
this.condition = condition;
|
|
369
353
|
this.then = then;
|
|
370
354
|
this.elseClause = elseClause;
|
|
371
355
|
this.location = location;
|
|
372
356
|
this.type = 'else-if-clause';
|
|
373
357
|
}
|
|
374
|
-
|
|
375
|
-
}());
|
|
358
|
+
}
|
|
376
359
|
exports.ElseIfClause = ElseIfClause;
|
|
377
|
-
|
|
378
|
-
|
|
360
|
+
class Characters {
|
|
361
|
+
constructor(value, location) {
|
|
379
362
|
this.value = value;
|
|
380
363
|
this.location = location;
|
|
381
364
|
this.type = 'characters';
|
|
382
365
|
}
|
|
383
|
-
|
|
384
|
-
}());
|
|
366
|
+
}
|
|
385
367
|
exports.Characters = Characters;
|
|
386
|
-
|
|
387
|
-
|
|
368
|
+
class IfThenExpression {
|
|
369
|
+
constructor(condition, iftrue, iffalse, location) {
|
|
388
370
|
this.condition = condition;
|
|
389
371
|
this.iftrue = iftrue;
|
|
390
372
|
this.iffalse = iffalse;
|
|
391
373
|
this.location = location;
|
|
392
374
|
this.type = 'if-then-expression';
|
|
393
375
|
}
|
|
394
|
-
|
|
395
|
-
}());
|
|
376
|
+
}
|
|
396
377
|
exports.IfThenExpression = IfThenExpression;
|
|
397
|
-
|
|
398
|
-
|
|
378
|
+
class BinaryExpression {
|
|
379
|
+
constructor(left, operator, right, location) {
|
|
399
380
|
this.left = left;
|
|
400
381
|
this.operator = operator;
|
|
401
382
|
this.right = right;
|
|
402
383
|
this.location = location;
|
|
403
384
|
this.type = 'binary-expression';
|
|
404
385
|
}
|
|
405
|
-
|
|
406
|
-
}());
|
|
386
|
+
}
|
|
407
387
|
exports.BinaryExpression = BinaryExpression;
|
|
408
|
-
|
|
409
|
-
|
|
388
|
+
class UnaryExpression {
|
|
389
|
+
constructor(operator, expression) {
|
|
410
390
|
this.operator = operator;
|
|
411
391
|
this.expression = expression;
|
|
412
392
|
this.type = 'unary-expression';
|
|
413
393
|
}
|
|
414
|
-
|
|
415
|
-
}());
|
|
394
|
+
}
|
|
416
395
|
exports.UnaryExpression = UnaryExpression;
|
|
417
|
-
|
|
418
|
-
|
|
396
|
+
class TypeAssertion {
|
|
397
|
+
constructor(target, expression) {
|
|
419
398
|
this.target = target;
|
|
420
399
|
this.expression = expression;
|
|
421
400
|
this.type = 'type-assertion';
|
|
422
401
|
}
|
|
423
|
-
|
|
424
|
-
}());
|
|
402
|
+
}
|
|
425
403
|
exports.TypeAssertion = TypeAssertion;
|
|
426
|
-
|
|
427
|
-
|
|
404
|
+
class ViewConstruction {
|
|
405
|
+
constructor(expression, location) {
|
|
428
406
|
this.expression = expression;
|
|
429
407
|
this.location = location;
|
|
430
408
|
this.type = 'view-construction';
|
|
431
409
|
}
|
|
432
|
-
|
|
433
|
-
}());
|
|
410
|
+
}
|
|
434
411
|
exports.ViewConstruction = ViewConstruction;
|
|
435
|
-
|
|
436
|
-
|
|
412
|
+
class FunApplication {
|
|
413
|
+
constructor(target, typeArgs, args, location) {
|
|
437
414
|
this.target = target;
|
|
438
415
|
this.typeArgs = typeArgs;
|
|
439
416
|
this.args = args;
|
|
440
417
|
this.location = location;
|
|
441
418
|
this.type = 'fun-application';
|
|
442
419
|
}
|
|
443
|
-
|
|
444
|
-
}());
|
|
420
|
+
}
|
|
445
421
|
exports.FunApplication = FunApplication;
|
|
446
|
-
|
|
447
|
-
|
|
422
|
+
class ConstructExpression {
|
|
423
|
+
constructor(cons, args, location) {
|
|
448
424
|
this.cons = cons;
|
|
449
425
|
this.args = args;
|
|
450
426
|
this.location = location;
|
|
451
427
|
this.type = 'construct-expression';
|
|
452
428
|
}
|
|
453
|
-
|
|
454
|
-
}());
|
|
429
|
+
}
|
|
455
430
|
exports.ConstructExpression = ConstructExpression;
|
|
456
|
-
|
|
457
|
-
|
|
431
|
+
class CallExpression {
|
|
432
|
+
constructor(target, typeArgs, args, location) {
|
|
458
433
|
this.target = target;
|
|
459
434
|
this.typeArgs = typeArgs;
|
|
460
435
|
this.args = args;
|
|
461
436
|
this.location = location;
|
|
462
437
|
this.type = 'call-expression';
|
|
463
438
|
}
|
|
464
|
-
|
|
465
|
-
}());
|
|
439
|
+
}
|
|
466
440
|
exports.CallExpression = CallExpression;
|
|
467
441
|
/**
|
|
468
442
|
* MemberExpression
|
|
469
443
|
*/
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
this.
|
|
473
|
-
this.
|
|
444
|
+
class MemberExpression {
|
|
445
|
+
constructor(head, tail, location) {
|
|
446
|
+
this.head = head;
|
|
447
|
+
this.tail = tail;
|
|
474
448
|
this.location = location;
|
|
475
449
|
}
|
|
476
|
-
|
|
477
|
-
}());
|
|
450
|
+
}
|
|
478
451
|
exports.MemberExpression = MemberExpression;
|
|
479
|
-
|
|
480
|
-
|
|
452
|
+
class ReadExpression {
|
|
453
|
+
constructor(target, path, hint, defaults, location) {
|
|
481
454
|
this.target = target;
|
|
482
455
|
this.path = path;
|
|
483
456
|
this.hint = hint;
|
|
@@ -485,130 +458,116 @@ var ReadExpression = /** @class */ (function () {
|
|
|
485
458
|
this.location = location;
|
|
486
459
|
this.type = 'read-expression';
|
|
487
460
|
}
|
|
488
|
-
|
|
489
|
-
}());
|
|
461
|
+
}
|
|
490
462
|
exports.ReadExpression = ReadExpression;
|
|
491
|
-
|
|
492
|
-
|
|
463
|
+
class FunctionExpression {
|
|
464
|
+
constructor(parameters, body, location) {
|
|
493
465
|
this.parameters = parameters;
|
|
494
466
|
this.body = body;
|
|
495
467
|
this.location = location;
|
|
496
468
|
this.type = 'function-expression';
|
|
497
469
|
}
|
|
498
|
-
|
|
499
|
-
}());
|
|
470
|
+
}
|
|
500
471
|
exports.FunctionExpression = FunctionExpression;
|
|
501
|
-
|
|
502
|
-
|
|
472
|
+
class List {
|
|
473
|
+
constructor(members, location) {
|
|
503
474
|
this.members = members;
|
|
504
475
|
this.location = location;
|
|
505
476
|
this.type = 'list';
|
|
506
477
|
}
|
|
507
|
-
|
|
508
|
-
}());
|
|
478
|
+
}
|
|
509
479
|
exports.List = List;
|
|
510
|
-
|
|
511
|
-
|
|
480
|
+
class Record {
|
|
481
|
+
constructor(properties, location) {
|
|
512
482
|
this.properties = properties;
|
|
513
483
|
this.location = location;
|
|
514
484
|
this.type = 'record';
|
|
515
485
|
}
|
|
516
|
-
|
|
517
|
-
}());
|
|
486
|
+
}
|
|
518
487
|
exports.Record = Record;
|
|
519
|
-
|
|
520
|
-
|
|
488
|
+
class Property {
|
|
489
|
+
constructor(key, value, location) {
|
|
521
490
|
this.key = key;
|
|
522
491
|
this.value = value;
|
|
523
492
|
this.location = location;
|
|
524
493
|
this.type = 'property';
|
|
525
494
|
}
|
|
526
|
-
|
|
527
|
-
}());
|
|
495
|
+
}
|
|
528
496
|
exports.Property = Property;
|
|
529
|
-
|
|
530
|
-
|
|
497
|
+
class StringLiteral {
|
|
498
|
+
constructor(value, location) {
|
|
531
499
|
this.value = value;
|
|
532
500
|
this.location = location;
|
|
533
501
|
this.type = 'string';
|
|
534
502
|
}
|
|
535
|
-
|
|
536
|
-
}());
|
|
503
|
+
}
|
|
537
504
|
exports.StringLiteral = StringLiteral;
|
|
538
|
-
|
|
539
|
-
|
|
505
|
+
class NumberLiteral {
|
|
506
|
+
constructor(value, location) {
|
|
540
507
|
this.value = value;
|
|
541
508
|
this.location = location;
|
|
542
509
|
this.type = 'number-literal';
|
|
543
510
|
}
|
|
544
|
-
|
|
545
|
-
}());
|
|
511
|
+
}
|
|
546
512
|
exports.NumberLiteral = NumberLiteral;
|
|
547
|
-
|
|
548
|
-
|
|
513
|
+
class BooleanLiteral {
|
|
514
|
+
constructor(value, location) {
|
|
549
515
|
this.value = value;
|
|
550
516
|
this.location = location;
|
|
551
517
|
this.type = 'boolean-literal';
|
|
552
518
|
}
|
|
553
|
-
|
|
554
|
-
}());
|
|
519
|
+
}
|
|
555
520
|
exports.BooleanLiteral = BooleanLiteral;
|
|
556
|
-
|
|
557
|
-
|
|
521
|
+
class ContextProperty {
|
|
522
|
+
constructor(member, location) {
|
|
558
523
|
this.member = member;
|
|
559
524
|
this.location = location;
|
|
560
525
|
this.type = 'context-property';
|
|
561
526
|
}
|
|
562
|
-
|
|
563
|
-
}());
|
|
527
|
+
}
|
|
564
528
|
exports.ContextProperty = ContextProperty;
|
|
565
|
-
|
|
566
|
-
|
|
529
|
+
class ContextVariable {
|
|
530
|
+
constructor(location) {
|
|
567
531
|
this.location = location;
|
|
568
532
|
this.type = 'context-variable';
|
|
569
533
|
}
|
|
570
|
-
|
|
571
|
-
}());
|
|
534
|
+
}
|
|
572
535
|
exports.ContextVariable = ContextVariable;
|
|
573
|
-
|
|
574
|
-
|
|
536
|
+
class UnqualifiedConstructor {
|
|
537
|
+
constructor(value, location) {
|
|
575
538
|
this.value = value;
|
|
576
539
|
this.location = location;
|
|
577
540
|
this.type = 'unqualified-constructor';
|
|
578
541
|
}
|
|
579
|
-
|
|
580
|
-
}());
|
|
542
|
+
}
|
|
581
543
|
exports.UnqualifiedConstructor = UnqualifiedConstructor;
|
|
582
|
-
|
|
583
|
-
|
|
544
|
+
class QualifiedConstructor {
|
|
545
|
+
constructor(qualifier, member, location) {
|
|
584
546
|
this.qualifier = qualifier;
|
|
585
547
|
this.member = member;
|
|
586
548
|
this.location = location;
|
|
587
549
|
this.type = 'qualified-constructor';
|
|
588
550
|
}
|
|
589
|
-
|
|
590
|
-
}());
|
|
551
|
+
}
|
|
591
552
|
exports.QualifiedConstructor = QualifiedConstructor;
|
|
592
|
-
|
|
593
|
-
|
|
553
|
+
class UnqualifiedIdentifier {
|
|
554
|
+
constructor(value, location) {
|
|
594
555
|
this.value = value;
|
|
595
556
|
this.location = location;
|
|
596
557
|
this.type = 'unqualified-identifier';
|
|
597
558
|
}
|
|
598
|
-
|
|
599
|
-
}());
|
|
559
|
+
}
|
|
600
560
|
exports.UnqualifiedIdentifier = UnqualifiedIdentifier;
|
|
601
561
|
/**
|
|
602
562
|
* QualifiedIdentifier
|
|
603
563
|
*/
|
|
604
|
-
|
|
605
|
-
|
|
564
|
+
class QualifiedIdentifier {
|
|
565
|
+
constructor(qualifier, member, location) {
|
|
606
566
|
this.qualifier = qualifier;
|
|
607
567
|
this.member = member;
|
|
608
568
|
this.location = location;
|
|
609
569
|
this.type = 'qualified-identifier';
|
|
610
570
|
}
|
|
611
|
-
|
|
612
|
-
}());
|
|
571
|
+
}
|
|
613
572
|
exports.QualifiedIdentifier = QualifiedIdentifier;
|
|
614
573
|
//# sourceMappingURL=ast.js.map
|