aboutsummaryrefslogtreecommitdiff
path: root/llex.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2006-01-23 18:06:19 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2006-01-23 18:06:19 -0200
commit3ef5a6797f5aa7c7cb6b970d92b3c6d52d8e9aaf (patch)
tree87217e23c24d7388229bb479cd16d9065a4bbd7b /llex.c
parent9e6e43984da7c9c382fbd47badb4808e6fae96d3 (diff)
downloadlua-3ef5a6797f5aa7c7cb6b970d92b3c6d52d8e9aaf.tar.gz
lua-3ef5a6797f5aa7c7cb6b970d92b3c6d52d8e9aaf.tar.bz2
lua-3ef5a6797f5aa7c7cb6b970d92b3c6d52d8e9aaf.zip
detail
Diffstat (limited to 'llex.c')
-rw-r--r--llex.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/llex.c b/llex.c
index 51882814..40eb7654 100644
--- a/llex.c
+++ b/llex.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: llex.c,v 2.16 2005/12/08 15:50:54 roberto Exp roberto $ 2** $Id: llex.c,v 2.17 2005/12/22 16:19:56 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*/
@@ -193,12 +193,10 @@ static void read_numeral (LexState *ls, SemInfo *seminfo) {
193 do { 193 do {
194 save_and_next(ls); 194 save_and_next(ls);
195 } while (isdigit(ls->current) || ls->current == '.'); 195 } while (isdigit(ls->current) || ls->current == '.');
196 if (check_next(ls, "Ee")) { /* `E'? */ 196 if (check_next(ls, "Ee")) /* `E'? */
197 check_next(ls, "+-"); /* optional exponent sign */ 197 check_next(ls, "+-"); /* optional exponent sign */
198 while (isdigit(ls->current)) { 198 while (isalnum(ls->current) || ls->current == '_')
199 save_and_next(ls); 199 save_and_next(ls);
200 }
201 }
202 save(ls, '\0'); 200 save(ls, '\0');
203 buffreplace(ls, '.', ls->decpoint); /* follow locale for decimal point */ 201 buffreplace(ls, '.', ls->decpoint); /* follow locale for decimal point */
204 if (!luaO_str2d(luaZ_buffer(ls->buff), &seminfo->r)) /* format error? */ 202 if (!luaO_str2d(luaZ_buffer(ls->buff), &seminfo->r)) /* format error? */