aboutsummaryrefslogtreecommitdiff
path: root/llex.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2015-03-28 16:14:47 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2015-03-28 16:14:47 -0300
commite723c75c02a48d0c766f1f30f7a321f7fdb239dc (patch)
treeaa3f11828e25ccf2dc02d077e59ee12a4313a3bd /llex.c
parentb436ed58a3416c2e1936bdce880ac09925401a87 (diff)
downloadlua-e723c75c02a48d0c766f1f30f7a321f7fdb239dc.tar.gz
lua-e723c75c02a48d0c766f1f30f7a321f7fdb239dc.tar.bz2
lua-e723c75c02a48d0c766f1f30f7a321f7fdb239dc.zip
details (avoid 'lint' warnings)
Diffstat (limited to 'llex.c')
-rw-r--r--llex.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/llex.c b/llex.c
index 8a6ac108..0c3eb4dd 100644
--- a/llex.c
+++ b/llex.c
@@ -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*/
289static int skip_sep (LexState *ls) { 290static 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);