[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Parsing to byte code
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Mon, 10 Sep 2001 12:53:18 -0300 (EST)
>In my MUD engine, when a script file is loaded, I would like to "pre-parse"
>it to byte code, before the engine it self ever attempts to run it.
With Lua 4.1, use lua_loadfile instead of lua_dofile.
With Lua 4.0, write your scripts as "return function () XXX end", where XXX
is your original script, run dofile on this and get return value.
If you want to save pre-compiled scripts, use dump in 4.1 (see src/luac/dumplib).