@ibyar/expressions 1.0.0 → 1.1.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/README.md +48 -1
- package/api/class/class.js +143 -93
- package/api/class/class.js.map +1 -1
- package/api/class/decorator.js +8 -3
- package/api/class/decorator.js.map +1 -1
- package/api/computing/call.js +8 -3
- package/api/computing/call.js.map +1 -1
- package/api/computing/debugger.js +8 -3
- package/api/computing/debugger.js.map +1 -1
- package/api/computing/new.js +8 -3
- package/api/computing/new.js.map +1 -1
- package/api/computing/rest.js +8 -3
- package/api/computing/rest.js.map +1 -1
- package/api/computing/return.js +8 -3
- package/api/computing/return.js.map +1 -1
- package/api/computing/spread.js +8 -3
- package/api/computing/spread.js.map +1 -1
- package/api/computing/throw.js +38 -23
- package/api/computing/throw.js.map +1 -1
- package/api/computing/yield.js +8 -3
- package/api/computing/yield.js.map +1 -1
- package/api/definition/array.js +23 -13
- package/api/definition/array.js.map +1 -1
- package/api/definition/bind.js +8 -3
- package/api/definition/bind.js.map +1 -1
- package/api/definition/comment.js +8 -3
- package/api/definition/comment.js.map +1 -1
- package/api/definition/function.js +53 -33
- package/api/definition/function.js.map +1 -1
- package/api/definition/member.js +8 -3
- package/api/definition/member.js.map +1 -1
- package/api/definition/object.js +38 -23
- package/api/definition/object.js.map +1 -1
- package/api/definition/statement.js +8 -3
- package/api/definition/statement.js.map +1 -1
- package/api/definition/values.js +68 -43
- package/api/definition/values.js.map +1 -1
- package/api/module/common.js +8 -3
- package/api/module/common.js.map +1 -1
- package/api/module/export.js +53 -33
- package/api/module/export.js.map +1 -1
- package/api/module/import.js +68 -43
- package/api/module/import.js.map +1 -1
- package/api/operators/assignment.js +6 -2
- package/api/operators/assignment.js.map +1 -1
- package/api/operators/await.js +8 -3
- package/api/operators/await.js.map +1 -1
- package/api/operators/binary.js +6 -2
- package/api/operators/binary.js.map +1 -1
- package/api/operators/chaining.js +8 -3
- package/api/operators/chaining.js.map +1 -1
- package/api/operators/comma.js +8 -3
- package/api/operators/comma.js.map +1 -1
- package/api/operators/grouping.js +8 -3
- package/api/operators/grouping.js.map +1 -1
- package/api/operators/logical.js +6 -2
- package/api/operators/logical.js.map +1 -1
- package/api/operators/pipeline.js +8 -3
- package/api/operators/pipeline.js.map +1 -1
- package/api/operators/ternary.js +8 -3
- package/api/operators/ternary.js.map +1 -1
- package/api/operators/unary.js +6 -2
- package/api/operators/unary.js.map +1 -1
- package/api/operators/update.js +6 -2
- package/api/operators/update.js.map +1 -1
- package/api/program.js +8 -3
- package/api/program.js.map +1 -1
- package/api/statement/control/block.js +8 -3
- package/api/statement/control/block.js.map +1 -1
- package/api/statement/control/empty.js +8 -3
- package/api/statement/control/empty.js.map +1 -1
- package/api/statement/control/if.js +8 -3
- package/api/statement/control/if.js.map +1 -1
- package/api/statement/control/switch.js +38 -23
- package/api/statement/control/switch.js.map +1 -1
- package/api/statement/control/terminate.js +38 -23
- package/api/statement/control/terminate.js.map +1 -1
- package/api/statement/control/with.js +8 -3
- package/api/statement/control/with.js.map +1 -1
- package/api/statement/declarations/declares.js +23 -13
- package/api/statement/declarations/declares.js.map +1 -1
- package/api/statement/iterations/for.js +53 -33
- package/api/statement/iterations/for.js.map +1 -1
- package/api/statement/iterations/while.js +23 -13
- package/api/statement/iterations/while.js.map +1 -1
- package/package.json +5 -5
- package/scope/builder.d.ts +27 -0
- package/scope/builder.d.ts.map +1 -0
- package/scope/builder.js +73 -0
- package/scope/builder.js.map +1 -0
- package/scope/stack.js +1 -1
- package/scope/stack.js.map +1 -1
- package/v8/enums.js +2 -4
- package/v8/enums.js.map +1 -1
- package/v8/stream.js +1 -2
- package/v8/stream.js.map +1 -1
- package/v8/token.js +1 -2
- package/v8/token.js.map +1 -1
- package/v8/nodes.d.ts +0 -0
- package/v8/nodes.js +0 -2
- package/v8/nodes.js.map +0 -1
package/README.md
CHANGED
|
@@ -276,4 +276,51 @@ expressionVisitor.visit(ast, (expression, type, control) => {
|
|
|
276
276
|
}
|
|
277
277
|
});
|
|
278
278
|
|
|
279
|
-
```
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
### How to use Reactive Scope:
|
|
283
|
+
|
|
284
|
+
reactive scope is used to
|
|
285
|
+
|
|
286
|
+
```ts
|
|
287
|
+
import { JavaScriptParser, ReactiveScope, Stack } from '@ibyar/expressions';
|
|
288
|
+
|
|
289
|
+
// parse JS code
|
|
290
|
+
const ast = JavaScriptParser.parse(`
|
|
291
|
+
const x = 'Hello';
|
|
292
|
+
const y = "World";
|
|
293
|
+
|
|
294
|
+
let z = x + ' ' + y + '!';
|
|
295
|
+
z = 123 + 456;
|
|
296
|
+
z = (x + ' ' + y).toUpperCase();
|
|
297
|
+
z = 'Reactive Scope is Awesome!!';
|
|
298
|
+
|
|
299
|
+
`);
|
|
300
|
+
|
|
301
|
+
// create reactive scope, can listen to changes of variables
|
|
302
|
+
const reactiveScope = ReactiveScope.blockScope();
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
// listen for changes of 'z' variable
|
|
306
|
+
const zSubscription = reactiveScope.subscribe('z', (nz, oz) => {
|
|
307
|
+
console.log('new value of Z = ' + nz, 'old value of Z = ' + oz);
|
|
308
|
+
});
|
|
309
|
+
|
|
310
|
+
// listen for changes of 'z' const
|
|
311
|
+
const xSubscription = reactiveScope.subscribe('x', (nx, ox) => {
|
|
312
|
+
console.log('new value of X = ' + nx, 'old value of X = ' + ox);
|
|
313
|
+
});
|
|
314
|
+
|
|
315
|
+
// create stack
|
|
316
|
+
const stack = new Stack(reactiveScope);
|
|
317
|
+
|
|
318
|
+
// execute js code
|
|
319
|
+
ast.get(stack);
|
|
320
|
+
|
|
321
|
+
// unsubscribe from all created ScopeSubscription
|
|
322
|
+
zSubscription.unsubscribe();
|
|
323
|
+
xSubscription.unsubscribe();
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
```
|
package/api/class/class.js
CHANGED
|
@@ -86,15 +86,19 @@ class ClassInitializer {
|
|
|
86
86
|
/**
|
|
87
87
|
* A `super` pseudo-expression.
|
|
88
88
|
*/
|
|
89
|
-
|
|
89
|
+
let Super = (() => {
|
|
90
90
|
let _classDecorators = [Deserializer('Super')];
|
|
91
91
|
let _classDescriptor;
|
|
92
92
|
let _classExtraInitializers = [];
|
|
93
93
|
let _classThis;
|
|
94
|
-
|
|
94
|
+
let _classSuper = AbstractExpressionNode;
|
|
95
|
+
var Super = class extends _classSuper {
|
|
96
|
+
static { _classThis = this; }
|
|
95
97
|
static {
|
|
96
|
-
|
|
98
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
99
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
97
100
|
Super = _classThis = _classDescriptor.value;
|
|
101
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
98
102
|
__runInitializers(_classThis, _classExtraInitializers);
|
|
99
103
|
}
|
|
100
104
|
static fromJSON(node) {
|
|
@@ -124,6 +128,7 @@ export let Super = (() => {
|
|
|
124
128
|
};
|
|
125
129
|
return Super = _classThis;
|
|
126
130
|
})();
|
|
131
|
+
export { Super };
|
|
127
132
|
/**
|
|
128
133
|
* MetaProperty node represents
|
|
129
134
|
* - `new.target` meta property in ES2015.
|
|
@@ -131,16 +136,20 @@ export let Super = (() => {
|
|
|
131
136
|
*
|
|
132
137
|
* In the future, it will represent other meta properties as well.
|
|
133
138
|
*/
|
|
134
|
-
|
|
135
|
-
let
|
|
136
|
-
let
|
|
137
|
-
let
|
|
138
|
-
let
|
|
139
|
-
|
|
139
|
+
let MetaProperty = (() => {
|
|
140
|
+
let _classDecorators = [Deserializer('MetaProperty')];
|
|
141
|
+
let _classDescriptor;
|
|
142
|
+
let _classExtraInitializers = [];
|
|
143
|
+
let _classThis;
|
|
144
|
+
let _classSuper = AbstractExpressionNode;
|
|
145
|
+
var MetaProperty = class extends _classSuper {
|
|
146
|
+
static { _classThis = this; }
|
|
140
147
|
static {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
148
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
149
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
150
|
+
MetaProperty = _classThis = _classDescriptor.value;
|
|
151
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
152
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
144
153
|
}
|
|
145
154
|
meta;
|
|
146
155
|
property;
|
|
@@ -188,21 +197,26 @@ export let MetaProperty = (() => {
|
|
|
188
197
|
};
|
|
189
198
|
}
|
|
190
199
|
};
|
|
191
|
-
return MetaProperty =
|
|
200
|
+
return MetaProperty = _classThis;
|
|
192
201
|
})();
|
|
202
|
+
export { MetaProperty };
|
|
193
203
|
/**
|
|
194
204
|
* A private identifier refers to private class elements. For a private name `#a`, its name is `a`.
|
|
195
205
|
*/
|
|
196
|
-
|
|
197
|
-
let
|
|
198
|
-
let
|
|
199
|
-
let
|
|
200
|
-
let
|
|
201
|
-
|
|
206
|
+
let PrivateIdentifier = (() => {
|
|
207
|
+
let _classDecorators = [Deserializer('PrivateIdentifier')];
|
|
208
|
+
let _classDescriptor;
|
|
209
|
+
let _classExtraInitializers = [];
|
|
210
|
+
let _classThis;
|
|
211
|
+
let _classSuper = Identifier;
|
|
212
|
+
var PrivateIdentifier = class extends _classSuper {
|
|
213
|
+
static { _classThis = this; }
|
|
202
214
|
static {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
215
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
216
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
217
|
+
PrivateIdentifier = _classThis = _classDescriptor.value;
|
|
218
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
219
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
206
220
|
}
|
|
207
221
|
static fromJSON(node) {
|
|
208
222
|
return new PrivateIdentifier(node.name, node.range, node.loc);
|
|
@@ -218,21 +232,26 @@ export let PrivateIdentifier = (() => {
|
|
|
218
232
|
return `#${this.name}`;
|
|
219
233
|
}
|
|
220
234
|
};
|
|
221
|
-
return PrivateIdentifier =
|
|
235
|
+
return PrivateIdentifier = _classThis;
|
|
222
236
|
})();
|
|
237
|
+
export { PrivateIdentifier };
|
|
223
238
|
/**
|
|
224
239
|
* A static block static { } is a block statement serving as an additional static initializer.
|
|
225
240
|
*/
|
|
226
|
-
|
|
227
|
-
let
|
|
228
|
-
let
|
|
229
|
-
let
|
|
230
|
-
let
|
|
231
|
-
|
|
241
|
+
let StaticBlock = (() => {
|
|
242
|
+
let _classDecorators = [Deserializer('StaticBlock')];
|
|
243
|
+
let _classDescriptor;
|
|
244
|
+
let _classExtraInitializers = [];
|
|
245
|
+
let _classThis;
|
|
246
|
+
let _classSuper = BlockStatement;
|
|
247
|
+
var StaticBlock = class extends _classSuper {
|
|
248
|
+
static { _classThis = this; }
|
|
232
249
|
static {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
250
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
251
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
252
|
+
StaticBlock = _classThis = _classDescriptor.value;
|
|
253
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
254
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
236
255
|
}
|
|
237
256
|
static fromJSON(node, deserializer) {
|
|
238
257
|
return new StaticBlock(deserializer(node.body), node.range, node.loc);
|
|
@@ -249,8 +268,9 @@ export let StaticBlock = (() => {
|
|
|
249
268
|
};
|
|
250
269
|
}
|
|
251
270
|
};
|
|
252
|
-
return StaticBlock =
|
|
271
|
+
return StaticBlock = _classThis;
|
|
253
272
|
})();
|
|
273
|
+
export { StaticBlock };
|
|
254
274
|
export class AbstractDefinition extends AbstractExpressionNode {
|
|
255
275
|
key;
|
|
256
276
|
decorators;
|
|
@@ -306,16 +326,20 @@ export class AbstractDefinition extends AbstractExpressionNode {
|
|
|
306
326
|
/**
|
|
307
327
|
* - When key is a PrivateIdentifier, computed must be false and kind can not be "constructor".
|
|
308
328
|
*/
|
|
309
|
-
|
|
310
|
-
let
|
|
311
|
-
let
|
|
312
|
-
let
|
|
313
|
-
let
|
|
314
|
-
|
|
329
|
+
let MethodDefinition = (() => {
|
|
330
|
+
let _classDecorators = [Deserializer('MethodDefinition')];
|
|
331
|
+
let _classDescriptor;
|
|
332
|
+
let _classExtraInitializers = [];
|
|
333
|
+
let _classThis;
|
|
334
|
+
let _classSuper = AbstractDefinition;
|
|
335
|
+
var MethodDefinition = class extends _classSuper {
|
|
336
|
+
static { _classThis = this; }
|
|
315
337
|
static {
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
338
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
339
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
340
|
+
MethodDefinition = _classThis = _classDescriptor.value;
|
|
341
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
342
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
319
343
|
}
|
|
320
344
|
kind;
|
|
321
345
|
static fromJSON(node, deserializer) {
|
|
@@ -453,21 +477,26 @@ export let MethodDefinition = (() => {
|
|
|
453
477
|
};
|
|
454
478
|
}
|
|
455
479
|
};
|
|
456
|
-
return MethodDefinition =
|
|
480
|
+
return MethodDefinition = _classThis;
|
|
457
481
|
})();
|
|
482
|
+
export { MethodDefinition };
|
|
458
483
|
/**
|
|
459
484
|
* - When key is a PrivateIdentifier, computed must be false.
|
|
460
485
|
*/
|
|
461
|
-
|
|
462
|
-
let
|
|
463
|
-
let
|
|
464
|
-
let
|
|
465
|
-
let
|
|
466
|
-
|
|
486
|
+
let PropertyDefinition = (() => {
|
|
487
|
+
let _classDecorators = [Deserializer('PropertyDefinition')];
|
|
488
|
+
let _classDescriptor;
|
|
489
|
+
let _classExtraInitializers = [];
|
|
490
|
+
let _classThis;
|
|
491
|
+
let _classSuper = AbstractDefinition;
|
|
492
|
+
var PropertyDefinition = class extends _classSuper {
|
|
493
|
+
static { _classThis = this; }
|
|
467
494
|
static {
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
495
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
496
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
497
|
+
PropertyDefinition = _classThis = _classDescriptor.value;
|
|
498
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
499
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
471
500
|
}
|
|
472
501
|
static fromJSON(node, deserializer) {
|
|
473
502
|
return new PropertyDefinition(deserializer(node.key), node.decorators.map(deserializer), node.computed, node.static, node.value && deserializer(node.value), node.range, node.loc);
|
|
@@ -509,18 +538,23 @@ export let PropertyDefinition = (() => {
|
|
|
509
538
|
};
|
|
510
539
|
}
|
|
511
540
|
};
|
|
512
|
-
return PropertyDefinition =
|
|
541
|
+
return PropertyDefinition = _classThis;
|
|
513
542
|
})();
|
|
514
|
-
export
|
|
515
|
-
|
|
516
|
-
let
|
|
517
|
-
let
|
|
518
|
-
let
|
|
519
|
-
|
|
543
|
+
export { PropertyDefinition };
|
|
544
|
+
let AccessorProperty = (() => {
|
|
545
|
+
let _classDecorators = [Deserializer('AccessorProperty')];
|
|
546
|
+
let _classDescriptor;
|
|
547
|
+
let _classExtraInitializers = [];
|
|
548
|
+
let _classThis;
|
|
549
|
+
let _classSuper = AbstractDefinition;
|
|
550
|
+
var AccessorProperty = class extends _classSuper {
|
|
551
|
+
static { _classThis = this; }
|
|
520
552
|
static {
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
553
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
554
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
555
|
+
AccessorProperty = _classThis = _classDescriptor.value;
|
|
556
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
557
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
524
558
|
}
|
|
525
559
|
static fromJSON(node, deserializer) {
|
|
526
560
|
return new AccessorProperty(deserializer(node.key), node.decorators.map(deserializer), node.computed, node.static, node.value ? deserializer(node.value) : void 0, node.range, node.loc);
|
|
@@ -571,18 +605,23 @@ export let AccessorProperty = (() => {
|
|
|
571
605
|
};
|
|
572
606
|
}
|
|
573
607
|
};
|
|
574
|
-
return AccessorProperty =
|
|
608
|
+
return AccessorProperty = _classThis;
|
|
575
609
|
})();
|
|
576
|
-
export
|
|
577
|
-
|
|
578
|
-
let
|
|
579
|
-
let
|
|
580
|
-
let
|
|
581
|
-
|
|
610
|
+
export { AccessorProperty };
|
|
611
|
+
let ClassBody = (() => {
|
|
612
|
+
let _classDecorators = [Deserializer('ClassBody')];
|
|
613
|
+
let _classDescriptor;
|
|
614
|
+
let _classExtraInitializers = [];
|
|
615
|
+
let _classThis;
|
|
616
|
+
let _classSuper = AbstractExpressionNode;
|
|
617
|
+
var ClassBody = class extends _classSuper {
|
|
618
|
+
static { _classThis = this; }
|
|
582
619
|
static {
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
620
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
621
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
622
|
+
ClassBody = _classThis = _classDescriptor.value;
|
|
623
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
624
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
586
625
|
}
|
|
587
626
|
body;
|
|
588
627
|
static fromJSON(node, deserializer) {
|
|
@@ -619,8 +658,9 @@ export let ClassBody = (() => {
|
|
|
619
658
|
};
|
|
620
659
|
}
|
|
621
660
|
};
|
|
622
|
-
return ClassBody =
|
|
661
|
+
return ClassBody = _classThis;
|
|
623
662
|
})();
|
|
663
|
+
export { ClassBody };
|
|
624
664
|
export class Class extends AbstractExpressionNode {
|
|
625
665
|
body;
|
|
626
666
|
decorators;
|
|
@@ -706,16 +746,20 @@ export class Class extends AbstractExpressionNode {
|
|
|
706
746
|
};
|
|
707
747
|
}
|
|
708
748
|
}
|
|
709
|
-
|
|
710
|
-
let
|
|
711
|
-
let
|
|
712
|
-
let
|
|
713
|
-
let
|
|
714
|
-
|
|
749
|
+
let ClassDeclaration = (() => {
|
|
750
|
+
let _classDecorators = [Deserializer('ClassDeclaration')];
|
|
751
|
+
let _classDescriptor;
|
|
752
|
+
let _classExtraInitializers = [];
|
|
753
|
+
let _classThis;
|
|
754
|
+
let _classSuper = Class;
|
|
755
|
+
var ClassDeclaration = class extends _classSuper {
|
|
756
|
+
static { _classThis = this; }
|
|
715
757
|
static {
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
758
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
759
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
760
|
+
ClassDeclaration = _classThis = _classDescriptor.value;
|
|
761
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
762
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
719
763
|
}
|
|
720
764
|
static fromJSON(node, deserializer) {
|
|
721
765
|
return new ClassDeclaration(deserializer(node.body), node.decorators.map(deserializer), deserializer(node.id), node.superClass && deserializer(node.superClass), node.range, node.loc);
|
|
@@ -741,18 +785,23 @@ export let ClassDeclaration = (() => {
|
|
|
741
785
|
return classConstructor;
|
|
742
786
|
}
|
|
743
787
|
};
|
|
744
|
-
return ClassDeclaration =
|
|
788
|
+
return ClassDeclaration = _classThis;
|
|
745
789
|
})();
|
|
746
|
-
export
|
|
747
|
-
|
|
748
|
-
let
|
|
749
|
-
let
|
|
750
|
-
let
|
|
751
|
-
|
|
790
|
+
export { ClassDeclaration };
|
|
791
|
+
let ClassExpression = (() => {
|
|
792
|
+
let _classDecorators = [Deserializer('ClassExpression')];
|
|
793
|
+
let _classDescriptor;
|
|
794
|
+
let _classExtraInitializers = [];
|
|
795
|
+
let _classThis;
|
|
796
|
+
let _classSuper = Class;
|
|
797
|
+
var ClassExpression = class extends _classSuper {
|
|
798
|
+
static { _classThis = this; }
|
|
752
799
|
static {
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
800
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
801
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
802
|
+
ClassExpression = _classThis = _classDescriptor.value;
|
|
803
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
804
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
756
805
|
}
|
|
757
806
|
static fromJSON(node, deserializer) {
|
|
758
807
|
return new ClassExpression(deserializer(node.body), node.decorators.map(deserializer), node.id && deserializer(node.id), node.superClass && deserializer(node.superClass), node.range, node.loc);
|
|
@@ -767,6 +816,7 @@ export let ClassExpression = (() => {
|
|
|
767
816
|
super(body, decorators, id, superClass, range, loc);
|
|
768
817
|
}
|
|
769
818
|
};
|
|
770
|
-
return ClassExpression =
|
|
819
|
+
return ClassExpression = _classThis;
|
|
771
820
|
})();
|
|
821
|
+
export { ClassExpression };
|
|
772
822
|
//# sourceMappingURL=class.js.map
|