[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Inline Functions
- From: "Peter Hill" <corwin@...>
- Date: Fri, 27 Dec 2002 20:28:25 -0000
> Regardless, one *should* be able to have:
> function(a) return a end (123)
Luiz Henrique de Figueiredo:
> This does not work because it requires 2 lookaheads.
I've been looking through the syntax (I'm currently writing a Lua parser in
Visual Basic) and I can't seem to see why it requires two lookaheads.
- If "function" occurs in the position of an expression then it must be a
- If "function" occurs where a statement may occur then, having absorbed the
'function' token, one merely needs to do a single lookahead to see if the
next token is "(" (meaing a function literal) or not (meaning a function
What am I missing?