rip-lang 3.13.116 → 3.13.118
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 +1 -1
- package/docs/dist/rip.js +18 -4
- package/docs/dist/rip.min.js +59 -59
- package/docs/dist/rip.min.js.br +0 -0
- package/package.json +1 -1
- package/src/compiler.js +6 -2
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
|
-
<a href="CHANGELOG.md"><img src="https://img.shields.io/badge/version-3.13.
|
|
12
|
+
<a href="CHANGELOG.md"><img src="https://img.shields.io/badge/version-3.13.118-blue.svg" alt="Version"></a>
|
|
13
13
|
<a href="#zero-dependencies"><img src="https://img.shields.io/badge/dependencies-ZERO-brightgreen.svg" alt="Dependencies"></a>
|
|
14
14
|
<a href="#"><img src="https://img.shields.io/badge/tests-1%2C436%2F1%2C436-brightgreen.svg" alt="Tests"></a>
|
|
15
15
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green.svg" alt="License"></a>
|
package/docs/dist/rip.js
CHANGED
|
@@ -6158,6 +6158,21 @@ if (typeof globalThis !== 'undefined') {
|
|
|
6158
6158
|
"optindex",
|
|
6159
6159
|
"optcall"
|
|
6160
6160
|
]);
|
|
6161
|
+
var STMT_ONLY = new Set([
|
|
6162
|
+
"def",
|
|
6163
|
+
"class",
|
|
6164
|
+
"if",
|
|
6165
|
+
"unless",
|
|
6166
|
+
"for-in",
|
|
6167
|
+
"for-of",
|
|
6168
|
+
"for-as",
|
|
6169
|
+
"while",
|
|
6170
|
+
"until",
|
|
6171
|
+
"loop",
|
|
6172
|
+
"switch",
|
|
6173
|
+
"try",
|
|
6174
|
+
"throw"
|
|
6175
|
+
]);
|
|
6161
6176
|
function isInline(arr) {
|
|
6162
6177
|
if (!Array.isArray(arr) || arr.length === 0)
|
|
6163
6178
|
return false;
|
|
@@ -7198,12 +7213,11 @@ function _setDataSection() {
|
|
|
7198
7213
|
let paramSyntax = isSingle ? paramList : `(${paramList})`;
|
|
7199
7214
|
let isAsync = this.containsAwait(body);
|
|
7200
7215
|
let prefix = isAsync ? "async " : "";
|
|
7201
|
-
let stmtOnly = new Set(["def", "class", "if", "for-in", "for-of", "for-as", "while", "until", "loop", "switch", "try", "unless"]);
|
|
7202
7216
|
if (!sideEffectOnly) {
|
|
7203
7217
|
if (this.is(body, "block") && body.length === 2) {
|
|
7204
7218
|
let expr = body[1];
|
|
7205
7219
|
let exprHead = Array.isArray(expr) ? expr[0] : null;
|
|
7206
|
-
if (exprHead !== "return" && !
|
|
7220
|
+
if (exprHead !== "return" && !STMT_ONLY.has(exprHead)) {
|
|
7207
7221
|
let code = this.generate(expr, "value");
|
|
7208
7222
|
if (code[0] === "{")
|
|
7209
7223
|
code = `(${code})`;
|
|
@@ -9641,8 +9655,8 @@ globalThis.zip ??= (...a) => a[0].map((_, i) => a.map(b => b[i]));
|
|
|
9641
9655
|
return new CodeGenerator({}).getComponentRuntime();
|
|
9642
9656
|
}
|
|
9643
9657
|
// src/browser.js
|
|
9644
|
-
var VERSION = "3.13.
|
|
9645
|
-
var BUILD_DATE = "2026-03-14@10:
|
|
9658
|
+
var VERSION = "3.13.118";
|
|
9659
|
+
var BUILD_DATE = "2026-03-14@10:30:23GMT";
|
|
9646
9660
|
if (typeof globalThis !== "undefined") {
|
|
9647
9661
|
if (!globalThis.__rip)
|
|
9648
9662
|
new Function(getReactiveRuntime())();
|