From 36ce6f3b802fd1ccbfed65795364f00697f0aee8 Mon Sep 17 00:00:00 2001 From: "zik.saleeba" Date: Thu, 12 Feb 2009 09:34:16 +0000 Subject: [PATCH] Fixed line numbering in error messages git-svn-id: http://picoc.googlecode.com/svn/trunk@75 21eae674-98b7-11dd-bd71-f92a316d2d60 --- lex.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lex.c b/lex.c index fd86b47..2ff799e 100644 --- a/lex.c +++ b/lex.c @@ -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++; }