From 6c3f798b272bc0e920791d6555ce66c7f958a5d6 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Thu, 22 Apr 2021 14:10:34 -0400 Subject: =?UTF-8?q?Pass=20set=20of=20primitive=20glyphs=20into=20compiler?= =?UTF-8?q?=20as=20=E2=80=A2args?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/c.bqn | 7 ++++--- src/cjs.bqn | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/c.bqn b/src/c.bqn index f6c1ccbb..f9151815 100644 --- a/src/c.bqn +++ b/src/c.bqn @@ -1,8 +1,9 @@ +func‿mod1‿mod2 ← •args lf←@+10 charSet‿cgl←(∾ ≍○< ≠¨)⟨ - "+-×÷⋆√⌊⌈|¬∧∨<>≠=≤≥≡≢⊣⊢⥊∾≍↑↓↕«»⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔!" # Function - "˙˜˘¨⌜⁼´˝`" # 1-modifier - "∘○⊸⟜⌾⊘◶⎉⚇⍟⎊" # 2-modifier + func # Function + mod1 # 1-modifier + mod2 # 2-modifier "⋄,"∾lf # Separator "⇐←↩" # Gets "(){}⟨⟩" # Bracket diff --git a/src/cjs.bqn b/src/cjs.bqn index e2e8b057..487740f0 100755 --- a/src/cjs.bqn +++ b/src/cjs.bqn @@ -18,7 +18,8 @@ F ← ⍕ # Format number FP ← ∞⊸=◶⟨F,"Infinity"⟩ # Format positive number Num ← 0⊸≤◶⟨"-"∾FP∘|,FP⟩ # Format number -compile ← •Import "c.bqn" +glyphs ← •Import "glyphs.bqn" +compile ← glyphs •Import "c.bqn" useInd ← "-i"≡⊑args←•args ⋄ args↓˜↩useInd Comp ← (3+useInd) ↑ ((<"runtime" Ind F)¨↕62)⊸Compile J ← ∾∾⟜(@+10)¨ @@ -29,7 +30,8 @@ Long ← ∾ (≠↑1‿3/⟨" "⊸∾⋄((@+10)∾" ,")⊸∾⟩˙) {𝕎𝕩} SVG ← {∾⟨"Modify←GetHighlights←⊢⋄"⟩∾ •FChars∘∾⟜".bqn"¨ "../svg"‿𝕩} •Out (⊑"r"‿"c"‿"f"‿"e"‿"p"⊐⊏)◶⟨ {𝕩⋄ref‿len←•Import"pr.bqn"⋄Long Frun len⊸↓⌾(1⊸⊑)Comp ref} - {𝕩⋄Long Fout Comp •FChars "c.bqn"} + {𝕩⋄g←"⟨"∾"⟩"«∾","⊸∾¨'"'(⊣∾∾˜)¨glyphs + Long Fout Comp J (¯5⊸↓∾g˙)⌾⊑ •FLines "c.bqn"} {𝕩⋄Long Fout Comp •FChars "f.bqn"} {𝕩⋄Long Fout Comp SVG "e"} {𝕩⋄Long Fout Comp SVG "p"} -- cgit v1.2.3