lua-users home
lua-l archive

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


On 2023-06-19 14:51, David Sicilia wrote:
can we change it to this:

local my_var close = ...
local my_var const = ...

AFAICS that should not be syntactically ambiguous, and would be worth doing even if it requires breaking code that uses const/close as variable names.

It is ambiguous / `local a b = …` already has a meaning, specifically `local a ; b = …`. So this would parse as `local my_var ; close = …` and re-defining it to be something else now would be a pretty drastic change (and/or a mess of special cases in the parser).

-- nobody