ariatemplates/hashspace — pull request #81 by b-laporte (2014-03-02 20:48:41+00:00)
Title: Let statement - fixes #54

This pull request introduces the `{let}` statement that allows to create one or multiple local variables in the scope of a container block.

Sample from the PR:
```
var $set=require("hsp/$set");

# template test(m)
{let p1=m.part1, m21=m.part2.part21.msg+"!"}

{let p11=p1.part11}
Part 1.1: {p11.msg}

Part 2.1: {m21} -
{if !p11}
p11 is of course not visible in the 2nd element scope
{/if}

Change Model
# /template

var model={
part1:{
part11: {msg: "Message 1.1"}
},
part2:{
part21: {msg: "Message 2.1"}
}
};

var count=0;
function updateModel() {
count++;
$set(model.part1.part11,"msg", "(1.1 update: "+count+")");
$set(model.part2.part21,"msg", "(2.1 update: "+count+")");
}

// render template in the #output div
test(model).render("output");
```