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:
parent
bd5fe4b73c
commit
36ce6f3b80
4
lex.c
4
lex.c
|
@ -218,7 +218,11 @@ enum LexToken LexScanGetToken(struct LexState *Lexer, struct Value **Value)
|
||||||
while (Lexer->Pos != Lexer->End && isspace(*Lexer->Pos))
|
while (Lexer->Pos != Lexer->End && isspace(*Lexer->Pos))
|
||||||
{
|
{
|
||||||
if (*Lexer->Pos == '\n')
|
if (*Lexer->Pos == '\n')
|
||||||
|
{
|
||||||
Lexer->Line++;
|
Lexer->Line++;
|
||||||
|
Lexer->Pos++;
|
||||||
|
return TokenEndOfLine;
|
||||||
|
}
|
||||||
|
|
||||||
Lexer->Pos++;
|
Lexer->Pos++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue