lua-users home
lua-l archive

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


> We would like to suggest the inclusion of the attached patch against
> lua-5.3.0-work2, which adds a new macro named luaL_loadbuffern. It behaves just
> like the - kept for compatibility - luaL_loadbuffer, except that it takes an
> additional integer argument with which the line number counter in the parser is
> initialised.

You don't need to patch Lua. You can simply provide your own reader function
that first sends n newlines and then the actual code. It can be done in Lua
and in C.