modern.out: name some conditionals.
parent
8d14e79f8b
commit
1e8d41ae65
|
@ -101,16 +101,21 @@ M: line-comment-literal write-literal
|
||||||
} cleave ;
|
} cleave ;
|
||||||
|
|
||||||
|
|
||||||
|
: adding-semi? ( obj -- ? )
|
||||||
|
{ [ seq>> 3 swap ?nth not ] [ closing-tag>> ] } 1&& ;
|
||||||
|
|
||||||
|
: removing-semi? ( obj -- ? )
|
||||||
|
{ [ seq>> 3 swap ?nth ] [ closing-tag>> not ] } 1&& ;
|
||||||
|
|
||||||
|
|
||||||
: nice-semi-needed? ( obj -- ? )
|
: nice-semi-needed? ( obj -- ? )
|
||||||
{
|
{
|
||||||
[ seq>> 3 swap ?nth not ]
|
[ { [ adding-semi? ] [ removing-semi? ] } 1|| ]
|
||||||
[ closing-tag>> ]
|
|
||||||
[ payload>> [ line-comment-literal? ] last? ]
|
[ payload>> [ line-comment-literal? ] last? ]
|
||||||
} 1&& ;
|
} 1&& ;
|
||||||
|
|
||||||
: write-uppercase-colon-literal-nice ( obj -- )
|
: write-uppercase-colon-literal-nice ( obj -- )
|
||||||
|
B
|
||||||
{
|
{
|
||||||
[ seq>> 0 swap nth write-whitespace ]
|
[ seq>> 0 swap nth write-whitespace ]
|
||||||
[ tag>> write ]
|
[ tag>> write ]
|
||||||
|
|
Loading…
Reference in New Issue