tyler-sommer / stick

A golang port of the Twig templating engine
MIT License
183 stars 36 forks source link

Arrays don't work #9

Closed dave closed 7 years ago

dave commented 7 years ago

The following...

{% set foo = ["bar", "baz"] %}

... gives an error:

parse: unexpected token "ARRAY_OPEN"
dave commented 7 years ago

... additionally:

{% set foo = {"bar": "baz"} %}

... gives an error:

parse: unexpected token "HASH_OPEN"
tyler-sommer commented 7 years ago

Thanks for the report, @davelondon. I've started implementing hash and array literals in 0eaebd4 but {% include with {"hash": "literal"} %} still doesn't work and stick doesnt yet support {key: "value"} syntax with the unquoted key name.

tyler-sommer commented 7 years ago

This is now implemented completely. Please let me know if you have any issues, and thanks again @davelondon! 👍