diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2015-03-28 16:14:47 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2015-03-28 16:14:47 -0300 |
commit | e723c75c02a48d0c766f1f30f7a321f7fdb239dc (patch) | |
tree | aa3f11828e25ccf2dc02d077e59ee12a4313a3bd /llex.c | |
parent | b436ed58a3416c2e1936bdce880ac09925401a87 (diff) | |
download | lua-e723c75c02a48d0c766f1f30f7a321f7fdb239dc.tar.gz lua-e723c75c02a48d0c766f1f30f7a321f7fdb239dc.tar.bz2 lua-e723c75c02a48d0c766f1f30f7a321f7fdb239dc.zip |
details (avoid 'lint' warnings)
Diffstat (limited to 'llex.c')
-rw-r--r-- | llex.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: llex.c,v 2.89 2014/11/14 16:06:09 roberto Exp roberto $ | 2 | ** $Id: llex.c,v 2.90 2015/03/03 18:17:04 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 | */ |
@@ -283,8 +283,9 @@ static int read_numeral (LexState *ls, SemInfo *seminfo) { | |||
283 | 283 | ||
284 | 284 | ||
285 | /* | 285 | /* |
286 | ** skip a sequence '[=*[' or ']=*]' and return its number of '='s or | 286 | ** skip a sequence '[=*[' or ']=*]'; if sequence is wellformed, return |
287 | ** -1 if sequence is malformed | 287 | ** its number of '='s; otherwise, return a negative number (-1 iff there |
288 | ** are no '='s after initial bracket) | ||
288 | */ | 289 | */ |
289 | static int skip_sep (LexState *ls) { | 290 | static int skip_sep (LexState *ls) { |
290 | int count = 0; | 291 | int count = 0; |
@@ -501,8 +502,9 @@ static int llex (LexState *ls, SemInfo *seminfo) { | |||
501 | read_long_string(ls, seminfo, sep); | 502 | read_long_string(ls, seminfo, sep); |
502 | return TK_STRING; | 503 | return TK_STRING; |
503 | } | 504 | } |
504 | else if (sep == -1) return '['; | 505 | else if (sep != -1) /* '[=...' missing second bracket */ |
505 | else lexerror(ls, "invalid long string delimiter", TK_STRING); | 506 | lexerror(ls, "invalid long string delimiter", TK_STRING); |
507 | return '['; | ||
506 | } | 508 | } |
507 | case '=': { | 509 | case '=': { |
508 | next(ls); | 510 | next(ls); |