label syntax changed to ':🏷️:'

This commit is contained in:
Roberto Ierusalimschy 2011-06-23 11:54:48 -03:00
parent 801f43f09a
commit 3d3355b4f3
1 changed files with 7 additions and 2 deletions

9
llex.c
View File

@ -1,5 +1,5 @@
/*
** $Id: llex.c,v 2.47 2011/05/03 15:51:16 roberto Exp roberto $
** $Id: llex.c,v 2.48 2011/06/15 14:35:55 roberto Exp roberto $
** Lexical Analyzer
** See Copyright Notice in lua.h
*/
@ -38,7 +38,7 @@ static const char *const luaX_tokens [] = {
"end", "false", "for", "function", "goto", "if",
"in", "local", "nil", "not", "or", "repeat",
"return", "then", "true", "until", "while",
"..", "...", "==", ">=", "<=", "~=", "<eof>",
"..", "...", "==", ">=", "<=", "~=", "::", "<eof>",
"<number>", "<name>", "<string>"
};
@ -444,6 +444,11 @@ static int llex (LexState *ls, SemInfo *seminfo) {
if (ls->current != '=') return '~';
else { next(ls); return TK_NE; }
}
case ':': {
next(ls);
if (ls->current != ':') return ':';
else { next(ls); return TK_DBCOLON; }
}
case '"': case '\'': { /* short literal strings */
read_string(ls, ls->current, seminfo);
return TK_STRING;