rip-lang 2.7.2 → 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/bin/rip +30 -0
- package/docs/WHY-YES-RIP.md +4 -4
- 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/bin/rip
CHANGED
|
@@ -183,6 +183,36 @@ async function main() {
|
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
+
// Fallback: Check for bin/ script in git repo root
|
|
187
|
+
// Allows `rip migrate --status` to find and run {repo}/bin/migrate
|
|
188
|
+
if (inputFile && !inputFile.startsWith('-') && !existsSync(inputFile)) {
|
|
189
|
+
try {
|
|
190
|
+
// Check if we're in a git repo
|
|
191
|
+
const repoRoot = execSync('git rev-parse --show-toplevel', {
|
|
192
|
+
encoding: 'utf-8',
|
|
193
|
+
stdio: ['pipe', 'pipe', 'pipe']
|
|
194
|
+
}).trim();
|
|
195
|
+
|
|
196
|
+
// Look for bin/{command} in repo root
|
|
197
|
+
const binScript = join(repoRoot, 'bin', inputFile);
|
|
198
|
+
|
|
199
|
+
if (existsSync(binScript)) {
|
|
200
|
+
// Found it! Execute with remaining args
|
|
201
|
+
try {
|
|
202
|
+
execSync(`"${binScript}" ${scriptArgs.join(' ')}`, {
|
|
203
|
+
stdio: 'inherit',
|
|
204
|
+
shell: true
|
|
205
|
+
});
|
|
206
|
+
process.exit(0);
|
|
207
|
+
} catch (error) {
|
|
208
|
+
process.exit(error.status || 1);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
} catch {
|
|
212
|
+
// Not in a git repo, or git not available - fall through to normal error
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
186
216
|
let source;
|
|
187
217
|
|
|
188
218
|
try {
|
package/docs/WHY-YES-RIP.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
That "Why Not" document makes strong arguments, but here's the **counter-argument**—a working, tested, **production-ready** language that offers a different path.
|
|
8
8
|
|
|
9
|
-
**Rip isn't vaporware. It's real.
|
|
9
|
+
**Rip isn't vaporware. It's real. Fully tested. Self-hosting. Zero dependencies. Available now.**
|
|
10
10
|
|
|
11
11
|
### The Philosophical Divide: Freedom vs Fear
|
|
12
12
|
|
|
@@ -198,7 +198,7 @@ Not "minimal." Not "few." **ZERO.** This is **real**, **running**, **today**.
|
|
|
198
198
|
// Actual package.json from Rip
|
|
199
199
|
{
|
|
200
200
|
"name": "rip-lang",
|
|
201
|
-
"version": "
|
|
201
|
+
"version": "x.y.z",
|
|
202
202
|
"dependencies": {} // ← COMPLETELY EMPTY
|
|
203
203
|
}
|
|
204
204
|
```
|
|
@@ -706,7 +706,7 @@ Rip isn't about going backward. It's about recognizing that **we took a wrong tu
|
|
|
706
706
|
|
|
707
707
|
**The future isn't more dependencies. It's zero dependencies.**
|
|
708
708
|
|
|
709
|
-
**The future is Rip.
|
|
709
|
+
**The future is Rip. Available today.**
|
|
710
710
|
|
|
711
711
|
---
|
|
712
712
|
|
|
@@ -752,6 +752,6 @@ $ echo 'console.log "Hello, Rip!"' > test.rip && bun test.rip
|
|
|
752
752
|
- ✅ **Ruby constructors** (`ClassName.new()` - elegant instantiation)
|
|
753
753
|
- ✅ **Framework-agnostic** (use with React, Vue, Svelte, or vanilla JS!)
|
|
754
754
|
|
|
755
|
-
**
|
|
755
|
+
**Available now. Clone and go.**
|
|
756
756
|
|
|
757
757
|
This approach is ready. Give it a try.
|
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));
|