archimag / cl-closure-template

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

"let" not implemented ?? #21

Closed flip111 closed 11 years ago

flip111 commented 11 years ago

When using

{let $var: 1 /}

the following error occurs:

Incomplete parse.    Encountered at:     osure-template.Example} {template test} <ht      ^ (Line 3, Column 1, Position 38)     [Condition of type ESRAP::SIMPLE-ESRAP-ERROR]
archimag commented 11 years ago

Implemented but with other syntax, example:

{let $x="1" $y="$foo + 1"}
   // ...
{/let}
flip111 commented 11 years ago

that's nice. Why would you use a seperate closing bracket for let though ?

archimag commented 11 years ago

I use closing bracket for a more clearly scope.

flip111 commented 11 years ago

Since it's not a control structure .. would there be any advantage to put any code within let tags ? Right now i just have: {let $x="1" $y="$foo + 1"}{/let}

archimag commented 11 years ago

It is a control structure in cl-closure-template:

{template helloWorld}
    {let $str="'Hello world!'"}
        {$str} // Hello world!
    {/let}

    {$str} // nothing
{/template}
flip111 commented 11 years ago

thanks for clearing that up. Excellent support thanks