aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-10-07 22:01:23 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-10-07 22:21:57 -0400
commit8301f076679646a2479fdbd3cc53a0a666fb5734 (patch)
tree64c2f22c94dd7e3ac0bf9498f275e36cbb5d29db /src
parent3ee0c34c13c1f80429915eace1b783a899e36042 (diff)
Validate function and modifier assignments
Diffstat (limited to 'src')
-rw-r--r--src/c.bqn3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/c.bqn b/src/c.bqn
index 5a5a2152..f5ed619e 100644
--- a/src/c.bqn
+++ b/src/c.bqn
@@ -140,7 +140,8 @@ Parse ← {r‿nv←𝕨
oa←⌽/op←(er<2)∧r≥2⋄ro←op∨«op∧r=3
ma←tr<(𝕩=1+⊑bG)∧«ir≥1
os←↕∘≠⊸(⊣-T)⌾⌽¬ro∨ma⋄at←1+⊏⟜os⊸+/a
- "Role of the two sides in assignment must match" ! (⊏⟜er≡⊏⟜r)at
+ "Role of the two sides in assignment must match" ! (at⊏er)≡ar←at⊏r
+ "Function or modifier assignment to a non-name" ! ∧´(ar=0)∨(at⊏g)⊏idm
aa←g⊏asn←»+`gi⊏«⊸-(≠𝕩)↑/⁼at
ta←tr∧2(>∨|)ps(⊢-T)+`¬ro
fa←/(ta∨ro∨«⊸∨aa)<(r=1)∨»op