rip-lang 2.8.9 → 2.9.1
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/CHANGELOG.md +39 -0
- package/README.md +39 -12
- package/docs/BROWSER.md +8 -8
- package/docs/GUIDE.md +13 -13
- package/docs/INTERNALS.md +11 -11
- package/docs/RATIONALE.md +180 -0
- package/docs/REACTIVITY.md +5 -5
- package/docs/TYPES.md +1132 -0
- package/docs/dist/rip.browser.js +12 -5
- package/docs/dist/rip.browser.min.js +10 -10
- package/docs/dist/rip.browser.min.js.br +0 -0
- package/docs/examples/README.md +21 -142
- package/docs/examples/arrows.rip +3 -13
- package/docs/examples/module.rip +41 -31
- package/docs/examples/reactivity.rip +48 -0
- package/package.json +1 -1
- package/src/compiler.js +13 -3
- package/src/grammar/grammar.rip +2 -2
- package/src/grammar/solar.rip +1 -1
- package/src/parser.js +1 -1
- package/docs/PHILOSOPHY.md +0 -569
- package/docs/WHY-NOT-COFFEESCRIPT.md +0 -186
- package/docs/WHY-YES-RIP.md +0 -757
- package/docs/examples/object-syntax.rip +0 -74
- package/docs/examples/prototype.rip +0 -30
- package/docs/examples/sexpr.rip +0 -128
- package/docs/examples/use-loader.js +0 -9
- package/docs/examples/utils.rip +0 -20
package/docs/dist/rip.browser.js
CHANGED
|
@@ -2898,7 +2898,7 @@ var parserInstance = {
|
|
|
2898
2898
|
return ["super", ...$[$0]];
|
|
2899
2899
|
case 103:
|
|
2900
2900
|
case 249:
|
|
2901
|
-
return [
|
|
2901
|
+
return [$[$0 - 1], ...$[$0]];
|
|
2902
2902
|
case 104:
|
|
2903
2903
|
case 105:
|
|
2904
2904
|
return [$[$0 - 2], ...$[$0]];
|
|
@@ -3751,7 +3751,7 @@ class CodeGenerator {
|
|
|
3751
3751
|
if (head === "export" || head === "export-default" || head === "export-all" || head === "export-from") {
|
|
3752
3752
|
return;
|
|
3753
3753
|
}
|
|
3754
|
-
if (head === "state" || head === "computed"
|
|
3754
|
+
if (head === "state" || head === "computed") {
|
|
3755
3755
|
const [target] = rest;
|
|
3756
3756
|
const varName = typeof target === "string" ? target : target.valueOf();
|
|
3757
3757
|
if (!this.reactiveVars)
|
|
@@ -3759,6 +3759,9 @@ class CodeGenerator {
|
|
|
3759
3759
|
this.reactiveVars.add(varName);
|
|
3760
3760
|
return;
|
|
3761
3761
|
}
|
|
3762
|
+
if (head === "readonly") {
|
|
3763
|
+
return;
|
|
3764
|
+
}
|
|
3762
3765
|
if (CodeGenerator.ASSIGNMENT_OPS.has(head)) {
|
|
3763
3766
|
const [target, value] = rest;
|
|
3764
3767
|
if (typeof target === "string" || target instanceof String) {
|
|
@@ -5825,7 +5828,11 @@ ${this.indent()}}`;
|
|
|
5825
5828
|
generateImport(head, rest, context, sexpr) {
|
|
5826
5829
|
if (rest.length === 1) {
|
|
5827
5830
|
const [urlExpr] = rest;
|
|
5828
|
-
|
|
5831
|
+
const importExpr = `import(${this.generate(urlExpr, "value")})`;
|
|
5832
|
+
if (sexpr[0] instanceof String && sexpr[0].await === true) {
|
|
5833
|
+
return `(await ${importExpr})`;
|
|
5834
|
+
}
|
|
5835
|
+
return importExpr;
|
|
5829
5836
|
}
|
|
5830
5837
|
const [specifier, source] = rest;
|
|
5831
5838
|
const fixedSource = this.addJsExtensionAndAssertions(source);
|
|
@@ -7632,8 +7639,8 @@ function compileToJS(source, options = {}) {
|
|
|
7632
7639
|
return new Compiler(options).compileToJS(source);
|
|
7633
7640
|
}
|
|
7634
7641
|
// src/browser.js
|
|
7635
|
-
var VERSION = "2.
|
|
7636
|
-
var BUILD_DATE = "2026-02-
|
|
7642
|
+
var VERSION = "2.9.1";
|
|
7643
|
+
var BUILD_DATE = "2026-02-07@03:10:50GMT";
|
|
7637
7644
|
var dedent = (s) => {
|
|
7638
7645
|
const m = s.match(/^[ \t]*(?=\S)/gm);
|
|
7639
7646
|
const i = Math.min(...(m || []).map((x) => x.length));
|