Fixed line numbering in error messages

git-svn-id: http://picoc.googlecode.com/svn/trunk@75 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
zik.saleeba 2009-02-12 09:34:16 +00:00
parent bd5fe4b73c
commit 36ce6f3b80

4
lex.c
View file

@ -218,7 +218,11 @@ enum LexToken LexScanGetToken(struct LexState *Lexer, struct Value **Value)
while (Lexer->Pos != Lexer->End && isspace(*Lexer->Pos))
{
if (*Lexer->Pos == '\n')
{
Lexer->Line++;
Lexer->Pos++;
return TokenEndOfLine;
}
Lexer->Pos++;
}