summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2022-06-27 17:31:21 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2022-06-27 17:31:21 -0400
commite4471d7504c6d057ee0ba646c70732c239511687 (patch)
tree872e0c7c9c3868e65dfca585762643db13f7a08f
parentc9fe6c10030945a1425c687781363ba3e5b83210 (diff)
Fix error message for ambiguous operator associativity
-rw-r--r--singeli.bqn10
1 files changed, 5 insertions, 5 deletions
diff --git a/singeli.bqn b/singeli.bqn
index bf50b57..9ff3dff 100644
--- a/singeli.bqn
+++ b/singeli.bqn
@@ -364,22 +364,22 @@ operator ← {
Add ⇐ {
i ← Ind 1⊑𝕩
i<≠n ? Err⟨"Duplicate operator definition:",⊑𝕩,"Previously defined here:",i⊑p⟩ ;
- p‿n‿o ∾⟜<¨↩ r←New⌾(2⊸⊑)𝕩 ⋄ 2⊑r
+ p‿n‿o ∾⟜<¨↩ r←(1⊑𝕩)⊸New⌾(2⊸⊑)𝕩 ⋄ 2⊑r
}
Get ⇐ { i←Ind𝕩 ⋄ (i=≠n)◶⟨i⊑o˙,par.Get⟩ 𝕩 }
}
NewScope ⇐ {
parent ⇐ 𝕩
- Op ← {𝕊val‿p‿c‿a:
+ Op ← {name𝕊val‿p‿c‿a:
V ⇐ nodes.Word∘val
+ AC ← { Err ("Associativity for operator "∾name∾" must be disambiguated")‿𝕨.value.pos }⍟(0⊸>)
T ⇐ (p C {𝕩.bind}){{⊣AC𝕏}⍟a𝕗}
}
- AC ← 𝕩{ Err ("Associativity for operator "∾𝕗∾" must be disambiguated")‿𝕨.value.pos }⍟(0⊸>)
tabs ⇐ nul‿lef ← parent.tabs Tab¨ ⟨
- {𝕨𝕊⟨value, prec⟩: null ⇐ Op ⟨value, prec, <, 0⟩ }
+ {𝕨𝕊⟨value, prec⟩: null ⇐ 𝕨 Op ⟨value, prec, <, 0⟩ }
{𝕨𝕊⟨value, prec, assoc⟩:
bind ⇐ prec
- left ⇐ Op ⟨value, prec, ("lrn"⊸⊐⌾<assoc)⊑⟨<,≤,<-=⟩, 'n'=assoc⟩
+ left ⇐ 𝕨 Op ⟨value, prec, ("lrn"⊸⊐⌾<assoc)⊑⟨<,≤,<-=⟩, 'n'=assoc⟩
}
Add ⇐ {𝕨𝕊type‿name‿value‿prec: