aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-09-05 22:17:48 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-09-05 22:17:48 -0400
commit6bb849d6cfc00791acb72017ac0e7f7dea7bdc08 (patch)
treea61dcbc94a73a2842e492e46dc3b89211808ca70 /src
parentf8e364460bd05dbd3e6db9d36166ef2b16745b66 (diff)
Align self-hosted compiler with dzaima/BQN one, except for UTF-16 hacks
Diffstat (limited to 'src')
-rw-r--r--src/c.bqn2
-rwxr-xr-xsrc/cjs.bqn4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/c.bqn b/src/c.bqn
index 1967591f..bd41f254 100644
--- a/src/c.bqn
+++ b/src/c.bqn
@@ -83,7 +83,7 @@ LEBv ← {
ErrMismatchedBrackets←{
Lcs ← ¯1 ⊑ 0˘∘⊢ {𝕩⌈⌈`𝕨+0∾˜1↓𝕩}˝ =⌜
- _mis ← {"Missing "∾𝕗∾" "∾charSet⊏˜𝕘+⊢/˜≠∘⊣=⊒}
+ _mis_ ← {"Missing "∾𝕗∾" "∾charSet⊏˜𝕘+⊢/˜≠∘⊣=⊒}
Msg ← >○≠◶⟨"opening"_mis_ 0, "closing"_mis_ 1˜⟩
0 !˜ 𝕨 (Lcs<⌊○≠)◶⟨Msg,"Malformed bracket nesting"⟩ 𝕩
}
diff --git a/src/cjs.bqn b/src/cjs.bqn
index e936b4fd..2b26f65d 100755
--- a/src/cjs.bqn
+++ b/src/cjs.bqn
@@ -1,6 +1,6 @@
#! /usr/bin/env dbqn
-compile ← ⟨•path∾"../c.bqn"⋄"DGenFn"⟩ •EX •path∾"../dzref"
+compile ← ⟨•path∾"../c.bqn"⋄"Compile"⟩ •EX •path∾"../dzref"
Comp ← ((<"runtime["∾⍕∾"]"˙)¨↕60)⊸Compile
FP ← ∞⊸=◶⟨⍕,"Infinity"⟩
Esc ← (⟨"\t","\n","\r","\'"⟩∾<∘⥊)⊑˜("'"∾˜@+9‿10‿13)⊑∘⊐⊢
@@ -9,7 +9,7 @@ Char ← "'"(∾∾⊣)Esc
Fconst ← ≡◶⟨(⊑⍋)∘(∾⟜∞)◶⟨0⊸≤◶⟨"-"∾FP∘|,FP⟩,Char⟩⋄Str⋄⊑⟩
L ← "["∾"]"∾˜1↓·∾","⊸∾⟜⍕¨
J ← ∾∾⟜(@+10)¨
-Fout ← ⟨L∾⟜25,L Fconst¨,L⟨⊑"fmd"⊸⊐,⊢,⊢,≠⟩⊸(L{𝕎𝕩}¨)¨⟩ {𝕎𝕩}¨ 0‿1‿3 ⊏ ⊢
+Fout ← ⟨⊢,Fconst,L⟩ {L𝕎¨𝕩}¨ ⊢
Frun ← ("provide.concat("∾∾⟜")")⌾(1⊸⊑) Fout
Long ← ∾ (1‿2/⟨" new Uint8Array("∾∾⟜")"⋄((@+10)∾" ,")⊸∾⟩) {𝕎𝕩}¨ ⊢
• ← (⊑"r"‿"c"‿"fmt"⊐⊏)◶⟨