mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-03 20:52:23 +03:00
twig -> hoon in lib/cram
(cherry picked from commit 663e0e8284c080e9d38821b53950bf9325a1e209)
This commit is contained in:
parent
47f2c2f54a
commit
b8a01b5a7e
@ -1,6 +1,6 @@
|
||||
|%
|
||||
++ static :: freeze .mdh hoon subset
|
||||
|= gen/twig ^- {inf/(map term dime) elm/manx}
|
||||
|= gen/hoon ^- {inf/(map term dime) elm/manx}
|
||||
?+ -.gen
|
||||
=/ gen ~(open ap gen)
|
||||
?: =(gen ^gen) ~|([%cram-dynamic -.gen] !!)
|
||||
@ -16,10 +16,10 @@
|
||||
~|(%many-elems !!)
|
||||
::
|
||||
++ shut-mart :: xml attrs
|
||||
|=({n/mane v/(list beer:twig)} [n (turn v |=(a/beer:twig ?^(a !! a)))])
|
||||
|=({n/mane v/(list beer:hoon)} [n (turn v |=(a/beer:hoon ?^(a !! a)))])
|
||||
::
|
||||
++ shut :: as xml constant
|
||||
|= gen/twig ^- marl
|
||||
|= gen/hoon ^- marl
|
||||
?+ -.gen ~|([%bad-xml -.gen] !!)
|
||||
$dbug $(gen q.gen)
|
||||
::
|
||||
@ -39,12 +39,12 @@
|
||||
::
|
||||
::
|
||||
++ frontmatter :: parse ~[[%foo 1] [%bar ~s2]]
|
||||
|= gen/twig ^- (list {term dime})
|
||||
|= gen/hoon ^- (list {term dime})
|
||||
?: ?=({$bust $null} gen) ~
|
||||
?: ?=($dbug -.gen) $(gen q.gen)
|
||||
?. ?=($clsg -.gen) ~|([%bad-frontmatter -.gen] !!)
|
||||
%+ turn p.gen
|
||||
|= gen/twig
|
||||
|= gen/hoon
|
||||
?. ?=(^ -.gen)
|
||||
=/ gen ~(open ap gen)
|
||||
?: =(gen ^gen) ~|([%bad-frontmatter-elem -.gen] !!)
|
||||
@ -54,7 +54,7 @@
|
||||
[q.hed (as-dime q.gen)]
|
||||
::
|
||||
++ as-dime :: %foo ~.foo 0vbar etc
|
||||
|= gen/twig ^- dime
|
||||
|= gen/hoon ^- dime
|
||||
?: ?=($dbug -.gen) $(gen q.gen)
|
||||
?. ?=({?($rock $sand) @ @} gen) ~|([%bad-literal gen] !!)
|
||||
+.gen
|
||||
|
Loading…
Reference in New Issue
Block a user