lua-users home
lua-l archive

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



:) I know. but what about:

  = expression
  a,,c= expression
  local ,,some= expression

I did a token filter implementing this (placing a variable named "nil" where there is none) and that's it. One cannot refer to a variable named 'nil' so it's essentially read-free. :)

The only issue surfacing was

  local b,c
  ,,d= func()

which is interpreted as local b,c,,d= func(), and most likely not how the author wants.

The use of newline is anyways problematic in Lua, especially since it's not available for token filters (they're stripped by the lexer).

-asko


Vyacheslav Egorov kirjoitti 4.1.2007 kello 18.15:

Asko Kauppi wrote:
One way could be officially declaring '_' as an always-local, always-nil drain variable. :) This sounds un-Lua-ish, but is actually very close to how it's already treated.
It smells Perl-ish.