lua-users home
lua-l archive

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


> While we're talking about Lua's grammar, and someone had
> mentioned Lua's short-comment specifier (which I don't really mind)
> there's one thing I'd really rather like to see in a future
> version of the language: nestable or otherwise non-accidentally-
> terminated long-comments.
> 
> I often use --[[ ... ]] for commenting out chunks of code, but
> am also often foiled in this because the long-comment terminator,
> ']]', is something that fairly often occurs naturally in the
> code I'm commenting out.  It would be nice if the parser could
> either count the [[ and ]] balance and only terminate the
> comment when the balance returns to zero, or allowed a different
> block-comment format whose terminator sequence wasn't valid
> Lua grammar.
> 
> Regards,
> --Adam

I don't understand. They are nestable, I just did a quick test, and it seems
to work. I worked hard to have 
the Scintilla lexer for Lua to handle these nesting, I hope I did right :-)

Regards.

-- 
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--
Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist
http://jove.prohosting.com/~philho/
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--

NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService

Jetzt kostenlos anmelden unter http://www.gmx.net

+++ GMX - die erste Adresse für Mail, Message, More! +++