@tilua/compiler 6.0.0 → 6.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/dist/{chunk-EQE22LX7.js → chunk-574KDV5W.js} +3 -1
- package/dist/cli.cjs +3 -1
- package/dist/cli.js +1 -1
- package/dist/index.cjs +3 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
|
@@ -1504,6 +1504,7 @@ end
|
|
|
1504
1504
|
string(called)
|
|
1505
1505
|
]);
|
|
1506
1506
|
const out = [declare !== void 0 ? local([declare], [create]) : assign([self], [create])];
|
|
1507
|
+
const statics = [];
|
|
1507
1508
|
const previous = this.classContext;
|
|
1508
1509
|
this.classContext = node;
|
|
1509
1510
|
try {
|
|
@@ -1511,7 +1512,7 @@ end
|
|
|
1511
1512
|
switch (member2.type) {
|
|
1512
1513
|
case "ClassField":
|
|
1513
1514
|
if (member2.isStatic) {
|
|
1514
|
-
|
|
1515
|
+
statics.push(assign(
|
|
1515
1516
|
[member(self, member2.name.name)],
|
|
1516
1517
|
[member2.init ? this.expression(member2.init) : nil()]
|
|
1517
1518
|
));
|
|
@@ -1542,6 +1543,7 @@ end
|
|
|
1542
1543
|
out.push(this.classInit(node, self));
|
|
1543
1544
|
if (!node.isAbstract) out.push(this.classNew(node, self));
|
|
1544
1545
|
out.push(callStatement(call(identifier(accessors), [self])));
|
|
1546
|
+
out.push(...statics);
|
|
1545
1547
|
} finally {
|
|
1546
1548
|
this.classContext = previous;
|
|
1547
1549
|
}
|
package/dist/cli.cjs
CHANGED
|
@@ -1521,6 +1521,7 @@ end
|
|
|
1521
1521
|
string(called)
|
|
1522
1522
|
]);
|
|
1523
1523
|
const out2 = [declare !== void 0 ? local([declare], [create]) : assign([self], [create])];
|
|
1524
|
+
const statics = [];
|
|
1524
1525
|
const previous = this.classContext;
|
|
1525
1526
|
this.classContext = node;
|
|
1526
1527
|
try {
|
|
@@ -1528,7 +1529,7 @@ end
|
|
|
1528
1529
|
switch (member2.type) {
|
|
1529
1530
|
case "ClassField":
|
|
1530
1531
|
if (member2.isStatic) {
|
|
1531
|
-
|
|
1532
|
+
statics.push(assign(
|
|
1532
1533
|
[member(self, member2.name.name)],
|
|
1533
1534
|
[member2.init ? this.expression(member2.init) : nil()]
|
|
1534
1535
|
));
|
|
@@ -1559,6 +1560,7 @@ end
|
|
|
1559
1560
|
out2.push(this.classInit(node, self));
|
|
1560
1561
|
if (!node.isAbstract) out2.push(this.classNew(node, self));
|
|
1561
1562
|
out2.push(callStatement(call(identifier(accessors), [self])));
|
|
1563
|
+
out2.push(...statics);
|
|
1562
1564
|
} finally {
|
|
1563
1565
|
this.classContext = previous;
|
|
1564
1566
|
}
|
package/dist/cli.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1544,6 +1544,7 @@ end
|
|
|
1544
1544
|
string(called)
|
|
1545
1545
|
]);
|
|
1546
1546
|
const out = [declare !== void 0 ? local([declare], [create]) : assign([self], [create])];
|
|
1547
|
+
const statics = [];
|
|
1547
1548
|
const previous = this.classContext;
|
|
1548
1549
|
this.classContext = node;
|
|
1549
1550
|
try {
|
|
@@ -1551,7 +1552,7 @@ end
|
|
|
1551
1552
|
switch (member2.type) {
|
|
1552
1553
|
case "ClassField":
|
|
1553
1554
|
if (member2.isStatic) {
|
|
1554
|
-
|
|
1555
|
+
statics.push(assign(
|
|
1555
1556
|
[member(self, member2.name.name)],
|
|
1556
1557
|
[member2.init ? this.expression(member2.init) : nil()]
|
|
1557
1558
|
));
|
|
@@ -1582,6 +1583,7 @@ end
|
|
|
1582
1583
|
out.push(this.classInit(node, self));
|
|
1583
1584
|
if (!node.isAbstract) out.push(this.classNew(node, self));
|
|
1584
1585
|
out.push(callStatement(call(identifier(accessors), [self])));
|
|
1586
|
+
out.push(...statics);
|
|
1585
1587
|
} finally {
|
|
1586
1588
|
this.classContext = previous;
|
|
1587
1589
|
}
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tilua/compiler",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"description": "Compiles tilua to Luau: lowers the @tilua/parser AST to a luau-parser AST and prints it",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"type": "module",
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"luau-parser": "^1.0.3",
|
|
41
|
-
"@tilua/parser": "^6.
|
|
41
|
+
"@tilua/parser": "^6.1.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/node": "^22.20.2",
|