lua

A copy of the Lua development repository
Log | Files | Refs | README

commit 3d3355b4f3394d7c223daf2b76c3cf8d854e24a6
parent 801f43f09a3c95a2ec4011a0dc8558ba25a0cc72
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Thu, 23 Jun 2011 11:54:24 -0300

label syntax changed to '::label::'

Diffstat:
Mllex.c | 9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/llex.c b/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 ** 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;