diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-12-22 15:52:20 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-12-22 15:52:20 -0200 |
commit | fae0b5282562cb1814f1bcaf9a6eb25cb0d37111 (patch) | |
tree | 0cde48a2eca767e56364285b153773477e391502 /llex.c | |
parent | 22439a7511f45c4180e532857a4f831046460778 (diff) | |
download | lua-fae0b5282562cb1814f1bcaf9a6eb25cb0d37111.tar.gz lua-fae0b5282562cb1814f1bcaf9a6eb25cb0d37111.tar.bz2 lua-fae0b5282562cb1814f1bcaf9a6eb25cb0d37111.zip |
small bugs in error report
Diffstat (limited to 'llex.c')
-rw-r--r-- | llex.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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) | |||
50 | static void firstline (LexState *LS) | 50 | static 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 | ||