lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, Jul 7, 2011 at 3:32 AM, David Hollander <dhllndr@gmail.com> wrote:
>>  would require a lookahead parser
> Would it?

The syntax for function definition is

	function ::= function funcbody
	funcbody ::= `(´ [parlist] `)´ block end

you need to lookahead parse until the "end" to know that this is a funcbody.

() brackets can be a valid statement itself, without "end".