aboutsummaryrefslogtreecommitdiff
path: root/llex.c
diff options
context:
space:
mode:
Diffstat (limited to 'llex.c')
-rw-r--r--llex.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/llex.c b/llex.c
index 9d36ad33..b27d74e8 100644
--- a/llex.c
+++ b/llex.c
@@ -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;