rip-lang 2.7.3 → 2.8.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 +1 -1
- package/docs/dist/rip.browser.js +23 -2
- package/docs/dist/rip.browser.min.js +82 -82
- package/docs/dist/rip.browser.min.js.br +0 -0
- package/package.json +1 -1
- package/src/lexer.js +27 -0
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-2.
|
|
12
|
+
<a href="CHANGELOG.md"><img src="https://img.shields.io/badge/version-2.8.0-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-979%2F979-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.browser.js
CHANGED
|
@@ -1712,6 +1712,7 @@ Rewriter = function() {
|
|
|
1712
1712
|
this.convertPostfixSpreadRest();
|
|
1713
1713
|
this.tagPostfixConditionals();
|
|
1714
1714
|
this.addImplicitBracesAndParens();
|
|
1715
|
+
this.addImplicitCallCommas();
|
|
1715
1716
|
this.rescueStowawayComments();
|
|
1716
1717
|
this.addLocationDataToGeneratedTokens();
|
|
1717
1718
|
this.fixIndentationLocationData();
|
|
@@ -2123,6 +2124,26 @@ Rewriter = function() {
|
|
|
2123
2124
|
return forward(1);
|
|
2124
2125
|
});
|
|
2125
2126
|
}
|
|
2127
|
+
addImplicitCallCommas() {
|
|
2128
|
+
var callDepth, i, prevTag, tag, tokens;
|
|
2129
|
+
tokens = this.tokens;
|
|
2130
|
+
callDepth = 0;
|
|
2131
|
+
i = 0;
|
|
2132
|
+
while (i < tokens.length) {
|
|
2133
|
+
tag = tokens[i][0];
|
|
2134
|
+
prevTag = i > 0 ? tokens[i - 1][0] : null;
|
|
2135
|
+
if (tag === "CALL_START" || tag === "(") {
|
|
2136
|
+
callDepth++;
|
|
2137
|
+
} else if (tag === "CALL_END" || tag === ")") {
|
|
2138
|
+
callDepth--;
|
|
2139
|
+
}
|
|
2140
|
+
if (callDepth > 0 && (tag === "->" || tag === "=>") && (prevTag === "STRING" || prevTag === "STRING_END")) {
|
|
2141
|
+
tokens.splice(i, 0, generate(",", ",", tokens[i], tokens[i - 1]));
|
|
2142
|
+
i++;
|
|
2143
|
+
}
|
|
2144
|
+
i++;
|
|
2145
|
+
}
|
|
2146
|
+
}
|
|
2126
2147
|
rescueStowawayComments() {
|
|
2127
2148
|
var dontShiftForward, insertPlaceholder, shiftCommentsBackward, shiftCommentsForward;
|
|
2128
2149
|
insertPlaceholder = function(token, j, tokens, method) {
|
|
@@ -7488,8 +7509,8 @@ function compileToJS(source, options = {}) {
|
|
|
7488
7509
|
return new Compiler(options).compileToJS(source);
|
|
7489
7510
|
}
|
|
7490
7511
|
// src/browser.js
|
|
7491
|
-
var VERSION = "2.
|
|
7492
|
-
var BUILD_DATE = "2026-02-03
|
|
7512
|
+
var VERSION = "2.8.0";
|
|
7513
|
+
var BUILD_DATE = "2026-02-04@03:22:39GMT";
|
|
7493
7514
|
var dedent = (s) => {
|
|
7494
7515
|
const m = s.match(/^[ \t]*(?=\S)/gm);
|
|
7495
7516
|
const i = Math.min(...(m || []).map((x) => x.length));
|