mirror of https://github.com/rusefi/lua.git
label syntax changed to ':🏷️:'
This commit is contained in:
parent
801f43f09a
commit
3d3355b4f3
9
llex.c
9
llex.c
|
@ -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
|
** Lexical Analyzer
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -38,7 +38,7 @@ static const char *const luaX_tokens [] = {
|
||||||
"end", "false", "for", "function", "goto", "if",
|
"end", "false", "for", "function", "goto", "if",
|
||||||
"in", "local", "nil", "not", "or", "repeat",
|
"in", "local", "nil", "not", "or", "repeat",
|
||||||
"return", "then", "true", "until", "while",
|
"return", "then", "true", "until", "while",
|
||||||
"..", "...", "==", ">=", "<=", "~=", "<eof>",
|
"..", "...", "==", ">=", "<=", "~=", "::", "<eof>",
|
||||||
"<number>", "<name>", "<string>"
|
"<number>", "<name>", "<string>"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -444,6 +444,11 @@ static int llex (LexState *ls, SemInfo *seminfo) {
|
||||||
if (ls->current != '=') return '~';
|
if (ls->current != '=') return '~';
|
||||||
else { next(ls); return TK_NE; }
|
else { next(ls); return TK_NE; }
|
||||||
}
|
}
|
||||||
|
case ':': {
|
||||||
|
next(ls);
|
||||||
|
if (ls->current != ':') return ':';
|
||||||
|
else { next(ls); return TK_DBCOLON; }
|
||||||
|
}
|
||||||
case '"': case '\'': { /* short literal strings */
|
case '"': case '\'': { /* short literal strings */
|
||||||
read_string(ls, ls->current, seminfo);
|
read_string(ls, ls->current, seminfo);
|
||||||
return TK_STRING;
|
return TK_STRING;
|
||||||
|
|
Loading…
Reference in New Issue