lua-users home
lua-l archive

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

> On Tue, Jan 12, 2010 at 11:42:36AM -0500, Yuri Takhteyev wrote:
> > > So this would be blah = loadin(pathtoscript, envtab)
> > more like blah = loadin(envtab, code_as_string)
> Is there no way to get away from this "code_as_string" approach?  Why would I
> want to waste garbage creating a string to contain my file when I could have
> the lexer read directly from the file?

'loadin' is like 'load'; it accepts a reader function as argument. So
there is no need to have the code as string at all.

-- Roberto