mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 16:51:42 +03:00
hoon: add converters between un/typed paths
This commit is contained in:
parent
c977486f71
commit
83d7b53b58
@ -5987,21 +5987,38 @@
|
|||||||
;~(pfix fas (most fas urs:ab))
|
;~(pfix fas (most fas urs:ab))
|
||||||
::
|
::
|
||||||
++ stip :: typed path parser
|
++ stip :: typed path parser
|
||||||
=- ;~(pfix fas (more fas -))
|
=< swot
|
||||||
|^ %- stew
|
|%
|
||||||
|
++ swot |=(n=nail (;~(pfix fas (more fas spot)) n))
|
||||||
|
::
|
||||||
|
++ spot
|
||||||
|
%+ sear (soft iota)
|
||||||
|
%- stew
|
||||||
^. stet ^. limo
|
^. stet ^. limo
|
||||||
:~ :- 'a'^'z' (slot (stag %tas sym))
|
:~ :- 'a'^'z' (stag %tas sym)
|
||||||
:- '$' (cold [%tas %$] buc)
|
:- '$' (cold [%tas %$] buc)
|
||||||
:- '0'^'9' (slot bisk:so)
|
:- '0'^'9' bisk:so
|
||||||
:- '-' (slot tash:so)
|
:- '-' tash:so
|
||||||
:- '.' zust:so
|
:- '.' zust:so
|
||||||
:- '~' (slot ;~(pfix sig ;~(pose crub:so (easy [%n ~]))))
|
:- '~' ;~(pfix sig ;~(pose crub:so (easy [%n ~])))
|
||||||
:- '\'' (stag %t qut)
|
:- '\'' (stag %t qut)
|
||||||
==
|
==
|
||||||
::
|
|
||||||
++ slot |*(r=rule (sear (soft iota) r))
|
|
||||||
--
|
--
|
||||||
::
|
::
|
||||||
|
++ pout
|
||||||
|
|= =pith
|
||||||
|
^- path
|
||||||
|
%+ turn pith
|
||||||
|
|= i=iota
|
||||||
|
?@(i i (scot i))
|
||||||
|
::
|
||||||
|
++ pave
|
||||||
|
|= =path
|
||||||
|
^- pith
|
||||||
|
%+ turn path
|
||||||
|
|= i=@ta
|
||||||
|
(fall (rush i spot:stip) [%ta i])
|
||||||
|
::
|
||||||
:::: 4n: virtualization
|
:::: 4n: virtualization
|
||||||
::
|
::
|
||||||
:: +mack: untyped, scry-less, unitary virtualization
|
:: +mack: untyped, scry-less, unitary virtualization
|
||||||
|
Loading…
Reference in New Issue
Block a user