diff options
Diffstat (limited to 'llex.c')
-rw-r--r-- | llex.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: llex.c,v 1.11 1997/12/17 20:48:58 roberto Exp roberto $ | 2 | ** $Id: llex.c,v 1.12 1997/12/22 17:52:20 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 | */ |
@@ -268,15 +268,16 @@ int luaY_lex (YYSTYPE *l) | |||
268 | LS->linelasttoken = LS->linenumber; | 268 | LS->linelasttoken = LS->linenumber; |
269 | while (1) { | 269 | while (1) { |
270 | switch (LS->current) { | 270 | switch (LS->current) { |
271 | case '\n': | ||
272 | inclinenumber(LS); | ||
273 | LS->linelasttoken = LS->linenumber; | ||
274 | continue; | ||
275 | 271 | ||
276 | case ' ': case '\t': case '\r': /* CR: to avoid problems with DOS */ | 272 | case ' ': case '\t': case '\r': /* CR: to avoid problems with DOS */ |
277 | next(LS); | 273 | next(LS); |
278 | continue; | 274 | continue; |
279 | 275 | ||
276 | case '\n': | ||
277 | inclinenumber(LS); | ||
278 | LS->linelasttoken = LS->linenumber; | ||
279 | continue; | ||
280 | |||
280 | case '-': | 281 | case '-': |
281 | save_and_next(LS); | 282 | save_and_next(LS); |
282 | if (LS->current != '-') return '-'; | 283 | if (LS->current != '-') return '-'; |