lua-users home
lua-l archive

Re: parser hacking: conditional fields

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


On Thu, Feb 28, 2013 at 6:47 PM, Sven Olsen <sven2718@gmail.com> wrote:
> By chaining ~, I can write statements like the following, which are safe
> even when 'object' or any of it's subtables have a chance of being nil:
>
> color = object~icon~glow~color or white
you can change the metatable of nil to get that behavior.
-- 
Javier

AltStyle によって変換されたページ (->オリジナル) /