lua-users home
lua-l archive

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


On Wed, Dec 18, 2013 at 9:16 PM, Pierre-Yves Gérardy <pygy79@gmail.com> wrote:
Guys, I believe you missed my other post... unless you need more than
JSON-like documents, that's what you're looking for.

"lutn" looks for the "function" keyword, first with string.find, and
then, if needed, with a custom parser that eliminates false positives
in strings and comments. It then prepends a "return ", optionally adds
an environment, strips or replaces the string metatable __index, and
loads the result.

--  Pierre-Yves



Sorry, I did see your post, and it does look like it'd work (though it's a lot of code!) My only gripe is it forces the file to be a table, which eliminates the possibility of using conditionals.

--
Sent from my Game Boy.