lua-users home
lua-l archive

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

> In 'lua [options] [script [args]]' it seems that neither _G.loadfile nor
> _G.loadfile are used to execute 'script', is this correct?


> Also rephrased, is there a way to have 'lua -lDSL test.lua' pre-process
> tests.lua before execution?

In Lua 5.3, yes, because 'arg' is set before '-lDSL' is executed.
But you'll have to do all processing and execution when loading DSL,
not when executing test.lua.

> I am aware I can use 'lua DSL test.lua' instead with an appropriate DSL lua script.

This is a good solution. What are you trying to achieve that cannot use this?