mirror of
https://github.com/urbit/shrub.git
synced 2024-12-11 23:48:22 +03:00
formalize %poem as an indent-based style
This commit is contained in:
parent
0fcf16898e
commit
54105e7fd0
@ -175,6 +175,7 @@
|
|||||||
$lite :: - line item
|
$lite :: - line item
|
||||||
$head :: # heading
|
$head :: # heading
|
||||||
$bloc :: > block-quote
|
$bloc :: > block-quote
|
||||||
|
$poem :: [ ]{8} poem
|
||||||
== == ::
|
== == ::
|
||||||
{$old $text} :: anything else
|
{$old $text} :: anything else
|
||||||
== ::
|
== ::
|
||||||
@ -456,11 +457,13 @@
|
|||||||
:: if column has retreated, adjust stack
|
:: if column has retreated, adjust stack
|
||||||
=. +>.$ ?. (lth col.saw inr.ind) +>.$ (back col.saw)
|
=. +>.$ ?. (lth col.saw inr.ind) +>.$ (back col.saw)
|
||||||
::
|
::
|
||||||
:: dif: columns advanced
|
=^ val sty.saw
|
||||||
:: erp: error position
|
?+ (sub col.saw inr.ind) [| sty.saw] :: columns advanced
|
||||||
|
$0 [& sty.saw]
|
||||||
|
$8 [& %new %poem]
|
||||||
|
==
|
||||||
|
?. val +>.$(err `[p.loc col.saw])
|
||||||
::
|
::
|
||||||
=/ dif (sub col.saw inr.ind)
|
|
||||||
=/ erp [p.loc col.saw]
|
|
||||||
=. inr.ind col.saw
|
=. inr.ind col.saw
|
||||||
::
|
::
|
||||||
:: execute appropriate paragraph form
|
:: execute appropriate paragraph form
|
||||||
@ -477,12 +480,11 @@
|
|||||||
..$(par `[loc ~])
|
..$(par `[loc ~])
|
||||||
::
|
::
|
||||||
++ apex ^+ . :: open container
|
++ apex ^+ . :: open container
|
||||||
?: =(8 dif) (push %poem) :: verse literal
|
|
||||||
?. =(0 dif) fail :: bad indentation
|
|
||||||
?- +.sty.saw
|
?- +.sty.saw
|
||||||
$done !! :: blank
|
$done !! :: blank
|
||||||
$dent !! :: outdent
|
$dent !! :: outdent
|
||||||
$stet !! :: ==
|
$stet !! :: ==
|
||||||
|
$poem (push %poem) :: verse literal
|
||||||
$head (push %head) :: heading
|
$head (push %head) :: heading
|
||||||
$bloc (entr %bloc) :: blockquote line
|
$bloc (entr %bloc) :: blockquote line
|
||||||
$lite (lent %list) :: unnumbered list
|
$lite (lent %list) :: unnumbered list
|
||||||
@ -490,7 +492,6 @@
|
|||||||
$text text :: anything else
|
$text text :: anything else
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ fail .(err `erp) :: set error position
|
|
||||||
++ push :: push context
|
++ push :: push context
|
||||||
|=(mite +>(hac [cur hac], cur [+< ~]))
|
|=(mite +>(hac [cur hac], cur [+< ~]))
|
||||||
++ entr :: enter container
|
++ entr :: enter container
|
||||||
@ -511,7 +512,7 @@
|
|||||||
^+ +>
|
^+ +>
|
||||||
:: can't switch list types
|
:: can't switch list types
|
||||||
?: =(?-(ord $list %lord, $lord %list) p.cur)
|
?: =(?-(ord $list %lord, $lord %list) p.cur)
|
||||||
fail
|
+>(err `[p.loc inr.ind]) :: set error position
|
||||||
::
|
::
|
||||||
:: push list item
|
:: push list item
|
||||||
=< (entr %lime)
|
=< (entr %lime)
|
||||||
|
Loading…
Reference in New Issue
Block a user