squint-cljs 0.0.8 → 0.0.9
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/core.js +13 -4
- package/lib/cli.js +1 -1
- package/lib/compiler.js +148 -148
- package/lib/compiler.node.js +587 -588
- package/package.json +1 -1
package/core.js
CHANGED
|
@@ -273,14 +273,23 @@ export function contains_QMARK_(coll, v) {
|
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
|
|
276
|
-
|
|
277
|
-
|
|
276
|
+
|
|
277
|
+
export function dissoc_BANG_(m, ...ks) {
|
|
278
|
+
for (const k of ks) {
|
|
279
|
+
delete m[k];
|
|
280
|
+
}
|
|
281
|
+
|
|
278
282
|
return m;
|
|
279
283
|
}
|
|
280
284
|
|
|
281
|
-
export function dissoc(m,
|
|
285
|
+
export function dissoc(m, ...ks) {
|
|
282
286
|
let m2 = { ...m };
|
|
283
|
-
|
|
287
|
+
|
|
288
|
+
for (const k of ks) {
|
|
289
|
+
delete m2[k];
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
return m2;
|
|
284
293
|
}
|
|
285
294
|
|
|
286
295
|
export function inc(n) {
|
package/lib/cli.js
CHANGED
|
@@ -31,7 +31,7 @@ Z9(c);$APP.Wp.j($APP.J.g([$APP.t.h(e)],0));return d$}}();if($APP.ee.g(d$,d))retu
|
|
|
31
31
|
"alias","alias",-2039751630),E9=new $APP.D(null,"collect","collect",-284321549),k9=new $APP.D("babashka.cli","error","babashka.cli/error",-939678701),j$=new $APP.D(null,"no-run","no-run",-1534313596),t9=new $APP.D(null,"validate","validate",-201300827),f$=new $APP.D(null,"help","help",-439233446),N9=new $APP.D(null,"cause","cause",231901252),m9=new $APP.D(null,"coerce-fn","coerce-fn",-821146515),y9=new $APP.D(null,"args","args",1315556576),w9=new $APP.D(null,"no-keyword-opts","no-keyword-opts",761286018),
|
|
32
32
|
P9=new $APP.D(null,"value","value",305978217),Q9=new $APP.D(null,"pred","pred",1927423397),G9=new $APP.D(null,"closed","closed",-919675359),c$=new $APP.D("squint.repl.node","eof-while-reading","squint.repl.node/eof-while-reading",198833493),H9=new $APP.D(null,"error-fn","error-fn",-171437615),O9=new $APP.D(null,"option","option",65132272),u9=new $APP.D(null,"exec-args","exec-args",-1860766354),R9=new $APP.D(null,"ex-msg","ex-msg",-1111774387),b9=new $APP.D(null,"s","s",1705939918),J9=new $APP.D(null,
|
|
33
33
|
"cmds-opts","cmds-opts",-390130362),k$=new $APP.D(null,"h","h",1109658740),l$=new $APP.D(null,"e","e",1381269198),x9=new $APP.D(null,"cmds","cmds",-1841503952);var W9=$APP.Sl.h(""),V9=$APP.Sl.h(!1),m$,n$=process.stdout.isTTY;m$=$APP.r(n$)?process.stdin.setRawMode:n$;process.binding("contextify");var a$=$APP.Sl.h($APP.uy),o$=function o$(a){switch(arguments.length){case 0:return o$.v();case 1:return o$.h(arguments[0]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};o$.v=function(){return o$.h(null)};
|
|
34
|
-
o$.h=function(){$APP.uy=$APP.
|
|
34
|
+
o$.h=function(){$APP.uy=$APP.jA;$APP.zw=$APP.gw=!0;$APP.r(m$)&&process.stdin.setRawMode(!0);return $9("globalThis.user \x3d globalThis.user || {};").then(function(){return new Promise(function(a){var b=$APP.r(null)?esm_import$readline.createInterface({input:null,output:null}):esm_import$readline.createInterface({input:process.stdin,output:process.stdout});e$(b);b.setPrompt([$APP.t.h($APP.uy),"\x3d\x3e "].join(""));b.on("close",a);return b.prompt()})})};o$.m=1;var p$=new $APP.F(null,4,5,$APP.G,[new $APP.p(null,3,[x9,new $APP.F(null,1,5,$APP.G,["run"],null),$APP.nv,function(a){a=$APP.uh(a);a=$APP.ef.g(a,$APP.kJ);var b=$APP.uh(a),c=$APP.ef.g(b,$APP.ks);b=$APP.ef.g(b,f$);if($APP.r(b))return null;$APP.Up.j($APP.J.g(["[squint] Running",c],0));return $APP.HM($APP.Bk.l(a,$APP.DM,c)).then(function(d){d=$APP.uh(d);d=$APP.ef.g(d,$APP.FM);d=$APP.r(esm_import$path.isAbsolute(d))?d:[$APP.t.h(process.cwd()),"/",$APP.t.h(d)].join("");return shadow_esm_import(d)})},J9,
|
|
35
35
|
new $APP.F(null,1,5,$APP.G,[$APP.ks],null)],null),new $APP.p(null,3,[x9,new $APP.F(null,1,5,$APP.G,["compile"],null),r9,new $APP.p(null,2,[$APP.qy,M9,$APP.ry,M9],null),$APP.nv,function(a){var b=$APP.uh(a);a=$APP.ef.g(b,i$);b=$APP.ef.g(b,$APP.kJ);return g$(b,a)}],null),new $APP.p(null,2,[x9,new $APP.F(null,1,5,$APP.G,["repl"],null),$APP.nv,o$],null),new $APP.p(null,2,[x9,$APP.wi,$APP.nv,function(a){a=$APP.uh(a);var b=$APP.ef.g(a,i$),c=$APP.ef.g(a,$APP.kJ);a=l$.h(c);if($APP.r(a)){if($APP.r(f$.h(c)))return $APP.Up.j($APP.J.g(["Usage: squint -e \x3cexpr\x3e \x3copts\x3e\n\nOptions:\n\n--no-run: do not run compiled expression\n--show: print compiled expression"],
|
|
36
36
|
0));a=$APP.hG.h(a);var d=esm_import$fs.mkdtempSync(".tmp"),e=[$APP.t.h(d),"/squint.mjs"].join("");esm_import$fs.writeFileSync(e,a,"utf-8");$APP.r(h$.h(c))&&$APP.Up.j($APP.J.g([a],0));if($APP.r(j$.h(c)))return null;a=$APP.r(esm_import$path.isAbsolute(e))?e:[$APP.t.h(process.cwd()),"/",e].join("");return shadow_esm_import(a).finally(function(){return esm_import$fs.rmSync(d,{force:!0,recursive:!0})})}return $APP.r(function(){var f=f$.h(c);return $APP.r(f)?f:$APP.ee.g("help",$APP.x(b))||$APP.ze(b)}())?
|
|
37
37
|
$APP.Up.j($APP.J.g(["Squint v0.0.0\n\nUsage: squint \x3csubcommand\x3e \x3copts\x3e\n\nSubcommands:\n\n-e \x3cexpr\x3e Compile and run expression.\nrun \x3cfile.cljs\x3e Compile and run a file\ncompile \x3cfile.cljs\x3e ... Compile file(s)\nrepl Start repl\nhelp Print this help\n\nUse squint \x3csubcommand\x3e --help to show more info."],0)):g$(c,b)}],null)],null);(function(){var a=new $APP.p(null,1,[$APP.XI,new $APP.p(null,1,[k$,f$],null)],null),b=z9(process.argv.slice(2),a),c=$APP.uh(b),d=$APP.ef.g(c,x9),e=$APP.ef.g(c,y9);return $APP.qf.l(function(f,l){f=$APP.uh(l);var k=$APP.ef.g(f,x9),m=$APP.ef.g(f,$APP.nv),h=U9(k,d);if($APP.r(h)){l=function(){var v=null==h?null:$APP.w(h);return null==v?null:$APP.sf(v)}();l=$APP.N.g(l,e);f=T9(l,a9(a,$APP.J.g([f],0)));l=$APP.uh(f);var q=$APP.ef.g(l,$APP.kJ);f=$APP.ef.g(l,y9);l=$APP.ef.g(l,x9);var n=$APP.N.g(l,f);return $APP.Rd(function(){var v=
|