diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-11-02 17:55:15 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-11-02 17:55:15 -0400 |
| commit | 1e4df68fc965db0c9505e8020eb0195e9e7a1add (patch) | |
| tree | 98b0a64978ca921ea42c19badffb307b6adf0719 /src/c.bqn | |
| parent | 1b4975d31806f045d966109d96bdffb1da0f3259 (diff) | |
Propogate header type/kind to headerless bodies
Diffstat (limited to 'src/c.bqn')
| -rw-r--r-- | src/c.bqn | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -198,14 +198,14 @@ Parse ← {r‿vn‿i‿e‿def←𝕨⋄nv←≠vn hj←gi⊏˜he/hi⋄hd←2=he/hk # Block properties - ss←((rev⊏r=3)∧𝕩=3+⊑bI)+(0‿3‿5‿6+⊑bI)⍋𝕩 # Special name (treat _𝕣_ as 4) + ss←0‿3‿5‿6⍋hv⊸⌊⌾(hi⊸⊏)𝕩-⊑bI # Special name + ss+↩(rev⊏r=3)∧𝕩=3+⊑bI # Treat _𝕣_ as 3, like 𝕘 HS←(¯1+`cf)⊏b¬∘PN=⟜ss⋄sp←/hf<𝕩 M bI # Has-special (𝕤𝕩𝕨/𝕣𝕗/𝕘); indices of specials fx←HS 1⋄fr←(fx∨0⊸<)⊸+ft←2(⊣⌈2×⊢)○HS 3 # Body immediacy ¬fx, type ft, role fr - "Block header conflicts with special names"_err_(ch/0∾/∘CB) (hr<ch/fr)∨hl<hx<ch/fx + "Block header conflicts with other bodies"_err_(ch/0∾/∘CB) (hr<ch/fr)∨hl<hx<ch/fx ft⌈↩1-˜fr↩hr⌾(ch⊸/)fr⋄fx↩hx⊸⌈⌾(ch⊸/)fx "Special name outside of any block"_err_(/{(0=fi)∧𝕩 M bI}∘𝕩) 0<⊑fr "Only blocks with explicit arguments can have multiple bodies"_err_(/CB) 1↓(»⊸∨cq>ch)<cm>fx - "Block bodies must be of the same kind"_err_(/CB) 1↓cf<»⊸≠ft fsc←(ft⊏0‿2‿3)+3×fx # Special name count hv-↩(»+`hc)⊏3׬ch/fx # Header variable slot |
