[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: #line specifier in Lua
- From: Xavier Wang <weasley.wx@...>
- Date: Fri, 11 Jul 2014 21:10:16 +0800
Hi, list :)
I just hopes to know how Luiz & Roberto think about add a #line (or
other syntax) to Lua, specific the line number of next line, this is
useful when you write a preprocessor (somethings like [1] or [2] or
LuaMacro[3])
the implement may very easy: when llex read a #line, it set the
lastline (or linenumber?) field of LexState.
the syntax may difficult to work out, as '#' is a operator of Lua,
#line is not good, what about --line: (%d+) ?
IIf I remember correctly, there is already a same post in maillist,
but I can not found out it, can someone give me a archive?
Thanks!
[1]: http://lua-users.org/wiki/SimpleLuaPreprocessor
[2]: http://lua-users.org/wiki/SlightlyLessSimpleLuaPreprocessor
[3]: https://github.com/stevedonovan/LuaMacro
--
regards,
Xavier Wang.