diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-05-04 20:42:32 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-05-04 20:42:32 -0400 |
| commit | 5a477b9cfe4653cd33a67ac5004eeb3565018e25 (patch) | |
| tree | de6b1296a5df8bfb34bf816f61013c09892d7b70 /dc.bqn | |
| parent | 7732a337032257b72ee09ee8b26fd79c5a539668 (diff) | |
Support namespace creation in the compiler
Diffstat (limited to 'dc.bqn')
| -rwxr-xr-x | dc.bqn | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -9,11 +9,12 @@ compile ← glyphs •Import "src/c.bqn" special←<˘∘‿2⥊"𝕤𝕩𝕨𝕣𝕗𝕘" DCompile⇐{ - ⟨bc,o,fblk,ind⟩ ← 4 ↑ (𝕨 •BQN∘⥊¨∘∾⊘⊣ glyphs) Compile 𝕩 + ⟨bc,o,fblk,ind,tok⟩ ← 5 ↑ (𝕨 •BQN∘⥊¨∘∾⊘⊣ glyphs) Compile 𝕩 + name ← ⊑2⊑tok blk‿bdy ← <˘⍉>(↕≠fblk){ - ⟨t,i,l,n⟩←𝕩 + ⟨t,i,l,n,d,e⟩←𝕩 s←(3×i)↓(t⊑3‿5‿6)↑special - ⟨⟨t,i,𝕨,𝕨⟩ ⋄ ⟨l, s∾⥊¨'a'+↕n-≠s⟩⟩ + ⟨⟨t,i,𝕨,𝕨⟩ ⋄ ⟨l, s∾d⊏name, (0¨s)∾e⟩⟩ }¨fblk ⟨bc,o,blk,⊑blk,bdy,⊑ind,1⊑ind,𝕩⟩ } |
