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 '-':
        if (LS->current != '-') return '-';
        do { next(LS); } while (LS->current != '\n' && LS->current != EOZ);

You could add processing there.

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

Pedro Miller Rabinovitch
Gerente Geral de Tecnologia
Cipher Technology