peelonet/tempearly — pull request #13 by RauliL (2014-10-05 14:52:03+00:00)
Title: For statement

This commit adds `for` statement and fixes bug in parsing of `while`
statements.

Also adds new method `AssignLocal` for `Node` class which is useful in
`for` statement and function parameters (WIP feature).

For statements are iterating loops, not the kind of `for` you see in
C/C++. For statement has an variable node, collection node and body of
the loop. Collection node is evaluated into an object, and an iterator
is extracted from that object. Then the body of the loop is executed in
a sub-scope for every object extracted from the iterator, where those
objects are assigned to the variable node.

Example of usage:
```html

<% for value : [1, 2, 3, 4, 5]: %>

${value}

<% end for %>