njuptxiaot / json-template

Automatically exported from code.google.com/p/json-template
0 stars 0 forks source link

Default argument to sections and repeated sections should be @ #26

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
For repeated sections, a common idiom to put them inside a section:

{.section foo}
  {.repeated section}  {# leave off @ here}
  {.end}
{.end}

If sections grow predicates, then you might do something like:

{.section foo}
  Stuff here
  {.section?plural}
    Only in the plural case
  {.end}
{.end}

{.section?plural} is the same as {.section @ ? plural}

(still don't like the ? syntax)

Original issue reported on code.google.com by gtempacc...@yahoo.com on 23 Jun 2009 at 6:07