FireTPL v1.0.0

	- Better condition support. :if $eq($bla, blubb) && $isSuperBlubb
	- Ignore empty lines after string blocks and tags

	- inline html
	- Pretty error messages

	  Syntax error in file main.fire in line 23

	  div class=bla blub
	  				^ Unknown tag or attribute

	- Rename special vars. Maybe to $$parent, $$root
	- Each helper add $first, $last, $odd
	- RUPAR (Render Append Prepend Update Remove) support in FireTPL (Maybe with DOM watcher)
	
	- Code view should ignore ``` if indention is not the same as start tags indention
	- Escape html tags in varables per default. Add a alternative way to add unescaped vars. May be $$htmlVar or $htmlVar.html()
	- Use @tags in the same manner like in Handlebars.
	- Better language integration. For example $t('string')
	- Print stack trace in error messages
	- i18n support for compile method
	- grunt-firetpl-compile i18n support

Bugs:

	- Set view path to load views from subdirs ( views/test/test.fire  => test/test )
	- Detailed error message
	- Log errors as errors, add error links to errors
	- Ignore missing objects. data = undefined; data.description triggers an exception.
	  This isn't optimal. FireTPL shouldn't trigger an exception. It should log a detailed error report.

Documentation:
	- Tags
	- Helper
	- Strings
	- Inline HTML
	- Code blocks
	- Events
	- i18n
	- CLI interface
	- Grunt plugins
	- How to

Helper:

	:group $listing +name sort +version -name
		div class="group" $name
	:item
		div class="group-item" "$name $version"


	:sort $listing +name -version
		div class="sorted" "$name $version"

Special vars:

$$ftlRoot $$__parent
$$root $$parent
@@root @@parent

Loop vars:

$ftlIndex
$ftlFirst



Unescaped vars:

$$foo

Lang vars:

@lang


Syntax type | Vars       | HTML Vars          | Special Vars    | Lang Vars | Variable vars
---------------------------------------------------------------------------------------------------------
fire        | $myvar     | $$myvar            | $ftl-index        | @myvar    | ${$varname}
hbs         | {{myvar}}  | {{{myvar}}}        | {{@index}}      | @myvar    | -

internal    | f.escape(data.myvar) | data.myvar | f.escape(data.__ftlIndex) | l('myvar', data.title) | f.escape(data[data.varname])

Hbs requires support for

../
./
this/
this.

Template comments with {{!-- --}} or {{! }} (First one goes to out stream)

Conditions false, undefined, null, "", 0, or [] becomes false. All other becomes true

TODO
====

Localization
------------

$l('key.bla', 2, 'Blubb', 'en-UK,de-DE')

$l($key.bla, {});

div
	"Hello $name
	 $t('welcome.message')
	 $t.welcome.message            < Better

div
	"Hello $name
	 $t('welcome.message', $count)     < Better
	 $t.welcome.message.count($count)


New inline function syntax
--------------------------

$d('date.var', 'YYYY-mm-dd')

$f('format.key', '%d5')

$if('bla.blubb', $bla1, $bla2)

$if('bla.blubb', $bla1, $if($bla2, $bla2, 'Blabla'))



Newline options
---------------

div
    a href="#a1" "Apple".
    a href="#a1" "Banana".
    a href="#a1" "Coconut".

Lang support
------------

* Plural support
* Placeholder
* Lang switch for a specific tag
* Point to other tag
* Different lang fallback


lang.en.json
{
	myvar: {
		sing: 'A lang var string with $name tags'
		plur: 'A plural lang var string with $name tags'
		key: $number
	}
}

compile to ->
{
	var l = function(key, data) {
		var curLang = 'en';

		switch(curLang + '.' + key) {
			case 'de.myvar':
			case 'en.myvar':
				return: {
					data.number === 1 ?
						'A lang var string with ' + data.name + ' tags' :
						'A plural lang var string with ' + data.name + ' tags';
			}
		}
	}

	var l = function(key, data) {
		var curLang = 'en';
		var lang = {
			'en': {
				'myvar':  {
					data.number === 1 ?
						'A lang var string with ' + data.name + ' tags' :
						'A plural lang var string with ' + data.name + ' tags';
				}
			}
		};
		
		switch(curLang + '.' + key) {
			case 'de.myvar':
			case 'en.myvar':
				return: {
					data.number === 1 ?
						'A lang var string with ' + data.name + ' tags' :
						'A plural lang var string with ' + data.name + ' tags';
			}
		}
	}
}

@myvar => f.lang(l.myvar, data)



Escaping

String block
------------

\" | "	||	" | &quote;
\< | <	||	< | &lt;
\> | >	||	> | &gt;
\& | &  ||	& | &amp;
\$ | $	||
\@ | $	||


HTML block
------------

\' | '	||	' | '
\$ | $	||
\@ | @	||


Code block
----------

\``` | ```
\$ | $	Only $ within ` needs to bee escaped!
\@ | @