lua-users home
lua-l archive

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


Does anyone hacked Lua to recognize C++ style
one-line and multilines comments?
May be someone can tell me what part of parser should I change?

My guess would be on or around line 300 of llex.c:

      case '-':
        next(LS);
        if (LS->current != '-') return '-';
        do { next(LS); } while (LS->current != '\n' && LS->current != EOZ);
        continue;

You could add processing there.

(please correct me, anyone, if I'm way off target...)

	Pedro.
--
Pedro Miller Rabinovitch
Gerente Geral de Tecnologia
Cipher Technology
www.cipher.com.br