mirror of
https://github.com/urbit/shrub.git
synced 2024-12-24 11:24:21 +03:00
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
This commit is contained in:
parent
c29512308f
commit
49420e2fe2
@ -13085,8 +13085,8 @@
|
|||||||
%- stew
|
%- stew
|
||||||
^. stet ^. limo
|
^. stet ^. limo
|
||||||
:~ ['_' (rune cab %brcb exqr)]
|
:~ ['_' (rune cab %brcb exqr)]
|
||||||
['%' (runn cen %brcn expe)]
|
['%' (runo cen %brcn blab expe)]
|
||||||
['@' (runn pat %brpt expe)]
|
['@' (runo pat %brpt blab expe)]
|
||||||
[':' (rune col %brcl expb)]
|
[':' (rune col %brcl expb)]
|
||||||
['.' (rune dot %brdt expa)]
|
['.' (rune dot %brdt expa)]
|
||||||
['-' (rune hep %brhp expa)]
|
['-' (rune hep %brhp expa)]
|
||||||
@ -13482,13 +13482,10 @@
|
|||||||
;~(pfix dif (stag tuq (toad har)))
|
;~(pfix dif (stag tuq (toad har)))
|
||||||
--
|
--
|
||||||
::
|
::
|
||||||
++ runn :: build named rune
|
++ runo :: build rune w option
|
||||||
=+ [dif=*rule tuq=** har=expa]
|
=+ [dif=*rule tuq=** hil=*rule har=expa]
|
||||||
|@ ++ $
|
|@ ++ $
|
||||||
;~ pfix
|
;~(pfix dif (stag tuq ;~(plug (punt ;~(pfix gap hil)) (toad har))))
|
||||||
dif
|
|
||||||
(stag tuq ;~(plug (punt ;~(pfix gap cen sym)) (toad har)))
|
|
||||||
==
|
|
||||||
--
|
--
|
||||||
::
|
::
|
||||||
++ runq :: wide or tall if tol
|
++ runq :: wide or tall if tol
|
||||||
@ -13652,8 +13649,9 @@
|
|||||||
==
|
==
|
||||||
loaf
|
loaf
|
||||||
==
|
==
|
||||||
|
++ blab ;~(pfix cen sym) :: term
|
||||||
++ bont ;~ (bend) :: term, optional hoon
|
++ bont ;~ (bend) :: term, optional hoon
|
||||||
;~(pfix cen sym)
|
blab
|
||||||
;~(pfix dot ;~(pose wide ;~(pfix muck loaf)))
|
;~(pfix dot ;~(pose wide ;~(pfix muck loaf)))
|
||||||
==
|
==
|
||||||
++ bony (cook |=(a=(list) (lent a)) (plus tis)) :: base 1 =en count
|
++ bony (cook |=(a=(list) (lent a)) (plus tis)) :: base 1 =en count
|
||||||
@ -13662,7 +13660,7 @@
|
|||||||
(cold ~ sig)
|
(cold ~ sig)
|
||||||
%+ ifix
|
%+ ifix
|
||||||
?:(tol [;~(plug duz gap) ;~(plug gap duz)] [pal par])
|
?:(tol [;~(plug duz gap) ;~(plug gap duz)] [pal par])
|
||||||
(more mash ;~(gunk ;~(pfix cen sym) loaf))
|
(more mash ;~(gunk blab loaf))
|
||||||
==
|
==
|
||||||
--
|
--
|
||||||
::
|
::
|
||||||
|
Loading…
Reference in New Issue
Block a user