mirror of
https://github.com/urbit/shrub.git
synced 2024-12-01 06:35:32 +03:00
link: graph validator compiles and runs
This commit is contained in:
parent
7acb2da366
commit
96d2906edc
27
pkg/arvo/mar/graph/validator/link.hoon
Normal file
27
pkg/arvo/mar/graph/validator/link.hoon
Normal file
@ -0,0 +1,27 @@
|
||||
/- *post
|
||||
|_ i=indexed-post
|
||||
++ grow
|
||||
|%
|
||||
++ noun i
|
||||
--
|
||||
++ grab
|
||||
|%
|
||||
++ noun
|
||||
|= p=*
|
||||
=/ ip ;;(indexed-post p)
|
||||
?+ index.p.ip ~|(index+index.p.ip !!)
|
||||
:: top-level link post
|
||||
::
|
||||
[@ ~]
|
||||
?> ?=([[%text @] [%url @] [%text @] ~] contents.p.ip)
|
||||
ip
|
||||
::
|
||||
:: comment on link post
|
||||
::
|
||||
[@ @ ~]
|
||||
?> ?=([[%text @] ~] contents.p.ip)
|
||||
ip
|
||||
==
|
||||
--
|
||||
++ grad %noun
|
||||
--
|
Loading…
Reference in New Issue
Block a user