lua-users home
lua-l archive

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


Gmail broke my code...

case '@': {
    save_and_next(ls);
    char c = ls->current;
    switch (c) {
        case '@':  next(ls);  return '@'; // I'm puzzled with this one.
        case '[':  next(ls);  return TK_STATBEG;
        case '(':  next(ls);  return TK_IDENTIFIER; // @( identifier )
        case '>':  next(ls);  return TK_GOTO;
        case '!':  next(ls);  return TK_LINENUMBER; // @!123"file.name"
        default:  return TK_LABEL;
           /* to allow Lua 5.2 compatibility, assuming
            * that the @ is kept for labels
            */
      }
}


With the following syntax for "statements-expressions" :
    @[ statements | expresion ] */

and this one for gotos and labels
    @>valid lua names numbers and "strings" 123>
    @ same as previous :

Regards,
--Pierre-Yves