[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.2.0 (beta-rc1) GOTO
- From: Pierre-Yves Gérardy <pygy79@...>
- Date: Thu, 16 Jun 2011 11:58:29 +0200
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