[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.2.0 (beta-rc1) now available
- From: David Kastrup <dak@...>
- Date: Tue, 14 Jun 2011 15:10:39 +0200
Jerome Vuarand <jerome.vuarand@gmail.com> writes:
> 2011/6/13 Roberto Ierusalimschy <roberto@inf.puc-rio.br>:
>>> Why break can appear middle of block but not return?
>>
>> Because return may be followed by an optional expression. Something
>> like 'return a = 3' would confuse the parser.
>
> But then shouldn't "return; a = 3" be allowed ?
Take a look at the BNF syntax of Lua and propose a simple modification
that has that effect.
--
David Kastrup