twig -> hoon in lib/cram
|%
++ 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] !!)
~|(%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)
::
::
::
++ 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] !!)
[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
