hoon: refactor %brcn %brpt optional arg parsing
this refactors the parser for %brcn and %brpt to separate the optional
argument(s) from the required argument(s).
also adds +blab, which allows for a minor refactor of a couple other
arms as well as being used for %brcn and %brpt
%- stew
^. stet ^. limo
:~ ['_' (rune cab %brcb exqr)]
- ['%' (runn cen %brcn expe)]
- ['@' (runn pat %brpt expe)]
+ ['%' (runo cen %brcn blab expe)]
+ ['@' (runo pat %brpt blab expe)]
[':' (rune col %brcl expb)]
['.' (rune dot %brdt expa)]
['-' (rune hep %brhp expa)]
;~(pfix dif (stag tuq (toad har)))
--
::
- ++ runn :: build named rune
- =+ [dif=*rule tuq=** har=expa]
+ ++ runo :: build rune w option
+ =+ [dif=*rule tuq=** hil=*rule har=expa]
|@ ++ $
- ;~ pfix
- dif
- (stag tuq ;~(plug (punt ;~(pfix gap cen sym)) (toad har)))
- ==
+ ;~(pfix dif (stag tuq ;~(plug (punt ;~(pfix gap hil)) (toad har))))
--
::
++ runq :: wide or tall if tol
==
loaf
==
+ ++ blab ;~(pfix cen sym) :: term
++ bont ;~ (bend) :: term, optional hoon
- ;~(pfix cen sym)
+ blab
;~(pfix dot ;~(pose wide ;~(pfix muck loaf)))
==
++ bony (cook |=(a=(list) (lent a)) (plus tis)) :: base 1 =en count
(cold ~ sig)
%+ ifix
?:(tol [;~(plug duz gap) ;~(plug gap duz)] [pal par])
- (more mash ;~(gunk ;~(pfix cen sym) loaf))
+ (more mash ;~(gunk blab loaf))
==
--
::
