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:
+27
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user