1
0
Fork 0

Token: Fix Lth_TOK_Dot eating numbers

master
Marrub 2016-10-21 14:50:19 -04:00
parent ab547ad527
commit fb08786729
1 changed files with 5 additions and 1 deletions

View File

@ -42,7 +42,6 @@ void Lth_TokenGet(FILE *fp, Lth_Token *out)
switch(ch) switch(ch)
{ {
case '.': Lth_TokenSet(out, Dot ); return;
case '=': Lth_TokenSet(out, Equals); return; case '=': Lth_TokenSet(out, Equals); return;
case ';': Lth_TokenSet(out, Semico); return; case ';': Lth_TokenSet(out, Semico); return;
@ -50,6 +49,11 @@ void Lth_TokenGet(FILE *fp, Lth_Token *out)
case ']': Lth_TokenSet(out, BrackC); return; case ']': Lth_TokenSet(out, BrackC); return;
case '\n': Lth_TokenSet(out, LnEnd ); return; case '\n': Lth_TokenSet(out, LnEnd ); return;
case '.':
if(isdigit(Lth_fpeekc(fp))) break;
Lth_TokenSet(out, Dot);
return;
} }
if(isspace(ch)) if(isspace(ch))