aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-07-08 15:14:36 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-07-08 15:14:36 -0300
commitd2d24f09713cfecf59a7688c45a3863a35f09254 (patch)
tree7ee3aaf0b2989bf257cabe010f8f558db0f503fa
parent0436c96866851f4081286f86500cb36c47fb27a5 (diff)
downloadlua-d2d24f09713cfecf59a7688c45a3863a35f09254.tar.gz
lua-d2d24f09713cfecf59a7688c45a3863a35f09254.tar.bz2
lua-d2d24f09713cfecf59a7688c45a3863a35f09254.zip
details to allow compilation of Lua as a single file
-rw-r--r--llex.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/llex.c b/llex.c
index db4ff12e..7030e62d 100644
--- a/llex.c
+++ b/llex.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: llex.c,v 1.105 2002/06/18 15:19:27 roberto Exp roberto $ 2** $Id: llex.c,v 1.106 2002/06/25 19:18:20 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*/
@@ -160,7 +160,7 @@ static size_t readname (LexState *LS) {
160 160
161 161
162/* LUA_NUMBER */ 162/* LUA_NUMBER */
163static void read_number (LexState *LS, int comma, SemInfo *seminfo) { 163static void read_numeral (LexState *LS, int comma, SemInfo *seminfo) {
164 lua_State *L = LS->L; 164 lua_State *L = LS->L;
165 size_t l = 0; 165 size_t l = 0;
166 checkbuffer(L, l); 166 checkbuffer(L, l);
@@ -367,7 +367,7 @@ int luaX_lex (LexState *LS, SemInfo *seminfo) {
367 } 367 }
368 else if (!isdigit(LS->current)) return '.'; 368 else if (!isdigit(LS->current)) return '.';
369 else { 369 else {
370 read_number(LS, 1, seminfo); 370 read_numeral(LS, 1, seminfo);
371 return TK_NUMBER; 371 return TK_NUMBER;
372 } 372 }
373 } 373 }
@@ -380,7 +380,7 @@ int luaX_lex (LexState *LS, SemInfo *seminfo) {
380 continue; 380 continue;
381 } 381 }
382 else if (isdigit(LS->current)) { 382 else if (isdigit(LS->current)) {
383 read_number(LS, 0, seminfo); 383 read_numeral(LS, 0, seminfo);
384 return TK_NUMBER; 384 return TK_NUMBER;
385 } 385 }
386 else if (isalpha(LS->current) || LS->current == '_') { 386 else if (isalpha(LS->current) || LS->current == '_') {
@@ -405,3 +405,4 @@ int luaX_lex (LexState *LS, SemInfo *seminfo) {
405 } 405 }
406} 406}
407 407
408#undef next