[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Bug in constructors (3.2 and 4.0a)
- From: Edgar Toernig <froese@...>
- Date: Thu, 11 May 2000 01:52:44 +0200
tomas@ccpa.puc-rio.br wrote:
> Funny! The following code does work:
>
> function foo()
> local a
> bar = function()
> x = { b=2, a=1 }
> end
> end
>
> But changing the order ( { a=1, b=2 } ) it doesn't.
Right, the first element is parsed in a different way because the
parser does not know what kind of constructor you are using:
{ a=1,b=1 } vs. { a,b }
It has to see the '='. But with a lookahead of 1 that's difficult...
Ciao, ET.