aboutsummaryrefslogtreecommitdiff
path: root/llex.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1997-12-22 15:52:20 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1997-12-22 15:52:20 -0200
commitfae0b5282562cb1814f1bcaf9a6eb25cb0d37111 (patch)
tree0cde48a2eca767e56364285b153773477e391502 /llex.c
parent22439a7511f45c4180e532857a4f831046460778 (diff)
downloadlua-fae0b5282562cb1814f1bcaf9a6eb25cb0d37111.tar.gz
lua-fae0b5282562cb1814f1bcaf9a6eb25cb0d37111.tar.bz2
lua-fae0b5282562cb1814f1bcaf9a6eb25cb0d37111.zip
small bugs in error report
Diffstat (limited to 'llex.c')
-rw-r--r--llex.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/llex.c b/llex.c
index 2fd65496..a246aff9 100644
--- a/llex.c
+++ b/llex.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: llex.c,v 1.10 1997/12/09 13:35:19 roberto Exp roberto $ 2** $Id: llex.c,v 1.11 1997/12/17 20:48:58 roberto Exp roberto $
3** Lexical Analizer 3** Lexical Analizer
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -50,8 +50,10 @@ void luaX_init (void)
50static void firstline (LexState *LS) 50static void firstline (LexState *LS)
51{ 51{
52 int c = zgetc(LS->lex_z); 52 int c = zgetc(LS->lex_z);
53 if (c == '#') 53 if (c == '#') {
54 LS->linenumber++;
54 while ((c=zgetc(LS->lex_z)) != '\n' && c != EOZ) /* skip first line */; 55 while ((c=zgetc(LS->lex_z)) != '\n' && c != EOZ) /* skip first line */;
56 }
55 zungetc(LS->lex_z); 57 zungetc(LS->lex_z);
56} 58}
57 59