The template file:
{namespace ns}
{template callee}
{/template}
{template caller}
{call callee} {/call}
{/template}
Being runned with the following code:
(require 'asdf)
(asdf:operate 'asdf:load-op '#:closure-template)
(print (closure-template:compile-template :javascript-backend (make-pathname :name "./test.tmpl")))
Produces:
$ sbcl --load test.lisp
This is SBCL 1.0.54, an implementation of ANSI Common Lisp.
More information about SBCL is available at http://www.sbcl.org/.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
style-warning: Implicitly creating new generic function ps-print.
debugger invoked on a SIMPLE-ERROR in thread
<THREAD "initial thread" RUNNING {AB00921}>:
Incomplete parse, stopped at 50.
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [RETRY ] Retry EVAL of current toplevel form.
1: [CONTINUE] Ignore error and continue loading file "/home/necto/proj/genealogy/test.lisp".
2: [ABORT ] Abort loading file "/home/necto/proj/genealogy/test.lisp".
3: Ignore runtime option --load "test.lisp".
4: Skip rest of --eval and --load options.
5: Skip to toplevel READ/EVAL/PRINT loop.
6: [QUIT ] Quit SBCL (calling #'QUIT, killing the process).
(ESRAP::PROCESS-PARSE-RESULT
#S(ESRAP::RESULT
:%PRODUCTION ((CLOSURE-TEMPLATE.PARSER:NAMESPACE "gaga"
(CLOSURE-TEMPLATE.PARSER:TEMPLATE ("callee"))))
:POSITION 50)
"{namespace gaga}
{template callee}
{/template}
{template caller}
{call callee} {/call}
{/template}
"
102
NIL)
0]
But I've expected a call. If I've misunderstood a syntax in documentation, how should I call a subtemplate with custom parameters?
The template file:
Being runned with the following code:
Produces:
$ sbcl --load test.lisp
This is SBCL 1.0.54, an implementation of ANSI Common Lisp.
More information about SBCL is available at http://www.sbcl.org/.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
style-warning: Implicitly creating new generic function ps-print.
debugger invoked on a SIMPLE-ERROR in thread
<THREAD "initial thread" RUNNING {AB00921}>:
Incomplete parse, stopped at 50.
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [RETRY ] Retry EVAL of current toplevel form.
1: [CONTINUE] Ignore error and continue loading file "/home/necto/proj/genealogy/test.lisp".
2: [ABORT ] Abort loading file "/home/necto/proj/genealogy/test.lisp".
3: Ignore runtime option --load "test.lisp".
4: Skip rest of --eval and --load options.
5: Skip to toplevel READ/EVAL/PRINT loop.
6: [QUIT ] Quit SBCL (calling #'QUIT, killing the process).
(ESRAP::PROCESS-PARSE-RESULT
#S(ESRAP::RESULT
:%PRODUCTION ((CLOSURE-TEMPLATE.PARSER:NAMESPACE "gaga"
(CLOSURE-TEMPLATE.PARSER:TEMPLATE ("callee"))))
:POSITION 50)
"{namespace gaga}
{template callee}
{/template}
{template caller}
{call callee} {/call}
{/template}
"
102
NIL)
0]
But I've expected a call. If I've misunderstood a syntax in documentation, how should I call a subtemplate with custom parameters?