lua-users home
lua-l archive

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


On 05/01/2011 18:42, cormullion@mac.com wrote:
Looking for some code that can read some Lua source and highlight it (eg by adding HTML tags). Any suggestions?

Not code, but tool: load file in SciTE and export as HTML. IIRC, you can even do it from the command line...
As said, there are lot of similar tools (in Python, PHP, JavaScript).

If you want Lua code, I think there is a Lpeg syntax highlighter for Lua for SciTE, which might be used as starting point for a Lua tool. Or it might be not so hard to redo, there are some other Lpeg parsers of Lua code around (on the Lua wiki), but probably too powerful for this simple task.

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --