aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/luajit-2.0/src/lj_lex.c
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/luajit-2.0/src/lj_lex.c')
-rw-r--r--libraries/luajit-2.0/src/lj_lex.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/libraries/luajit-2.0/src/lj_lex.c b/libraries/luajit-2.0/src/lj_lex.c
index 00daccd..59d8225 100644
--- a/libraries/luajit-2.0/src/lj_lex.c
+++ b/libraries/luajit-2.0/src/lj_lex.c
@@ -137,14 +137,17 @@ static int lex_number64(LexState *ls, TValue *tv)
137/* Parse a number literal. */ 137/* Parse a number literal. */
138static void lex_number(LexState *ls, TValue *tv) 138static void lex_number(LexState *ls, TValue *tv)
139{ 139{
140 int c; 140 int c, xp = 'E';
141 lua_assert(lj_char_isdigit(ls->current)); 141 lua_assert(lj_char_isdigit(ls->current));
142 do { 142 if ((c = ls->current) == '0') {
143 save_and_next(ls);
144 if ((ls->current & ~0x20) == 'X') xp = 'P';
145 }
146 while (lj_char_isident(ls->current) || ls->current == '.' ||
147 ((ls->current == '-' || ls->current == '+') && (c & ~0x20) == xp)) {
143 c = ls->current; 148 c = ls->current;
144 save_and_next(ls); 149 save_and_next(ls);
145 } while (lj_char_isident(ls->current) || ls->current == '.' || 150 }
146 ((ls->current == '-' || ls->current == '+') &&
147 ((c & ~0x20) == 'E' || (c & ~0x20) == 'P')));
148#if LJ_HASFFI 151#if LJ_HASFFI
149 c &= ~0x20; 152 c &= ~0x20;
150 if ((c == 'I' || c == 'L' || c == 'U') && !ctype_ctsG(G(ls->L))) 153 if ((c == 'I' || c == 'L' || c == 'U') && !ctype_ctsG(G(ls->L)))