diff options
Diffstat (limited to 'src/cjs.bqn')
| -rwxr-xr-x | src/cjs.bqn | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/cjs.bqn b/src/cjs.bqn new file mode 100755 index 00000000..cb60b7df --- /dev/null +++ b/src/cjs.bqn @@ -0,0 +1,15 @@ +#! /usr/bin/env dbqn + +compile ← ⟨•path∾"../c.bqn"⋄"DGenFn"⟩ •EX •path∾"../dzref" +Symcomp ← ((<"runtime["∾⍕∾"]"˜)¨↕59)⊸Compile +FP ← ∞⊸=◶⟨⍕,"Infinity"⟩ +Str ← "str("""∾∾⟜""")" +Char ← "'"(∾∾⊣)(⟨"\t","\n","\'"⟩∾<)⊑˜("'"∾˜•UCS 9‿10)⊑∘⊐⊢ +Fmt ← ≡◶⟨(⊑⍋)∘(∾⟜∞)◶⟨0⊸≤◶⟨"-"∾FP∘|,FP⟩,Char⟩⋄Str⋄⊑⟩ +L ← "["∾"]"∾˜1↓·∾","⊸∾⟜⍕¨ +G ← ⟨L∾⟜25,L Fmt¨,L⟨⊑"fmd"⊸⊐,⊢,⊢,≠⟩⊸(L{𝕎𝕩}¨)¨⟩ {𝕎𝕩}¨ 0‿1‿3 ⊏ Symcomp +Gen ← L G +GenLong ← ∾ (1‿2/⟨" new Uint8Array("∾∾⟜")"⋄((•UCS 10)∾" ,")⊸∾⟩) {𝕎𝕩}¨ G +• ← ∾∾⟜(•UCS 10)¨ Gen¨ •args +#• ← GenLong •EX •path∾"pr.bqn" +#• ← GenLong ∾∾⟜(•UCS 10)¨ (•LNS •path∾"c.bqn")∾<"Compile" |
