@quenk/wml 2.11.2 → 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 +6 -10
- package/lib/compile/codegen.js +556 -633
- package/lib/compile/codegen.js.map +1 -1
- package/lib/compile/codegen.ts +58 -25
- 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 +25 -5
- package/lib/parse/ast.js +186 -214
- package/lib/parse/ast.js.map +1 -1
- package/lib/parse/ast.ts +33 -5
- package/lib/parse/generated.js +2527 -2454
- package/lib/parse/index.js +7 -10
- package/lib/parse/index.js.map +1 -1
- package/lib/parse/test.js +279 -53
- package/lib/parse/test.js.map +1 -1
- package/lib/parse/test.ts +20 -1
- package/lib/parse/wml.y +60 -50
- 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 = 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 = void 0;
|
|
|
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,144 +315,142 @@ 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) {
|
|
322
|
+
this.variable = variable;
|
|
323
|
+
this.start = start;
|
|
324
|
+
this.end = end;
|
|
325
|
+
this.body = body;
|
|
326
|
+
this.otherwise = otherwise;
|
|
327
|
+
this.location = location;
|
|
328
|
+
this.type = 'for-from-statement';
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
exports.ForFromStatement = ForFromStatement;
|
|
332
|
+
class IfStatement {
|
|
333
|
+
constructor(condition, then, elseClause, location) {
|
|
335
334
|
this.condition = condition;
|
|
336
335
|
this.then = then;
|
|
337
336
|
this.elseClause = elseClause;
|
|
338
337
|
this.location = location;
|
|
339
338
|
this.type = 'if-statement';
|
|
340
339
|
}
|
|
341
|
-
|
|
342
|
-
}());
|
|
340
|
+
}
|
|
343
341
|
exports.IfStatement = IfStatement;
|
|
344
|
-
|
|
345
|
-
|
|
342
|
+
class ElseClause {
|
|
343
|
+
constructor(children, location) {
|
|
346
344
|
this.children = children;
|
|
347
345
|
this.location = location;
|
|
348
346
|
this.type = 'else-clause';
|
|
349
347
|
}
|
|
350
|
-
|
|
351
|
-
}());
|
|
348
|
+
}
|
|
352
349
|
exports.ElseClause = ElseClause;
|
|
353
|
-
|
|
354
|
-
|
|
350
|
+
class ElseIfClause {
|
|
351
|
+
constructor(condition, then, elseClause, location) {
|
|
355
352
|
this.condition = condition;
|
|
356
353
|
this.then = then;
|
|
357
354
|
this.elseClause = elseClause;
|
|
358
355
|
this.location = location;
|
|
359
356
|
this.type = 'else-if-clause';
|
|
360
357
|
}
|
|
361
|
-
|
|
362
|
-
}());
|
|
358
|
+
}
|
|
363
359
|
exports.ElseIfClause = ElseIfClause;
|
|
364
|
-
|
|
365
|
-
|
|
360
|
+
class Characters {
|
|
361
|
+
constructor(value, location) {
|
|
366
362
|
this.value = value;
|
|
367
363
|
this.location = location;
|
|
368
364
|
this.type = 'characters';
|
|
369
365
|
}
|
|
370
|
-
|
|
371
|
-
}());
|
|
366
|
+
}
|
|
372
367
|
exports.Characters = Characters;
|
|
373
|
-
|
|
374
|
-
|
|
368
|
+
class IfThenExpression {
|
|
369
|
+
constructor(condition, iftrue, iffalse, location) {
|
|
375
370
|
this.condition = condition;
|
|
376
371
|
this.iftrue = iftrue;
|
|
377
372
|
this.iffalse = iffalse;
|
|
378
373
|
this.location = location;
|
|
379
374
|
this.type = 'if-then-expression';
|
|
380
375
|
}
|
|
381
|
-
|
|
382
|
-
}());
|
|
376
|
+
}
|
|
383
377
|
exports.IfThenExpression = IfThenExpression;
|
|
384
|
-
|
|
385
|
-
|
|
378
|
+
class BinaryExpression {
|
|
379
|
+
constructor(left, operator, right, location) {
|
|
386
380
|
this.left = left;
|
|
387
381
|
this.operator = operator;
|
|
388
382
|
this.right = right;
|
|
389
383
|
this.location = location;
|
|
390
384
|
this.type = 'binary-expression';
|
|
391
385
|
}
|
|
392
|
-
|
|
393
|
-
}());
|
|
386
|
+
}
|
|
394
387
|
exports.BinaryExpression = BinaryExpression;
|
|
395
|
-
|
|
396
|
-
|
|
388
|
+
class UnaryExpression {
|
|
389
|
+
constructor(operator, expression) {
|
|
397
390
|
this.operator = operator;
|
|
398
391
|
this.expression = expression;
|
|
399
392
|
this.type = 'unary-expression';
|
|
400
393
|
}
|
|
401
|
-
|
|
402
|
-
}());
|
|
394
|
+
}
|
|
403
395
|
exports.UnaryExpression = UnaryExpression;
|
|
404
|
-
|
|
405
|
-
|
|
396
|
+
class TypeAssertion {
|
|
397
|
+
constructor(target, expression) {
|
|
406
398
|
this.target = target;
|
|
407
399
|
this.expression = expression;
|
|
408
400
|
this.type = 'type-assertion';
|
|
409
401
|
}
|
|
410
|
-
|
|
411
|
-
}());
|
|
402
|
+
}
|
|
412
403
|
exports.TypeAssertion = TypeAssertion;
|
|
413
|
-
|
|
414
|
-
|
|
404
|
+
class ViewConstruction {
|
|
405
|
+
constructor(expression, location) {
|
|
415
406
|
this.expression = expression;
|
|
416
407
|
this.location = location;
|
|
417
408
|
this.type = 'view-construction';
|
|
418
409
|
}
|
|
419
|
-
|
|
420
|
-
}());
|
|
410
|
+
}
|
|
421
411
|
exports.ViewConstruction = ViewConstruction;
|
|
422
|
-
|
|
423
|
-
|
|
412
|
+
class FunApplication {
|
|
413
|
+
constructor(target, typeArgs, args, location) {
|
|
424
414
|
this.target = target;
|
|
425
415
|
this.typeArgs = typeArgs;
|
|
426
416
|
this.args = args;
|
|
427
417
|
this.location = location;
|
|
428
418
|
this.type = 'fun-application';
|
|
429
419
|
}
|
|
430
|
-
|
|
431
|
-
}());
|
|
420
|
+
}
|
|
432
421
|
exports.FunApplication = FunApplication;
|
|
433
|
-
|
|
434
|
-
|
|
422
|
+
class ConstructExpression {
|
|
423
|
+
constructor(cons, args, location) {
|
|
435
424
|
this.cons = cons;
|
|
436
425
|
this.args = args;
|
|
437
426
|
this.location = location;
|
|
438
427
|
this.type = 'construct-expression';
|
|
439
428
|
}
|
|
440
|
-
|
|
441
|
-
}());
|
|
429
|
+
}
|
|
442
430
|
exports.ConstructExpression = ConstructExpression;
|
|
443
|
-
|
|
444
|
-
|
|
431
|
+
class CallExpression {
|
|
432
|
+
constructor(target, typeArgs, args, location) {
|
|
445
433
|
this.target = target;
|
|
446
434
|
this.typeArgs = typeArgs;
|
|
447
435
|
this.args = args;
|
|
448
436
|
this.location = location;
|
|
449
437
|
this.type = 'call-expression';
|
|
450
438
|
}
|
|
451
|
-
|
|
452
|
-
}());
|
|
439
|
+
}
|
|
453
440
|
exports.CallExpression = CallExpression;
|
|
454
441
|
/**
|
|
455
442
|
* MemberExpression
|
|
456
443
|
*/
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
this.
|
|
460
|
-
this.
|
|
444
|
+
class MemberExpression {
|
|
445
|
+
constructor(head, tail, location) {
|
|
446
|
+
this.head = head;
|
|
447
|
+
this.tail = tail;
|
|
461
448
|
this.location = location;
|
|
462
449
|
}
|
|
463
|
-
|
|
464
|
-
}());
|
|
450
|
+
}
|
|
465
451
|
exports.MemberExpression = MemberExpression;
|
|
466
|
-
|
|
467
|
-
|
|
452
|
+
class ReadExpression {
|
|
453
|
+
constructor(target, path, hint, defaults, location) {
|
|
468
454
|
this.target = target;
|
|
469
455
|
this.path = path;
|
|
470
456
|
this.hint = hint;
|
|
@@ -472,130 +458,116 @@ var ReadExpression = /** @class */ (function () {
|
|
|
472
458
|
this.location = location;
|
|
473
459
|
this.type = 'read-expression';
|
|
474
460
|
}
|
|
475
|
-
|
|
476
|
-
}());
|
|
461
|
+
}
|
|
477
462
|
exports.ReadExpression = ReadExpression;
|
|
478
|
-
|
|
479
|
-
|
|
463
|
+
class FunctionExpression {
|
|
464
|
+
constructor(parameters, body, location) {
|
|
480
465
|
this.parameters = parameters;
|
|
481
466
|
this.body = body;
|
|
482
467
|
this.location = location;
|
|
483
468
|
this.type = 'function-expression';
|
|
484
469
|
}
|
|
485
|
-
|
|
486
|
-
}());
|
|
470
|
+
}
|
|
487
471
|
exports.FunctionExpression = FunctionExpression;
|
|
488
|
-
|
|
489
|
-
|
|
472
|
+
class List {
|
|
473
|
+
constructor(members, location) {
|
|
490
474
|
this.members = members;
|
|
491
475
|
this.location = location;
|
|
492
476
|
this.type = 'list';
|
|
493
477
|
}
|
|
494
|
-
|
|
495
|
-
}());
|
|
478
|
+
}
|
|
496
479
|
exports.List = List;
|
|
497
|
-
|
|
498
|
-
|
|
480
|
+
class Record {
|
|
481
|
+
constructor(properties, location) {
|
|
499
482
|
this.properties = properties;
|
|
500
483
|
this.location = location;
|
|
501
484
|
this.type = 'record';
|
|
502
485
|
}
|
|
503
|
-
|
|
504
|
-
}());
|
|
486
|
+
}
|
|
505
487
|
exports.Record = Record;
|
|
506
|
-
|
|
507
|
-
|
|
488
|
+
class Property {
|
|
489
|
+
constructor(key, value, location) {
|
|
508
490
|
this.key = key;
|
|
509
491
|
this.value = value;
|
|
510
492
|
this.location = location;
|
|
511
493
|
this.type = 'property';
|
|
512
494
|
}
|
|
513
|
-
|
|
514
|
-
}());
|
|
495
|
+
}
|
|
515
496
|
exports.Property = Property;
|
|
516
|
-
|
|
517
|
-
|
|
497
|
+
class StringLiteral {
|
|
498
|
+
constructor(value, location) {
|
|
518
499
|
this.value = value;
|
|
519
500
|
this.location = location;
|
|
520
501
|
this.type = 'string';
|
|
521
502
|
}
|
|
522
|
-
|
|
523
|
-
}());
|
|
503
|
+
}
|
|
524
504
|
exports.StringLiteral = StringLiteral;
|
|
525
|
-
|
|
526
|
-
|
|
505
|
+
class NumberLiteral {
|
|
506
|
+
constructor(value, location) {
|
|
527
507
|
this.value = value;
|
|
528
508
|
this.location = location;
|
|
529
509
|
this.type = 'number-literal';
|
|
530
510
|
}
|
|
531
|
-
|
|
532
|
-
}());
|
|
511
|
+
}
|
|
533
512
|
exports.NumberLiteral = NumberLiteral;
|
|
534
|
-
|
|
535
|
-
|
|
513
|
+
class BooleanLiteral {
|
|
514
|
+
constructor(value, location) {
|
|
536
515
|
this.value = value;
|
|
537
516
|
this.location = location;
|
|
538
517
|
this.type = 'boolean-literal';
|
|
539
518
|
}
|
|
540
|
-
|
|
541
|
-
}());
|
|
519
|
+
}
|
|
542
520
|
exports.BooleanLiteral = BooleanLiteral;
|
|
543
|
-
|
|
544
|
-
|
|
521
|
+
class ContextProperty {
|
|
522
|
+
constructor(member, location) {
|
|
545
523
|
this.member = member;
|
|
546
524
|
this.location = location;
|
|
547
525
|
this.type = 'context-property';
|
|
548
526
|
}
|
|
549
|
-
|
|
550
|
-
}());
|
|
527
|
+
}
|
|
551
528
|
exports.ContextProperty = ContextProperty;
|
|
552
|
-
|
|
553
|
-
|
|
529
|
+
class ContextVariable {
|
|
530
|
+
constructor(location) {
|
|
554
531
|
this.location = location;
|
|
555
532
|
this.type = 'context-variable';
|
|
556
533
|
}
|
|
557
|
-
|
|
558
|
-
}());
|
|
534
|
+
}
|
|
559
535
|
exports.ContextVariable = ContextVariable;
|
|
560
|
-
|
|
561
|
-
|
|
536
|
+
class UnqualifiedConstructor {
|
|
537
|
+
constructor(value, location) {
|
|
562
538
|
this.value = value;
|
|
563
539
|
this.location = location;
|
|
564
540
|
this.type = 'unqualified-constructor';
|
|
565
541
|
}
|
|
566
|
-
|
|
567
|
-
}());
|
|
542
|
+
}
|
|
568
543
|
exports.UnqualifiedConstructor = UnqualifiedConstructor;
|
|
569
|
-
|
|
570
|
-
|
|
544
|
+
class QualifiedConstructor {
|
|
545
|
+
constructor(qualifier, member, location) {
|
|
571
546
|
this.qualifier = qualifier;
|
|
572
547
|
this.member = member;
|
|
573
548
|
this.location = location;
|
|
574
549
|
this.type = 'qualified-constructor';
|
|
575
550
|
}
|
|
576
|
-
|
|
577
|
-
}());
|
|
551
|
+
}
|
|
578
552
|
exports.QualifiedConstructor = QualifiedConstructor;
|
|
579
|
-
|
|
580
|
-
|
|
553
|
+
class UnqualifiedIdentifier {
|
|
554
|
+
constructor(value, location) {
|
|
581
555
|
this.value = value;
|
|
582
556
|
this.location = location;
|
|
583
557
|
this.type = 'unqualified-identifier';
|
|
584
558
|
}
|
|
585
|
-
|
|
586
|
-
}());
|
|
559
|
+
}
|
|
587
560
|
exports.UnqualifiedIdentifier = UnqualifiedIdentifier;
|
|
588
561
|
/**
|
|
589
562
|
* QualifiedIdentifier
|
|
590
563
|
*/
|
|
591
|
-
|
|
592
|
-
|
|
564
|
+
class QualifiedIdentifier {
|
|
565
|
+
constructor(qualifier, member, location) {
|
|
593
566
|
this.qualifier = qualifier;
|
|
594
567
|
this.member = member;
|
|
595
568
|
this.location = location;
|
|
596
569
|
this.type = 'qualified-identifier';
|
|
597
570
|
}
|
|
598
|
-
|
|
599
|
-
}());
|
|
571
|
+
}
|
|
600
572
|
exports.QualifiedIdentifier = QualifiedIdentifier;
|
|
601
573
|
//# sourceMappingURL=ast.js.map
|