[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Token filter for erlang-style numbers.
- From: Karel Tuma <ktuma@...>
- Date: Wed, 25 Oct 2006 00:00:36 +0200
hi,
tab={}
tab[do() blah() end] = true
breaks. as well as binary operators (it's perfectly legal
to append function body in lua .. sometimes ;)
different approach of trying to detect 'in' and 'while' statement
context may work either.
(neither method is much accurate though)
//kt
On Tue, Oct 24, 2006 at 10:41:46PM +0200, Asko Kauppi wrote:
>
> Took my dip into the Wonderful World of token filters. Veeery lua-
> ish, indeed.
>
> May I suggest using .lhf for filter files? ;) For Lua Halfway
> Filter, or...
>
>
> -asko
>
> ps. Is there any way I could wrap-in a function body, when processing
> its paramlist, without needing a ')' token to be
> inserted after the function? Guess not. :-?
>
>
> Luiz Henrique de Figueiredo kirjoitti 24.10.2006 kello 17.57:
>
> >>Here's my semi-regular posting about erlang style numbers... this
> >>time
> >>as an excuse to play with Luiz' token filter. Below is the code to
> >>support this interesting (to me at least) extension:
> >
> >See, no need for C hacking! :-) And pretty easy to do it in Lua,
> >right?
> >(I'm not blowing my own horn here; just remarking that token
> >filters can be
> >a better alternative to hacking the Lua core to add more sugar.)
> >
> >>-- 2#1001 means base "2" numeric constant "1001" or 9 in decimal
> >
> >Just note that you cannot enforce that the three parts are a single
> >token,
> >that is, 2 # 1001 will be accepted as a binary constant. Just
> >don't
> >tell your users about it :-)
> >--lhf
>