lua-users home
lua-l archive

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


Hey Tony,

no, Lua does not have a preprocessor, so raw includes are not possible. However, you could just roll your own. For example, if you chose a syntax like

--include: foo.lua

you could write a short Lua script that processes this file and loads these includes, producing one big file which you then execute.

On Thu, Sep 18, 2014 at 3:07 PM, Tony Papadimitriou <tonyp@acm.org> wrote:
Hi all,

How can one #include a bunch of files so that when compiled, a single self-contained executable is produced.

'require' does not qualify as equivalent because it needs to find the files at run-time.

TIA
Tony