predicate syntax

34 views
Skip to first unread message

Andy Chu

unread,
Jun 23, 2009, 2:37:31 AM6/23/09
to JSON Template
The simplest thing I've come up with so far is just to make the
predicate an optional argument to sections ending with ?:

{.section num plural?}
...
{.or}
...
{.end}


{.repeated section methods}
{.section @ public?} # could also just be {.section public?}
{name} {args}
{.end}
{.end}


Repeated sections should probably also get predicates, since I think
it will fall out for free.


This syntax will be compatible with two possible future extensions:

1) Filters on sections
2) More than one predicate per section, e.g. switch/case style

Andy

Reply all
Reply to author
Forward
0 new messages