lua-users home
lua-l archive

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


On Tue, Nov 9, 2010 at 4:54 PM, Sean Conner <sean@conman.org> wrote:
> It was thus said that the Great Valerio Schiavoni once stated:
>> Hello
>> 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) ?
>
> Would the following do the trick?

This just compiles the code? That in general will create a file of the
same length as the original? (Hint: luac has a strip option (which you
didn't use). However, creating a bytecode file is not portable so few
will use it.)

Just use lhf's lstrip.

-- 
- Patrick Donnelly