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 bb5f36ab..9544de4f 100644
--- a/llex.c
+++ b/llex.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: llex.c,v 2.63 2013/03/16 21:10:18 roberto Exp roberto $ 2** $Id: llex.c,v 2.64 2013/04/16 18:46:28 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>", "<number>", "<name>", "<string>" 42 "<number>", "<number>", "<name>", "<string>"
43}; 43};
44 44
@@ -464,6 +464,11 @@ static int llex (LexState *ls, SemInfo *seminfo) {
464 if (ls->current != '=') return '>'; 464 if (ls->current != '=') return '>';
465 else { next(ls); return TK_GE; } 465 else { next(ls); return TK_GE; }
466 } 466 }
467 case '/': {
468 next(ls);
469 if (ls->current != '/') return '/';
470 else { next(ls); return TK_IDIV; }
471 }
467 case '~': { 472 case '~': {
468 next(ls); 473 next(ls);
469 if (ls->current != '=') return '~'; 474 if (ls->current != '=') return '~';