archimag / cl-closure-template

Common Lisp implementation of Google's Closure Templates.
Other
71 stars 23 forks source link

Incomplete parse error on simple template #30

Closed ralt closed 10 years ago

ralt commented 10 years ago

A very simple file...

{namespace spa.history}

{template show}
  <tr>
    <td>{$type}</td>
    <td>{$date|date}</td>
    <td class="comment"><div>{$comment}</div></td>
    <td>{$author}</td>
    <td><a href="/history/{$id}/edit">modifier</a></td>
  </tr>
{/template}

I try to compile it:

CL-USER> (closure-template:compile-cl-templates #P"/path/to/file.tmpl")

I get this error:

Incomplete parse.

  Encountered at:
    namespace spa.history}

{template show}
  <tr>

     ^ (Line 3, Column 1, Position 25)
   [Condition of type ESRAP::SIMPLE-ESRAP-ERROR]

Have I missed anything obvious?

archimag commented 10 years ago

Sorry, cl-closure-template don't support "date" ({$date|date}) print directive. You can define own print directive via define-print-syntax marco.

ralt commented 10 years ago

The new print directive had to be compiled before the template, my bad