mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-16 10:49:26 +03:00
hoon: add +stap, path parser
And cleans up a bunch of locally hand-written implementations of it.
This commit is contained in:
parent
4a92313549
commit
1ec5e5acfb
@ -21,7 +21,7 @@
|
|||||||
(most ;~(plug com gaw) taut-rule)
|
(most ;~(plug com gaw) taut-rule)
|
||||||
::
|
::
|
||||||
%+ rune tis
|
%+ rune tis
|
||||||
;~(plug sym ;~(pfix gap fas (more fas urs:ab)))
|
;~(plug sym ;~(pfix gap stap))
|
||||||
::
|
::
|
||||||
%+ rune cen
|
%+ rune cen
|
||||||
;~(plug sym ;~(pfix gap ;~(pfix cen sym)))
|
;~(plug sym ;~(pfix gap ;~(pfix cen sym)))
|
||||||
@ -37,7 +37,7 @@
|
|||||||
;~ (glue gap)
|
;~ (glue gap)
|
||||||
sym
|
sym
|
||||||
;~(pfix cen sym)
|
;~(pfix cen sym)
|
||||||
;~(pfix fas (more fas urs:ab))
|
stap
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
%+ stag %tssg
|
%+ stag %tssg
|
||||||
|
@ -5965,9 +5965,8 @@
|
|||||||
::
|
::
|
||||||
++ spat |=(pax=path (crip (spud pax))) :: render path to cord
|
++ spat |=(pax=path (crip (spud pax))) :: render path to cord
|
||||||
++ spud |=(pax=path ~(ram re (smyt pax))) :: render path to tape
|
++ spud |=(pax=path ~(ram re (smyt pax))) :: render path to tape
|
||||||
++ stab :: parse cord to path
|
++ stab |=(zep=@t `path`(rash zep stap)) :: parse cord to path
|
||||||
=+ fel=;~(pfix fas (more fas urs:ab))
|
++ stap ;~(pfix fas (more fas urs:ab)) :: path parser
|
||||||
|=(zep=@t `path`(rash zep fel))
|
|
||||||
::
|
::
|
||||||
:::: 4n: virtualization
|
:::: 4n: virtualization
|
||||||
::
|
::
|
||||||
|
@ -869,7 +869,7 @@
|
|||||||
(most ;~(plug com gaw) taut-rule)
|
(most ;~(plug com gaw) taut-rule)
|
||||||
::
|
::
|
||||||
%+ rune tis
|
%+ rune tis
|
||||||
;~(plug sym ;~(pfix gap fas (more fas urs:ab)))
|
;~(plug sym ;~(pfix gap stap))
|
||||||
::
|
::
|
||||||
%+ rune cen
|
%+ rune cen
|
||||||
;~(plug sym ;~(pfix gap ;~(pfix cen sym)))
|
;~(plug sym ;~(pfix gap ;~(pfix cen sym)))
|
||||||
@ -885,7 +885,7 @@
|
|||||||
;~ (glue gap)
|
;~ (glue gap)
|
||||||
sym
|
sym
|
||||||
;~(pfix cen sym)
|
;~(pfix cen sym)
|
||||||
;~(pfix fas (more fas urs:ab))
|
;~(pfix stap)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
%+ stag %tssg
|
%+ stag %tssg
|
||||||
|
@ -215,7 +215,7 @@
|
|||||||
?: =('subscribe' u.maybe-key)
|
?: =('subscribe' u.maybe-key)
|
||||||
%. item
|
%. item
|
||||||
%+ pe %subscribe
|
%+ pe %subscribe
|
||||||
(ot id+ni ship+(su fed:ag) app+so path+(su ;~(pfix fas (more fas urs:ab))) ~)
|
(ot id+ni ship+(su fed:ag) app+so path+(su stap) ~)
|
||||||
?: =('unsubscribe' u.maybe-key)
|
?: =('unsubscribe' u.maybe-key)
|
||||||
%. item
|
%. item
|
||||||
%+ pe %unsubscribe
|
%+ pe %unsubscribe
|
||||||
|
@ -3458,7 +3458,7 @@
|
|||||||
[(rash a fel) b]
|
[(rash a fel) b]
|
||||||
:: :: ++pa:dejs:format
|
:: :: ++pa:dejs:format
|
||||||
++ pa :: string as path
|
++ pa :: string as path
|
||||||
(su ;~(pfix fas (more fas urs:ab)))
|
(su stap)
|
||||||
:: :: ++pe:dejs:format
|
:: :: ++pe:dejs:format
|
||||||
++ pe :: prefix
|
++ pe :: prefix
|
||||||
|* [pre=* wit=fist]
|
|* [pre=* wit=fist]
|
||||||
|
Loading…
Reference in New Issue
Block a user