[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Generating a pretty AST with LPeg
- From: Matthias Kluwe <mkluwe@...>
- Date: Wed, 29 Jan 2014 13:15:31 +0000 (UTC)
Hi!
Duncan Cross <duncan.cross <at> gmail.com> writes:
> On Wed, Jan 29, 2014 at 10:41 AM, Matthias Kluwe <mkluwe <at> gmail.com>
wrote:
> >
> > {
> > 'FCALL', { 'foo', 'bar', 'baz' },
> > 'FCALL', { 'asdf', 'qwer' }
> > }
> >
>
> >
> > For better readability and "type safety" I'd rather like it to be
> >
> > {
> > 'FCALL', { name = 'foo', args = { 'bar', 'baz' } },
> > 'FCALL', { name = 'asdf', args = { 'qwer' } }
> > }
> >
>
> It looks like the feature you want is lpeg.Cg(patt, name) [1].
Thank you. So easy now that I see it :-)
Regards,
Matthias