rip-lang 3.2.1 → 3.3.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/docs/dist/rip.browser.js +2 -2
- package/docs/dist/rip.browser.min.js +1 -1
- package/docs/dist/rip.browser.min.js.br +0 -0
- package/docs/index.html +1574 -2
- package/docs/rip-square.png +0 -0
- package/package.json +1 -1
- package/docs/repl.html +0 -1079
package/docs/dist/rip.browser.js
CHANGED
|
@@ -7384,8 +7384,8 @@ function getComponentRuntime() {
|
|
|
7384
7384
|
return new CodeGenerator({}).getComponentRuntime();
|
|
7385
7385
|
}
|
|
7386
7386
|
// src/browser.js
|
|
7387
|
-
var VERSION = "3.
|
|
7388
|
-
var BUILD_DATE = "2026-02-09@
|
|
7387
|
+
var VERSION = "3.3.0";
|
|
7388
|
+
var BUILD_DATE = "2026-02-09@04:28:55GMT";
|
|
7389
7389
|
var dedent = (s) => {
|
|
7390
7390
|
const m = s.match(/^[ \t]*(?=\S)/gm);
|
|
7391
7391
|
const i = Math.min(...(m || []).map((x) => x.length));
|
|
@@ -522,4 +522,4 @@ if (typeof globalThis !== 'undefined') {
|
|
|
522
522
|
`),W=U.findIndex((J)=>J==="__DATA__");if(W!==-1){let J=U.slice(W+1);F=J.length>0?J.join(`
|
|
523
523
|
`)+`
|
|
524
524
|
`:"",Y=U.slice(0,W).join(`
|
|
525
|
-
`)}let $=new x().tokenize(Y);if(this.options.showTokens)$.forEach((J)=>console.log(`${J[0].padEnd(12)} ${JSON.stringify(J[1])}`)),console.log();let Q=null;if(this.options.types==="emit"||this.options.types==="check"||this.options.types===!0)Q=W1($);$=$.filter((J)=>J[0]!=="TYPE_DECL");while($.length>0&&$[0][0]==="TERMINATOR")$.shift();if($.every((J)=>J[0]==="TERMINATOR"))return{tokens:$,sexpr:["program"],code:"",dts:Q,data:F,reactiveVars:{}};k.lexer={tokens:$,pos:0,setInput:function(){},lex:function(){if(this.pos>=this.tokens.length)return 1;let J=this.tokens[this.pos++],M=J[1];if(J.data)M=new String(M),Object.assign(M,J.data);return this.text=M,this.loc=J.loc,J[0]}};let D;try{D=k.parse(Y)}catch(J){if(/\?\s*\([^)]*\?[^)]*:[^)]*\)\s*:/.test(Y)||/\?\s+\w+\s+\?\s+/.test(Y))throw Error("Nested ternary operators are not supported. Use if/else statements instead.");throw J}if(this.options.showSExpr)console.log(v(D,0,!0)),console.log();let Z=new C({dataSection:F,skipReactiveRuntime:this.options.skipReactiveRuntime,skipComponentRuntime:this.options.skipComponentRuntime,reactiveVars:this.options.reactiveVars}),X=Z.compile(D);return{tokens:$,sexpr:D,code:X,dts:Q,data:F,reactiveVars:Z.reactiveVars}}compileToJS(Y){return this.compile(Y).code}compileToSExpr(Y){return this.compile(Y).sexpr}}I1(C);C.prototype.generateEnum=F1;function z2(Y,F={}){return new o(F).compile(Y)}function r(Y,F={}){return new o(F).compileToJS(Y)}function q2(){return new C({}).getReactiveRuntime()}function G2(){return new C({}).getComponentRuntime()}var C2="3.
|
|
525
|
+
`)}let $=new x().tokenize(Y);if(this.options.showTokens)$.forEach((J)=>console.log(`${J[0].padEnd(12)} ${JSON.stringify(J[1])}`)),console.log();let Q=null;if(this.options.types==="emit"||this.options.types==="check"||this.options.types===!0)Q=W1($);$=$.filter((J)=>J[0]!=="TYPE_DECL");while($.length>0&&$[0][0]==="TERMINATOR")$.shift();if($.every((J)=>J[0]==="TERMINATOR"))return{tokens:$,sexpr:["program"],code:"",dts:Q,data:F,reactiveVars:{}};k.lexer={tokens:$,pos:0,setInput:function(){},lex:function(){if(this.pos>=this.tokens.length)return 1;let J=this.tokens[this.pos++],M=J[1];if(J.data)M=new String(M),Object.assign(M,J.data);return this.text=M,this.loc=J.loc,J[0]}};let D;try{D=k.parse(Y)}catch(J){if(/\?\s*\([^)]*\?[^)]*:[^)]*\)\s*:/.test(Y)||/\?\s+\w+\s+\?\s+/.test(Y))throw Error("Nested ternary operators are not supported. Use if/else statements instead.");throw J}if(this.options.showSExpr)console.log(v(D,0,!0)),console.log();let Z=new C({dataSection:F,skipReactiveRuntime:this.options.skipReactiveRuntime,skipComponentRuntime:this.options.skipComponentRuntime,reactiveVars:this.options.reactiveVars}),X=Z.compile(D);return{tokens:$,sexpr:D,code:X,dts:Q,data:F,reactiveVars:Z.reactiveVars}}compileToJS(Y){return this.compile(Y).code}compileToSExpr(Y){return this.compile(Y).sexpr}}I1(C);C.prototype.generateEnum=F1;function z2(Y,F={}){return new o(F).compile(Y)}function r(Y,F={}){return new o(F).compileToJS(Y)}function q2(){return new C({}).getReactiveRuntime()}function G2(){return new C({}).getComponentRuntime()}var C2="3.3.0",h2="2026-02-09@04:28:55GMT",H2=(Y)=>{let F=Y.match(/^[ \t]*(?=\S)/gm),U=Math.min(...(F||[]).map((W)=>W.length));return Y.replace(RegExp(`^[ ]{${U}}`,"gm"),"").trim()};async function B1(){let Y=document.querySelectorAll('script[type="text/rip"]');for(let F of Y){if(F.hasAttribute("data-rip-processed"))continue;try{let U=H2(F.textContent),W=r(U);(0,eval)(W),F.setAttribute("data-rip-processed","true")}catch(U){console.error("Error compiling Rip script:",U),console.error("Script content:",F.textContent)}}}if(typeof document<"u")if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",B1);else B1();function _2(Y){try{let U=r(Y).replace(/^let\s+[^;]+;\s*\n\s*/m,"");U=U.replace(/^const\s+/gm,"var ");let W=(0,eval)(U);if(W!==void 0)globalThis._=W;return W}catch(F){console.error("Rip compilation error:",F.message);return}}if(typeof globalThis<"u")globalThis.rip=_2;export{_2 as rip,B1 as processRipScripts,k as parser,q2 as getReactiveRuntime,G2 as getComponentRuntime,v as formatSExpr,r as compileToJS,z2 as compile,C2 as VERSION,x as Lexer,o as Compiler,C as CodeGenerator,h2 as BUILD_DATE};
|
|
Binary file
|