mirror of
https://github.com/urbit/shrub.git
synced 2024-12-14 11:08:45 +03:00
Tighten namespace in sail
This commit is contained in:
parent
6985398293
commit
86d9b022e3
@ -39,17 +39,17 @@
|
|||||||
|%
|
|%
|
||||||
++ mane $@(@tas {@tas @tas}) :: XML name+space
|
++ mane $@(@tas {@tas @tas}) :: XML name+space
|
||||||
++ manx {g/marx c/marl} :: XML node
|
++ manx {g/marx c/marl} :: XML node
|
||||||
++ marl (list $^(manx tuna)) :: XML node list
|
++ marl (list tuna) :: XML node list
|
||||||
++ mart (list {n/mane v/(list beer)}) :: XML attributes
|
++ mart (list {n/mane v/(list beer)}) :: XML attributes
|
||||||
++ marx {n/mane a/mart} :: XML tag
|
++ marx {n/mane a/mart} :: XML tag
|
||||||
++ tuna {?($tape $manx $marl $call) p/twig}
|
++ tuna $^(manx {?($tape $manx $marl $call) p/twig})
|
||||||
--
|
--
|
||||||
::
|
::
|
||||||
++ freeze
|
++ freeze
|
||||||
|= manx:dynamic ^- manx
|
|= manx:dynamic ^- manx
|
||||||
:- [n.g (turn a.g freeze-mart)]
|
:- [n.g (turn a.g freeze-mart)]
|
||||||
%+ turn c
|
%+ turn c
|
||||||
|=(a/=>(dynamic $^(manx tuna)) ?@(-.a !! (freeze a)))
|
|=(a/tuna:dynamic ?@(-.a !! (freeze a)))
|
||||||
::
|
::
|
||||||
++ freeze-mart
|
++ freeze-mart
|
||||||
|= {n/mane v/(list beer)} ^- {mane tape}
|
|= {n/mane v/(list beer)} ^- {mane tape}
|
||||||
@ -94,28 +94,19 @@
|
|||||||
[(steam-mane n) %knit v]
|
[(steam-mane n) %knit v]
|
||||||
::
|
::
|
||||||
::+|
|
::+|
|
||||||
::
|
++ tuna tuna:dynamic
|
||||||
++ tuna :: tagflow
|
|
||||||
$% {$tape p/twig} :: plain text
|
|
||||||
{$manx p/twig} :: single tag
|
|
||||||
{$marl p/twig} :: simple list
|
|
||||||
{$call p/twig} :: dynamic list
|
|
||||||
{$elem p/twig q/(list tuna)} :: element
|
|
||||||
{$many p/(list tuna)} :: subflow
|
|
||||||
== ::
|
|
||||||
::
|
::
|
||||||
++ sail :: xml template
|
++ sail :: xml template
|
||||||
=> dynamic
|
|
||||||
|= in-tall-form/? =| lin/?
|
|= in-tall-form/? =| lin/?
|
||||||
|%
|
|%
|
||||||
++ apex :: entry point
|
++ apex :: entry point
|
||||||
;~(pfix sem ?:(in-tall-form tall-top wide-top))
|
;~(pfix sem ?:(in-tall-form tall-top wide-top))
|
||||||
::
|
::
|
||||||
++ single :: elem as tuna
|
++ single :: elem as tuna
|
||||||
|*(a/rule (cook |=(b/$^(manx tuna) [b]~) a))
|
|*(a/rule (cook |=(b/tuna:dynamic [b]~) a))
|
||||||
::
|
::
|
||||||
++ tall-top :: tall top
|
++ tall-top :: tall top
|
||||||
%+ knee *marl |. ~+
|
%+ knee *marl:dynamic |. ~+
|
||||||
;~ pose
|
;~ pose
|
||||||
;~(pfix (plus ace) (cook collapse-chars quote-innards))
|
;~(pfix (plus ace) (cook collapse-chars quote-innards))
|
||||||
(single ;~(plug script-or-style script-style-tail))
|
(single ;~(plug script-or-style script-style-tail))
|
||||||
@ -134,7 +125,7 @@
|
|||||||
(cold %call cen)
|
(cold %call cen)
|
||||||
==
|
==
|
||||||
++ wide-top :: wide outer top
|
++ wide-top :: wide outer top
|
||||||
%+ knee *marl |. ~+
|
%+ knee *marl:dynamic |. ~+
|
||||||
;~ pose
|
;~ pose
|
||||||
wide-quote
|
wide-quote
|
||||||
wide-paren-elems
|
wide-paren-elems
|
||||||
@ -142,7 +133,7 @@
|
|||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ wide-inner-top :: wide inner top
|
++ wide-inner-top :: wide inner top
|
||||||
%+ knee *marl |. ~+
|
%+ knee *marl:dynamic |. ~+
|
||||||
;~ pose
|
;~ pose
|
||||||
wide-top
|
wide-top
|
||||||
(single ;~(plug tuna-mode wide:vast))
|
(single ;~(plug tuna-mode wide:vast))
|
||||||
@ -155,7 +146,7 @@
|
|||||||
;~(plug sym ;~(pose (stag ~ ;~(pfix cab sym)) (easy ~)))
|
;~(plug sym ;~(pose (stag ~ ;~(pfix cab sym)) (easy ~)))
|
||||||
::
|
::
|
||||||
++ script-or-style :: script or style
|
++ script-or-style :: script or style
|
||||||
%+ cook |=(a/marx a)
|
%+ cook |=(a/marx:dynamic a)
|
||||||
;~ plug
|
;~ plug
|
||||||
;~(pose (jest %script) (jest %style))
|
;~(pose (jest %script) (jest %style))
|
||||||
wide-attrs
|
wide-attrs
|
||||||
@ -173,6 +164,7 @@
|
|||||||
::
|
::
|
||||||
++ tag-head :: tag head
|
++ tag-head :: tag head
|
||||||
%+ cook
|
%+ cook
|
||||||
|
=> dynamic
|
||||||
|= {a/mane b/mart c/mart}
|
|= {a/mane b/mart c/mart}
|
||||||
^- marx
|
^- marx
|
||||||
[a (weld b c)]
|
[a (weld b c)]
|
||||||
@ -202,6 +194,7 @@
|
|||||||
::
|
::
|
||||||
++ tall-elem :: tall preface
|
++ tall-elem :: tall preface
|
||||||
%+ cook
|
%+ cook
|
||||||
|
=> dynamic
|
||||||
|= {a/{p/mane q/mart} b/mart c/marl}
|
|= {a/{p/mane q/mart} b/mart c/marl}
|
||||||
^- manx
|
^- manx
|
||||||
[[p.a (weld q.a b)] c]
|
[[p.a (weld q.a b)] c]
|
||||||
@ -214,23 +207,23 @@
|
|||||||
wide:vast
|
wide:vast
|
||||||
::
|
::
|
||||||
++ wide-attrs :: wide attributes
|
++ wide-attrs :: wide attributes
|
||||||
%+ cook |=(a/(unit mart) (fall a ~))
|
%+ cook |=(a/(unit mart:dynamic) (fall a ~))
|
||||||
%- punt
|
%- punt
|
||||||
%+ ifix [pel per]
|
%+ ifix [pel per]
|
||||||
%+ more (jest ', ')
|
%+ more (jest ', ')
|
||||||
;~((glue ace) a-mane hopefully-quote)
|
;~((glue ace) a-mane hopefully-quote)
|
||||||
::
|
::
|
||||||
++ wide-tail :: wide elements
|
++ wide-tail :: wide elements
|
||||||
%+ cook |=(a/marl a)
|
%+ cook |=(a/marl:dynamic a)
|
||||||
;~(pose ;~(pfix col wrapped-elems) (cold ~ sem) (easy ~))
|
;~(pose ;~(pfix col wrapped-elems) (cold ~ sem) (easy ~))
|
||||||
::
|
::
|
||||||
++ wide-elems :: wide elements
|
++ wide-elems :: wide elements
|
||||||
%+ cook |=(a/marl a)
|
%+ cook |=(a/marl:dynamic a)
|
||||||
%+ cook zing
|
%+ cook zing
|
||||||
(star ;~(pfix ace wide-inner-top))
|
(star ;~(pfix ace wide-inner-top))
|
||||||
::
|
::
|
||||||
++ script-style-tail :: unescaped tall tail
|
++ script-style-tail :: unescaped tall tail
|
||||||
%+ cook |=(a/marl a)
|
%+ cook |=(a/marl:dynamic a)
|
||||||
%+ ifix [gap ;~(plug gap duz)]
|
%+ ifix [gap ;~(plug gap duz)]
|
||||||
%+ most gap
|
%+ most gap
|
||||||
;~ pfix sem
|
;~ pfix sem
|
||||||
@ -243,7 +236,7 @@
|
|||||||
::
|
::
|
||||||
++ tall-tail :: tall tail
|
++ tall-tail :: tall tail
|
||||||
?> in-tall-form
|
?> in-tall-form
|
||||||
%+ cook |=(a/marl a)
|
%+ cook |=(a/marl:dynamic a)
|
||||||
;~ pose
|
;~ pose
|
||||||
(cold ~ sem)
|
(cold ~ sem)
|
||||||
;~(pfix col wrapped-elems(in-tall-form |))
|
;~(pfix col wrapped-elems(in-tall-form |))
|
||||||
@ -252,7 +245,7 @@
|
|||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ wide-quote :: wide quote
|
++ wide-quote :: wide quote
|
||||||
%+ cook |=(a/marl a)
|
%+ cook |=(a/marl:dynamic a)
|
||||||
;~ pose
|
;~ pose
|
||||||
;~(less (jest '"""') (ifix [doq doq] (cook collapse-chars quote-innards)))
|
;~(less (jest '"""') (ifix [doq doq] (cook collapse-chars quote-innards)))
|
||||||
(inde (ifix [(jest '"""\0a') (jest '\0a"""')] (cook collapse-chars quote-innards(lin |))))
|
(inde (ifix [(jest '"""\0a') (jest '\0a"""')] (cook collapse-chars quote-innards(lin |))))
|
||||||
@ -263,12 +256,12 @@
|
|||||||
;~(plug tag-head wide-elems)
|
;~(plug tag-head wide-elems)
|
||||||
::
|
::
|
||||||
++ wide-paren-elems :: wide flow
|
++ wide-paren-elems :: wide flow
|
||||||
%+ cook |=(a/marl a)
|
%+ cook |=(a/marl:dynamic a)
|
||||||
%+ cook zing
|
%+ cook zing
|
||||||
(ifix [pel per] (more ace wide-inner-top))
|
(ifix [pel per] (more ace wide-inner-top))
|
||||||
::
|
::
|
||||||
++ wrapped-elems :: wrapped tuna
|
++ wrapped-elems :: wrapped tuna
|
||||||
%+ cook |=(a/marl a)
|
%+ cook |=(a/marl:dynamic a)
|
||||||
;~ pose
|
;~ pose
|
||||||
wide-paren-elems
|
wide-paren-elems
|
||||||
(cook |=(@t `marl`[;/((trip +<))]~) qut)
|
(cook |=(@t `marl`[;/((trip +<))]~) qut)
|
||||||
@ -277,7 +270,7 @@
|
|||||||
::
|
::
|
||||||
::++ wide-quote-innards (cook collapse-chars(in-tall-form |) quote-innards)
|
::++ wide-quote-innards (cook collapse-chars(in-tall-form |) quote-innards)
|
||||||
++ quote-innards :: wide+tall flow
|
++ quote-innards :: wide+tall flow
|
||||||
%+ cook |=(a/(list $@(@ $^(manx tuna))) a)
|
%+ cook |=(a/(list $@(@ tuna:dynamic)) a)
|
||||||
%- star
|
%- star
|
||||||
;~ pose
|
;~ pose
|
||||||
;~(pfix bas ;~(pose (mask "-+*%;\{") bas doq bix:ab))
|
;~(pfix bas ;~(pose (mask "-+*%;\{") bas doq bix:ab))
|
||||||
@ -287,7 +280,7 @@
|
|||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ inline-embed ::
|
++ inline-embed ::
|
||||||
%+ cook |=(a/$^(manx tuna) a)
|
%+ cook |=(a/tuna:dynamic a)
|
||||||
;~ pose
|
;~ pose
|
||||||
;~(pfix sem bracketed-elem(in-tall-form |))
|
;~(pfix sem bracketed-elem(in-tall-form |))
|
||||||
;~(plug tuna-mode sump:vast)
|
;~(plug tuna-mode sump:vast)
|
||||||
@ -295,10 +288,10 @@
|
|||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ collapse-chars :: group consec chars
|
++ collapse-chars :: group consec chars
|
||||||
|= reb/(list $@(@ $^(manx tuna)))
|
|= reb/(list $@(@ tuna:dynamic))
|
||||||
^- marl
|
^- marl:dynamic
|
||||||
=| {sim/(list @) tuz/marl}
|
=| {sim/(list @) tuz/marl:dynamic}
|
||||||
|- ^- marl
|
|- ^- marl:dynamic
|
||||||
?~ reb
|
?~ reb
|
||||||
=. sim
|
=. sim
|
||||||
?. in-tall-form sim
|
?. in-tall-form sim
|
||||||
@ -350,7 +343,7 @@
|
|||||||
{$code p/tape} :: code literal
|
{$code p/tape} :: code literal
|
||||||
{$text p/tape} :: text symbol
|
{$text p/tape} :: text symbol
|
||||||
{$link p/(list graf) q/tape} :: URL
|
{$link p/(list graf) q/tape} :: URL
|
||||||
{$expr p/=<($^(tuna manx) dynamic)} :: interpolated hoon
|
{$expr p/tuna:dynamic} :: interpolated hoon
|
||||||
==
|
==
|
||||||
--
|
--
|
||||||
|% ::
|
|% ::
|
||||||
@ -946,7 +939,7 @@
|
|||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ sanitize-to-id :: # text into elem id
|
++ sanitize-to-id :: # text into elem id
|
||||||
|= a/(list $^(tuna manx)):dynamic ^- tape
|
|= a/(list tuna:dynamic) ^- tape
|
||||||
=; raw/tape
|
=; raw/tape
|
||||||
%+ turn raw
|
%+ turn raw
|
||||||
|= @tD
|
|= @tD
|
||||||
|
Loading…
Reference in New Issue
Block a user