diff options
| -rwxr-xr-x | src/cjs.bqn | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/cjs.bqn b/src/cjs.bqn index 47e65d04..abb16c47 100755 --- a/src/cjs.bqn +++ b/src/cjs.bqn @@ -1,7 +1,8 @@ #! /usr/bin/env dbqn compile ← •Import "c.bqn" -Comp ← ¯1 ↓ ((<"runtime["∾⍕∾"]"˙)¨↕62)⊸Compile +useInd ← "-i"≡⊑args←•args ⋄ args↓˜↩useInd +Comp ← (-¬useInd) ↓ ((<"runtime["∾⍕∾"]"˙)¨↕62)⊸Compile FP ← ∞⊸=◶⟨⍕,"Infinity"⟩ Esc ← (⟨"\t","\n","\r","\'","\"""⟩∾<∘⥊)⊑˜("'"""∾˜@+9‿10‿13)⊑∘⊐⊢ Str ← "str("""∾(∾Esc¨)∾""")"˜ @@ -9,12 +10,12 @@ Char ← "'"(∾∾⊣)Esc Fconst ← ≡◶⟨(⊑⍋)∘(∾⟜∞)◶⟨0⊸≤◶⟨"-"∾FP∘|,FP⟩,Char⟩⋄Str⋄⊑⟩ L ← "["∾"]"∾˜1↓·∾","⊸∾⟜⍕¨ J ← ∾∾⟜(@+10)¨ -Fout ← ⟨⊢,Fconst,L⟩ {L𝕎¨𝕩}¨ ⊢ +Fout ← (≠↑⟨⊢,Fconst,L,⊢⟩˙) {L𝕎¨𝕩}¨ ⊢ Frun ← ("provide.concat("∾∾⟜")")⌾(1⊸⊑) Fout -Long ← ∾ (1‿2/⟨" new Uint8Array("∾∾⟜")"⋄((@+10)∾" ,")⊸∾⟩) {𝕎𝕩}¨ ⊢ +Long ← ∾ (≠↑1‿3/⟨" new Uint8Array("∾∾⟜")"⋄((@+10)∾" ,")⊸∾⟩˙) {𝕎𝕩}¨ ⊢ • ← (⊑"r"‿"c"‿"fmt"⊐⊏)◶⟨ {𝕩⋄ref‿len←•Import"pr.bqn"⋄Long Frun len⊸↓⌾(1⊸⊑)Comp ref} {𝕩⋄Long Fout Comp J •LNS "c.bqn"} {𝕩⋄Long Fout Comp J •LNS "fmt.bqn"} ¯1 ↓ · J L∘Fout∘Comp¨ -⟩ •args +⟩ args |
