lua-users home
lua-l archive

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


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.