lua-users home
lua-l archive

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


> is there anyone who hash a script (bash or others) that takes a .lua file
> and strips out all the comments (block, multiline, single line) ?

This is hard to do right with regular expressions. Better use the Lua lexer.
See for instance LuaSrcDiet and my lstrip:
	http://luasrcdiet.luaforge.net/
	http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/#lstrip