diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-06-23 11:54:48 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-06-23 11:54:48 -0300 |
commit | 3d3355b4f3394d7c223daf2b76c3cf8d854e24a6 (patch) | |
tree | 85cc4ffc874030c038a89d68c0f29573510dfaff /llex.c | |
parent | 801f43f09a3c95a2ec4011a0dc8558ba25a0cc72 (diff) | |
download | lua-3d3355b4f3394d7c223daf2b76c3cf8d854e24a6.tar.gz lua-3d3355b4f3394d7c223daf2b76c3cf8d854e24a6.tar.bz2 lua-3d3355b4f3394d7c223daf2b76c3cf8d854e24a6.zip |
label syntax changed to '::label::'
Diffstat (limited to 'llex.c')
-rw-r--r-- | llex.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: llex.c,v 2.47 2011/05/03 15:51:16 roberto Exp roberto $ | 2 | ** $Id: llex.c,v 2.48 2011/06/15 14:35:55 roberto Exp roberto $ |
3 | ** Lexical Analyzer | 3 | ** Lexical Analyzer |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -38,7 +38,7 @@ static const char *const luaX_tokens [] = { | |||
38 | "end", "false", "for", "function", "goto", "if", | 38 | "end", "false", "for", "function", "goto", "if", |
39 | "in", "local", "nil", "not", "or", "repeat", | 39 | "in", "local", "nil", "not", "or", "repeat", |
40 | "return", "then", "true", "until", "while", | 40 | "return", "then", "true", "until", "while", |
41 | "..", "...", "==", ">=", "<=", "~=", "<eof>", | 41 | "..", "...", "==", ">=", "<=", "~=", "::", "<eof>", |
42 | "<number>", "<name>", "<string>" | 42 | "<number>", "<name>", "<string>" |
43 | }; | 43 | }; |
44 | 44 | ||
@@ -444,6 +444,11 @@ static int llex (LexState *ls, SemInfo *seminfo) { | |||
444 | if (ls->current != '=') return '~'; | 444 | if (ls->current != '=') return '~'; |
445 | else { next(ls); return TK_NE; } | 445 | else { next(ls); return TK_NE; } |
446 | } | 446 | } |
447 | case ':': { | ||
448 | next(ls); | ||
449 | if (ls->current != ':') return ':'; | ||
450 | else { next(ls); return TK_DBCOLON; } | ||
451 | } | ||
447 | case '"': case '\'': { /* short literal strings */ | 452 | case '"': case '\'': { /* short literal strings */ |
448 | read_string(ls, ls->current, seminfo); | 453 | read_string(ls, ls->current, seminfo); |
449 | return TK_STRING; | 454 | return TK_STRING; |