lua-users home
lua-l archive

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


All these hacks, but why not actually add multiline comment functionality ?

- Kenneth

Quoting Luiz Henrique de Figueiredo (lhf@tecgraf.puc-rio.br):
> >Of course, if GC time isn't an issue, you can just write:
> >local C = [[
> ><syntaxly correct code to comment out>
> >--]] ; C = nil
> >
> >and the string isn't in memory anymore (after the GC of course).
> 
> There's also
> 
> do local C=[[
> --]] end
> 
> C goes immediately out of scope. The parser could exploit this (but doesn't).
> 
> There's also
> 
> local C= 1 or [[
> <syntaxly correct code to comment out>
> --]]
> 
> The code generator could exploit this (but doesn't).
> 
> --lhf