summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2022-05-17 17:08:11 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2022-05-17 17:11:59 -0400
commit494e7a15e37e0dc4e0a17332488742b1258edcfd (patch)
treef8773ece3826d1f2e75c511dc16089ab78e6163f
parentd9d560a603f25d3721b877ecfe74b0cb7233ce27 (diff)
Retain position information in literal and phrase nodes
-rw-r--r--singeli.bqn4
1 files changed, 2 insertions, 2 deletions
diff --git a/singeli.bqn b/singeli.bqn
index 7a961c1..b11b5dc 100644
--- a/singeli.bqn
+++ b/singeli.bqn
@@ -837,7 +837,7 @@ nodes ← {
Eval⇐!∘0 ⋄ Scope⇐{Eval↩var.Get∘(pos 𝕩.Get name)}
}
_value ← {
- name←𝕩
+ name←𝕩 ⋄ pos⇐𝕨⊣@
Eval⇐(𝕨𝔽𝕩)˙
⟨node,Dump,Oper,Scope⟩⇐Defaults "value"‿⟨⟩
Disp⇐{𝕤⋄⟨name⟩}
@@ -855,7 +855,7 @@ nodes ← {
}
Call ⇐ { 𝕨 Run ⟨Ident"call" , <⊸∾´𝕩⟩ }
Phrase ⇐ {
- things←𝕩
+ things←𝕩 ⋄ pos⇐𝕨
ToName⇐{𝕤⋄ (1=≠)◶@‿(("ident"≡{𝕩.node})◶@‿{𝕩.name}⊑) things }
Visit←{⟨𝕏¨things⟩}
⟨node,Dump,Disp,Scope,Eval⟩⇐Defaults "phrase"‿visit