lua-users home
lua-l archive

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


 

From: lua-l-bounces@lists.lua.org [mailto:lua-l-bounces@lists.lua.org] On Behalf Of Sven Olsen
Sent: Thursday, February 16, 2012 10:58 AM
To: lua-l@lists.lua.org
Subject: Anyone have a 5.2 version of Peter Shook's patch?

 

Since upgrading to 5.2, I've been missing Peter Shook's "unpack tables by name" patch.  RiscLua includes a 5.2 compatible version of the patch, but, it's strictly limited to the case of unpacking locals, whereas the original 5.1 patch would unpack into arbitrary variables.  I preferred the old patch because it made it possible to selectively copy pieces of a table without the need to quote variable names, i.e.,

 

_ENV=env1

a,b,c,d in env2

 

Does anyhow have a 5.2 version of the patch that supports the old semantics?  (My own attempt to update Peter's 5.1 code to the 5.2 parser failed miserably.)

 

Thanks,

 

-Sven