Skip to content

Commit

Permalink
Fixed lexer compile issues from issue #135
Browse files Browse the repository at this point in the history
  • Loading branch information
zik.saleeba committed Oct 5, 2011
1 parent 5667fc1 commit b1669bf
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lex.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#define MAX_CHAR_VALUE 255 /* maximum value which can be represented by a "char" data type */

static union AnyValue LexAnyValue;
static struct Value LexValue = { TypeVoid, &LexAnyValue, FALSE, FALSE };
static struct Value LexValue = { TypeVoid, &LexAnyValue, NULL, FALSE, FALSE, FALSE };

struct ReservedWord
{
Expand Down Expand Up @@ -199,8 +199,12 @@ enum LexToken LexGetNumber(struct LexState *Lexer, struct Value *Value)
LEXER_INC(Lexer);
}

for (Result = 0; Lexer->Pos != Lexer->End && IS_BASE_DIGIT(*Lexer->Pos, Base); LEXER_INC(Lexer))
Result = Result * (double)Base + GET_BASE_DIGIT(*Lexer->Pos);
Result = 0;
while (Lexer->Pos != Lexer->End && IS_BASE_DIGIT(*Lexer->Pos, Base))
{
Result = Result * Base + GET_BASE_DIGIT(*Lexer->Pos);
LEXER_INC(Lexer);
}

FPResult *= pow((double)Base, (double)Result * ExponentMultiplier);
}
Expand Down

0 comments on commit b1669bf

Please sign in to comment.