Implement new algorithm for local label processing

This change allows qualified references to local labels from other
sections: you can do `#send section.local` and it will take you to the
appropriate `:.local` label. When `section.local` is ambiguous due to
sections/locals sharing the same names, the reference resolves to the
local in the first such section.
This commit is contained in:
2025-07-10 22:36:31 -07:00
parent d751aade99
commit 3bddc3c85e
7 changed files with 165 additions and 58 deletions
+27 -1
View File
@@ -49,4 +49,30 @@ Trying to sell you some torches...
#zap .z
#.z
:.z
---
'Addressing labels with section.local
:touch
:.foo
#end
:touch
:.foo
#end
:shot
'sends to the first one:
#touch.foo
---
@alice
:shared
'this is the 1st section named "shared"
'but its local should correspond with @bob's 2nd "shared"
:.local
#end
:shared
---
@bob
:shared
#end
:shared
'this is the 2nd section named "shared"
'but its local should correspond with @alice's 1st "shared"
:.local