lua-users home
lua-l archive

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


On Sun, Apr 29, 2012 at 06:55, Patrick Donnelly <batrick@batbytes.com> wrote:
> On Sat, Apr 28, 2012 at 10:45 PM, Alexander Gladysh <agladysh@gmail.com> wrote:
>> On Sun, Apr 29, 2012 at 06:20, Patrick Donnelly <batrick@batbytes.com> wrote:
>>> o forced semicolons for statement termination (due to some statements
>>> requiring it)
>>
>> Ouch! What statements?
>
> Typical example:
>
> $ lua
> Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio
>> do
>>> a = foo
>>> ("%s"):format("str")
> stdin:3: ambiguous syntax (function call x new statement) near '('

Ah, right, of course. (Not in 5.2, AFAIR, though.)

Still, seems to be not an aesthetically good idea to enforce
semicolons in formatter. Maybe detect that somehow and put only when
needed?

Alexander.