in reply to Re: Simplifying the syntax further
in thread Embedding a mini-language for XML construction into Perl
The corner case where an empty element contains code is a small blemish and an easy price to pay for the benefits of the simplified text syntax. Maybe we can even reduce the blemish by introducing another helper that declares a block to represent an empty content model:
Then the corner-case becomes:sub empty(&) { shift->(); undef }
It's still not perfect, but maybe we can think of yet another improvement.doc { br { empty { ++$breaks } } }
Cheers,
Tom
Tom Moertel : Blog / Talks / CPAN / LectroTest / PXSL / Coffee / Movie Rating Decoder
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Simplifying the syntax further
by TimToady (Parson) on Nov 22, 2005 at 16:52 UTC | |
|
Re^3: Simplifying the syntax further
by Aristotle (Chancellor) on Nov 22, 2005 at 16:48 UTC |