html.templates.fhtml: code cleanup
parent
875e7c17ec
commit
3e43dafb76
|
@ -1,5 +1,5 @@
|
||||||
! Copyright (C) 2005 Alex Chapman
|
! Copyright (C) 2005 Alex Chapman
|
||||||
! Copyright (C) 2006, 2009 Slava Pestov
|
! Copyright (C) 2006, 2010 Slava Pestov
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: continuations sequences kernel namespaces debugger
|
USING: continuations sequences kernel namespaces debugger
|
||||||
combinators math quotations generic strings splitting accessors
|
combinators math quotations generic strings splitting accessors
|
||||||
|
@ -26,7 +26,7 @@ M: template-lexer skip-word
|
||||||
DEFER: <% delimiter
|
DEFER: <% delimiter
|
||||||
|
|
||||||
: check-<% ( lexer -- col )
|
: check-<% ( lexer -- col )
|
||||||
"<%" over line-text>> rot column>> start* ;
|
"<%" swap [ line-text>> ] [ column>> ] bi start* ;
|
||||||
|
|
||||||
: found-<% ( accum lexer col -- accum )
|
: found-<% ( accum lexer col -- accum )
|
||||||
[
|
[
|
||||||
|
@ -74,6 +74,6 @@ TUPLE: fhtml path ;
|
||||||
C: <fhtml> fhtml
|
C: <fhtml> fhtml
|
||||||
|
|
||||||
M: fhtml call-template* ( filename -- )
|
M: fhtml call-template* ( filename -- )
|
||||||
[ path>> utf8 file-contents eval-template ] call( filename -- ) ;
|
path>> utf8 file-contents eval-template ;
|
||||||
|
|
||||||
INSTANCE: fhtml template
|
INSTANCE: fhtml template
|
||||||
|
|
Loading…
Reference in New Issue