mirror of
https://github.com/urbit/shrub.git
synced 2024-12-13 16:03:36 +03:00
Merge branch 'test' of github.com:urbit/urbit into test
This commit is contained in:
commit
908d3b69c6
@ -1,20 +1,23 @@
|
|||||||
/- tree-include
|
/- tree-include
|
||||||
|
!:
|
||||||
|%
|
|%
|
||||||
++ baff |*([a=(unit) b=(trap)] ?^(a a *b))
|
++ baff |*([a=(unit) b=(trap)] ?^(a a *b))
|
||||||
++ find-in-tree
|
++ find-in-tree
|
||||||
|* [paz=fist:jo fun=$+(* (unit))]
|
|* [paz=fist:jo fun=$+(* (unit))]
|
||||||
|= a=json ^+ *fun
|
|= a=(list json)
|
||||||
%+ biff (paz a)
|
|^ (try)
|
||||||
|* [b=(list json) c=*] ^+ *fun
|
++ try
|
||||||
%+ baff (fun c)
|
|. ^+ *fun
|
||||||
|.
|
?~ a ~
|
||||||
?~ b ~
|
%+ biff (paz i.a)
|
||||||
(baff ^^$(a i.b) |.(^$(b t.b)))
|
|* [b=(list json) c=*] ^+ *fun
|
||||||
|
(baff (baff (fun c) try(a b)) try(a t.a))
|
||||||
|
--
|
||||||
::
|
::
|
||||||
++ json-front
|
++ json-front
|
||||||
|= a=json ^- json
|
|= a=json ^- json
|
||||||
=- (fall `(unit json)`- ~)
|
=- (fall `(unit json)`- ~)
|
||||||
%+ biff ((ot body/some ~):jo a)
|
%+ biff ((ar some):jo a)
|
||||||
%+ find-in-tree (ot c/(ar some) gn/so ga/(om so) ~):jo
|
%+ find-in-tree (ot c/(ar some) gn/so ga/(om so) ~):jo
|
||||||
|= [nom=span atr=(map span cord)] ^- (unit json)
|
|= [nom=span atr=(map span cord)] ^- (unit json)
|
||||||
?. (~(has by atr) 'urb:front') ~
|
?. (~(has by atr) 'urb:front') ~
|
||||||
@ -24,16 +27,17 @@
|
|||||||
++ read-schem
|
++ read-schem
|
||||||
=< (cook to-noun (cook to-tree apex))
|
=< (cook to-noun (cook to-tree apex))
|
||||||
|%
|
|%
|
||||||
++ data $|(term [n=@ l=data r=data])
|
++ noun $|(term [noun noun]) :: shadow
|
||||||
|
++ data $|(term [n=@ l=noun r=data])
|
||||||
++ apex ;~(plug sym (star ;~(plug delim sym)))
|
++ apex ;~(plug sym (star ;~(plug delim sym)))
|
||||||
++ delim ;~(pose (cold 0 dot) (cook lent (plus cab)))
|
++ delim ;~(pose (cold 0 dot) (cook lent (plus cab)))
|
||||||
++ to-noun |=(a=data ?@(a a [$(a l.a) $(a r.a)]))
|
++ to-noun |=(a=data ?@(a a [l.a $(a r.a)]))
|
||||||
++ to-tree
|
++ to-tree
|
||||||
|= [acc=data a=(list ,[p=@u q=term])]
|
|= [acc=data a=(list ,[p=@u q=term])]
|
||||||
%+ roll a =< .(acc ^acc)
|
%+ roll a =< .(acc ^acc)
|
||||||
|= [[n=@u v=term] acc=data]
|
|= [[n=@u v=term] acc=data]
|
||||||
?@ acc [n acc v]
|
?@ acc [n acc v]
|
||||||
?: (gth n n.acc) [n acc v]
|
?: (gth n n.acc) [n (to-noun acc) v]
|
||||||
acc(r $(acc r.acc))
|
acc(r $(acc r.acc))
|
||||||
--
|
--
|
||||||
--
|
--
|
||||||
|
Loading…
Reference in New Issue
Block a user