hoon: populate label for %brcn doccords

This changes the parser for +tall so that it looks before and after a
hoon for doccords, and then extracts a label for %brcn if it exists.
+wrap will be used to annotating most hoons, but this commit only covers
%brcn
This commit is contained in:
drbeefsupreme 2022-03-14 17:00:04 -04:00
parent 41a796d2d1
commit f08b613416
No known key found for this signature in database
GPG Key ID: B70D5683DE7F9EFC

View File

@ -8207,6 +8207,21 @@
==
|_ gen=hoon
::
:: This door takes in a whit and annotates gen as appropriate
++ docs-engine
|_ wit=whit
::
++ apply-whit
^- hoon
?: =([~ ~ ~ ~] wit)
gen
?+ gen gen
::
[%brcn *]
[%brcn lab.wit q.gen]
==
--
::
++ grip
|= =skin
=| rel=wing
@ -13673,9 +13688,26 @@
[%spec spec %base %noun]
wyde
==
::
:: +wrap is for tagging arbitrary hoons. This is where most of the doccords
:: logic lives - the modifications to +boog and +wisp are for tagging arms
:: and chapter labels, while +wrap handles hoons inside of arms and cores.
++ wrap
|* fel=rule
%+ cook
|= [a=whit b=hoon c=whit]
^- hoon
~(apply-whit ~(docs-engine ap b) (glom a c))
::
;~ plug
apex:docs
fel
apse:docs
==
::
++ tall :: full tall form
%+ knee *hoon
|.(~+((wart ;~(pose expression:(norm &) long lute apex:(sail &)))))
|.(~+((wart (wrap ;~(pose expression:(norm &) long lute apex:(sail &))))))
++ till :: mold tall form
%+ knee *spec
|.(~+((wert ;~(pose structure:(norm &) scad))))