mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-16 02:22:12 +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)
|
||||
::
|
||||
%+ rune tis
|
||||
;~(plug sym ;~(pfix gap fas (more fas urs:ab)))
|
||||
;~(plug sym ;~(pfix gap stap))
|
||||
::
|
||||
%+ rune cen
|
||||
;~(plug sym ;~(pfix gap ;~(pfix cen sym)))
|
||||
@ -37,7 +37,7 @@
|
||||
;~ (glue gap)
|
||||
sym
|
||||
;~(pfix cen sym)
|
||||
;~(pfix fas (more fas urs:ab))
|
||||
stap
|
||||
==
|
||||
::
|
||||
%+ stag %tssg
|
||||
|
@ -5965,9 +5965,8 @@
|
||||
::
|
||||
++ spat |=(pax=path (crip (spud pax))) :: render path to cord
|
||||
++ spud |=(pax=path ~(ram re (smyt pax))) :: render path to tape
|
||||
++ stab :: parse cord to path
|
||||
=+ fel=;~(pfix fas (more fas urs:ab))
|
||||
|=(zep=@t `path`(rash zep fel))
|
||||
++ stab |=(zep=@t `path`(rash zep stap)) :: parse cord to path
|
||||
++ stap ;~(pfix fas (more fas urs:ab)) :: path parser
|
||||
::
|
||||
:::: 4n: virtualization
|
||||
::
|
||||
|
@ -869,7 +869,7 @@
|
||||
(most ;~(plug com gaw) taut-rule)
|
||||
::
|
||||
%+ rune tis
|
||||
;~(plug sym ;~(pfix gap fas (more fas urs:ab)))
|
||||
;~(plug sym ;~(pfix gap stap))
|
||||
::
|
||||
%+ rune cen
|
||||
;~(plug sym ;~(pfix gap ;~(pfix cen sym)))
|
||||
@ -885,7 +885,7 @@
|
||||
;~ (glue gap)
|
||||
sym
|
||||
;~(pfix cen sym)
|
||||
;~(pfix fas (more fas urs:ab))
|
||||
;~(pfix stap)
|
||||
==
|
||||
::
|
||||
%+ stag %tssg
|
||||
|
@ -215,7 +215,7 @@
|
||||
?: =('subscribe' u.maybe-key)
|
||||
%. item
|
||||
%+ 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)
|
||||
%. item
|
||||
%+ pe %unsubscribe
|
||||
|
@ -3458,7 +3458,7 @@
|
||||
[(rash a fel) b]
|
||||
:: :: ++pa:dejs:format
|
||||
++ pa :: string as path
|
||||
(su ;~(pfix fas (more fas urs:ab)))
|
||||
(su stap)
|
||||
:: :: ++pe:dejs:format
|
||||
++ pe :: prefix
|
||||
|* [pre=* wit=fist]
|
||||
|
Loading…
Reference in New Issue
Block a user