lua-users home
lua-l archive

Re: First impressions and errata

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


On 23/02/2014 15.14, Andrew Starks wrote:
A small suggestion:
Make the output legal lua code.
Example: "--#"
Nice idea, it would make reparsing easier.
Speaking of reparsing, the output could be valid Lua source, using a semicolon to separate the sequence part from the generic part:
{
 [1] = 'monday',
 [2] = 'tuesday',
 [3] = 'wednesday',
 [4] = 'thursday',
 [5] = 'friday';
 ['wednesday'] = 3,
 [100] = { --[[ table: 00468538 ]] }, -- (uhm...)
 ['monday'] = 1,
 -- (etc.)
}
... but I have no idea how to properly handle the subtable (I knew I was biting more than I could chew).
And that's probably a good reason why there isn't a table printer :-)
--
 Enrico

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