[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [PATCH] 'data' mode for loadfile
- From: "Ashwin Hirschi" <lua-l@...>
- Date: Mon, 17 Mar 2014 17:10:13 +0100
The data mode patch defines a new mode 'd' for loadfile which raises
an error at the lexical stage if any loop construct or function
definition has been found when loading the file. It's useful to have
if-statements, but for/while/repeat/goto/function are no go!
An interesting idea.
But those of a paranoid persuasion should probably combine it with other
techniques (like, good old-fashioned sandboxing and such):
--- whack2.lua ---
local fun = load [[
while true do
--- eof ---