diff options
Diffstat (limited to 'llex.c')
| -rw-r--r-- | llex.c | 16 |
1 files changed, 8 insertions, 8 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: llex.c,v 2.33 2009/05/18 17:28:04 roberto Exp roberto $ | 2 | ** $Id: llex.c,v 2.34 2009/11/17 16:33:38 roberto Exp roberto $ |
| 3 | ** Lexical Analyzer | 3 | ** Lexical Analyzer |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -313,11 +313,11 @@ static void read_string (LexState *ls, int del, SemInfo *seminfo) { | |||
| 313 | switch (ls->current) { | 313 | switch (ls->current) { |
| 314 | case EOZ: | 314 | case EOZ: |
| 315 | lexerror(ls, "unfinished string", TK_EOS); | 315 | lexerror(ls, "unfinished string", TK_EOS); |
| 316 | continue; /* to avoid warnings */ | 316 | break; /* to avoid warnings */ |
| 317 | case '\n': | 317 | case '\n': |
| 318 | case '\r': | 318 | case '\r': |
| 319 | lexerror(ls, "unfinished string", TK_STRING); | 319 | lexerror(ls, "unfinished string", TK_STRING); |
| 320 | continue; /* to avoid warnings */ | 320 | break; /* to avoid warnings */ |
| 321 | case '\\': { /* escape sequences */ | 321 | case '\\': { /* escape sequences */ |
| 322 | int c; /* final character to be saved */ | 322 | int c; /* final character to be saved */ |
| 323 | next(ls); /* do not save the `\' */ | 323 | next(ls); /* do not save the `\' */ |
| @@ -343,7 +343,7 @@ static void read_string (LexState *ls, int del, SemInfo *seminfo) { | |||
| 343 | } | 343 | } |
| 344 | next(ls); | 344 | next(ls); |
| 345 | save(ls, c); | 345 | save(ls, c); |
| 346 | continue; | 346 | break; |
| 347 | } | 347 | } |
| 348 | default: | 348 | default: |
| 349 | save_and_next(ls); | 349 | save_and_next(ls); |
| @@ -362,7 +362,7 @@ static int llex (LexState *ls, SemInfo *seminfo) { | |||
| 362 | case '\n': | 362 | case '\n': |
| 363 | case '\r': { | 363 | case '\r': { |
| 364 | inclinenumber(ls); | 364 | inclinenumber(ls); |
| 365 | continue; | 365 | break; |
| 366 | } | 366 | } |
| 367 | case '-': { | 367 | case '-': { |
| 368 | next(ls); | 368 | next(ls); |
| @@ -375,13 +375,13 @@ static int llex (LexState *ls, SemInfo *seminfo) { | |||
| 375 | if (sep >= 0) { | 375 | if (sep >= 0) { |
| 376 | read_long_string(ls, NULL, sep); /* long comment */ | 376 | read_long_string(ls, NULL, sep); /* long comment */ |
| 377 | luaZ_resetbuffer(ls->buff); | 377 | luaZ_resetbuffer(ls->buff); |
| 378 | continue; | 378 | break; |
| 379 | } | 379 | } |
| 380 | } | 380 | } |
| 381 | /* else short comment */ | 381 | /* else short comment */ |
| 382 | while (!currIsNewline(ls) && ls->current != EOZ) | 382 | while (!currIsNewline(ls) && ls->current != EOZ) |
| 383 | next(ls); | 383 | next(ls); |
| 384 | continue; | 384 | break; |
| 385 | } | 385 | } |
| 386 | case '[': { | 386 | case '[': { |
| 387 | int sep = skip_sep(ls); | 387 | int sep = skip_sep(ls); |
| @@ -437,7 +437,7 @@ static int llex (LexState *ls, SemInfo *seminfo) { | |||
| 437 | if (lisspace(ls->current)) { | 437 | if (lisspace(ls->current)) { |
| 438 | lua_assert(!currIsNewline(ls)); | 438 | lua_assert(!currIsNewline(ls)); |
| 439 | next(ls); | 439 | next(ls); |
| 440 | continue; | 440 | break; |
| 441 | } | 441 | } |
| 442 | else if (lisdigit(ls->current)) { | 442 | else if (lisdigit(ls->current)) { |
| 443 | read_numeral(ls, seminfo); | 443 | read_numeral(ls, seminfo); |
