diff options
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 | ||