aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/c.bqn2
-rw-r--r--src/f.bqn4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/c.bqn b/src/c.bqn
index 4ff72181..5afbac39 100644
--- a/src/c.bqn
+++ b/src/c.bqn
@@ -71,7 +71,7 @@ Tokenize←{
p←≠`1¨sb←¯1↓1↓/1(∾≠∾˜)t=sep # Separator group boundaries (excludes leading and trailing)
sk←sb/˜p>∨⟜«(p+(sb-p)⊏t)∊3‿5+⊑bB # Keep the first of each group that's not just inside a bracket
t{ie/˜↩𝕨⋄𝕨Fs𝕩}˜↩1¨⌾(sk⊸⊏)t≠sep # Remove the rest
- r←ir⌾((t M vi∾≠⊑k)⊸/)(vi⌊t)⊏charRole∾0 # Role
+ r←ir⌾((t M vi≍≠⊑k)⊸/)(vi⌊t)⊏charRole∾0 # Role
t+↩5×t M⟨⊑bI,5⟩ # Case-insensitive special names
⟨t,r,k,is,ie⟩
}
diff --git a/src/f.bqn b/src/f.bqn
index 707b7d7d..52ea46ce 100644
--- a/src/f.bqn
+++ b/src/f.bqn
@@ -50,7 +50,7 @@
s ← ≢¨ 𝕩
w ← (0<=)◶⟨⥊,⌈˝⍟(=-1˙)⟩1⊑¨s
h ← ⌈˝⎉1⍟(0<=) ⊑¨s
- o ← <∘∾⎉2 ≍⍟(0⌈2-=) (h ∾⌜ 𝕨×w¬(-𝕨×≠w)↑1) ↑¨ 𝕩
+ o ← <∘∾⎉2 ≍⍟(0⌈2-=) (h ≍⌜ 𝕨×w¬(-𝕨×≠w)↑1) ↑¨ 𝕩
2 PadH (1⊸⌽⊸≡⥊h)◶⟨PadVMixed,PadV∘>⟩ o
}
@@ -60,13 +60,13 @@
FmtSimple ← (≠(0⊸<+≤)+´)∘(⥊<@˙)◶{ # Depth 1
# All characters
+ r ← =𝕩 ⋄ 𝕩 ↩ 0↓𝕩
k ← ∞⍟(0⊸=) -≠ c ← ¯1↓≢𝕩
q ← '"'
# Escape quotes in strings (rank 1) and substitute control chars
# with control pictures for other ranks.
CSub ← { 𝕩 + (𝕩(=×'␡'-⊢)@+127) + ('␀'-@)×𝕩<@+32 }
𝕩 ↩ (1≠=)◶⟨(1+q=⊢)⊸/,Csub⟩ 𝕩
- r ← =𝕩
(r Enframe 1 PadH PadV)⍟(1≠r) ≍ (q⌾⊑c⥊(¯1⊑1∾c)↑'·') ∾⎉k 𝕩 ∾⎉k c-⊸↑q
}‿{
# Not homogeneous, or empty