aboutsummaryrefslogtreecommitdiff
path: root/src/c.bqn
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2022-06-30 10:02:25 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2022-06-30 10:04:05 -0400
commitde179e8bd2e920ca3b8cb9ec18842a708b2899cc (patch)
tree2a9a27d51141963c7f20f50b34c79435a4f6773d /src/c.bqn
parent47c0a52e614d01eb251da9301c2961338141ab6c (diff)
Prevent · as a modified assignment target in the compiler; VMs mostly don't handle this
Diffstat (limited to 'src/c.bqn')
-rw-r--r--src/c.bqn1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/c.bqn b/src/c.bqn
index 8f546551..6c22cb9c 100644
--- a/src/c.bqn
+++ b/src/c.bqn
@@ -259,6 +259,7 @@ Parse ← {r‿vn‿i‿e‿def←𝕨⋄nv←≠vn
aa←×gac←g⊏ac↩»+`(1⊸»⊸∨0=+`)⊸×gi⊏ac # Broadcast ac to the entire target
api←/(𝕩=⊑bO)∧ap←aa∧2=no # Assignment placeholder
"Can't use Nothing (·) in lists"_nerr (¬ap)×no×ns≤»lo∨ls
+ "Can't modify Nothing (·)"_err_(G) ap∧5=gac
"Square brackets can't be empty"_err_(G) aa<(𝕩=6+⊑bB)∧1«ps
ac-↩3×ah←6=ac # Assignment is header; 6→3
nx⌈↩aa×1=no # Prevent assignment to 𝕨 if it's ·