[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Idea: 'function' keyword optional when preceded by 'local'
- From: David Kastrup <dak@...>
- Date: Mon, 11 Jul 2011 14:36:54 +0200
Jon Akhtar <akhtar@mindspring.com> writes:
> -- ambiguous
> local f("foo"):bar()
>
> -- ok
> local f
> ("foo"):bar()
>
> Right now the parser checks for a newline IIRC to tell the difference
> between the ( of a function call and the ( of a new expression.
> Significant white space,
An idea ugly enough that "right now" means only "up to Lua 5.1".
--
David Kastrup