[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: x="abc":upper() v.s. x=("abc"):upper() patch
- From: David Manura <dm.lua@...>
- Date: Mon, 17 Aug 2009 20:43:24 -0400
On Sat, Aug 15, 2009 at 10:11 PM, Peter Cawley wrote:
> On Sat, Aug 15, 2009 at 11:40 PM, David Manura wrote:
>> The new rule
>> enforced by the parser becomes "there can be no line break between
>> prefixexp and args".
>
> Given that:
> functioncall ::= prefixexp args | prefixexp `:´ Name args
>
> In the latter case, is the rule "no line break between prefixexp and
> args", or is it "no line break between Name and args"?
> ....
> factory_function(...)
> :modifier_method_1(...)
In that case there would be no rule because there is no ambiguity.
"factory_function(...) :", "factory_function(...) : name", and
":modifier_method_1(...)" cannot form valid statements.
Now, there was a proposal, related to [2] above, that would cause
"a:b" to be equivalent to "(function(...) return a(b, ...) end)".
Under that proposal, "factory_function(...) : name" _could_ be a
suffix of a valid statement. The first rule should then be simplified
to "no line break before args". Even without the "a:b" proposal, we
could still choose to make that simplification.