aboutsummaryrefslogtreecommitdiff
path: root/dzref
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-29 18:08:24 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-29 18:08:24 -0400
commit1461cb3b0dcf4991295ecffa7317ae0c4a7a909c (patch)
tree7e04a6b27849fd5e56fbd259227157768d320ba2 /dzref
parent48d8cc1401e46b8c33330f0f61fd36b40c20b789 (diff)
Don't include undefined built-in guards in preprocessing
Diffstat (limited to 'dzref')
-rwxr-xr-xdzref16
1 files changed, 6 insertions, 10 deletions
diff --git a/dzref b/dzref
index 26a4891a..03c14965 100755
--- a/dzref
+++ b/dzref
@@ -150,23 +150,19 @@ X←Raw←{≤4}
post ← ∾⟜" "¨/⟜"_"¨nc/0‿0‿1
names ← init∾¨(•UCS 48)∾¨post
- Inc ← {
+ Inc ← {
i←⊑chr⊐𝕩
n←0 ⋄ itr↩{n↩1+𝕩}⌾(i⊑⊢)itr
names↩((i⊑init)∾(•UCS 48+n)∾i⊑post)⌾(i⊑⊢)names
}
- # starting built-ins
- inps←⟨"𝕨 ","𝕨,𝕗","𝕨,𝕘"⟩
- ⍎¨names∾¨(nc/("←{⟨"∾∾⟜"⟩ ⋄ ⍎""Using undefined built-in ")¨inps)∾¨∾⟜"""}"¨chr
-
# built-in assumptions
- Mod ← ⍎{𝔽 ((⊑chr⊐𝕨)⊑names) ∾ " ↩ " ∾ 𝕩}
-
- ⍎"IsArray ← 0≠≡"
+ Mod ← {((⊑chr⊐𝕨)⊑names) ∾ " ← " ∾ 𝕩}
- '!' Mod "{𝕩 ⋄ ≤1}⍟¬"
- Mod⟜⥊¨ "↕∾⌽⊐⍋⍒"
+ ⍎¨ ⟨
+ "IsArray ← 0≠≡"
+ '!' Mod "{𝕩 ⋄ ≤1}⍟¬"
+ ⟩∾Mod⟜⥊¨ "↕∾⌽⊐⍋⍒"
# checks if line is a builtin redefinition