[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Is "scripting" truly Lua's future?
- From: David Given <dg@...>
- Date: Mon, 15 Sep 2008 23:11:16 +0100
Luiz Henrique de Figueiredo wrote:
>> All my Lua files tend to start with the same boilerplate containing
>> ...etc. It would be really nice to be able to common this somehow.
> You can write your own lua_Reader function that send this before sending
> anything else.
Yes, but the line numbers in the debug information will still be wrong
--- because the compiler's seen 15 or so lines before the main text
starts, all the numbers will be 15 or so out. I've had to deal this
before in other languages and it's significantly more of a pain that it
Is there any way to reset the compiler's line number count in the middle
of a file?
┌─── ｄｇ＠ｃｏｗｌａｒｋ．ｃｏｍ ───── http://www.cowlark.com ─────
│ "All power corrupts, but we need electricity." --- Diana Wynne Jones,
│ _Archer's Goon_
Description: OpenPGP digital signature