diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-10-17 13:28:21 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-10-17 13:28:21 -0300 |
commit | f97c64d7bf4c0f373711795d8faba0e8cd206761 (patch) | |
tree | 99c9e25132b2ef193dc417873e8f44e5c0ea8738 /lparser.c | |
parent | ea3155e380080095a6f8c63297f0505789cf08b7 (diff) | |
download | lua-f97c64d7bf4c0f373711795d8faba0e8cd206761.tar.gz lua-f97c64d7bf4c0f373711795d8faba0e8cd206761.tar.bz2 lua-f97c64d7bf4c0f373711795d8faba0e8cd206761.zip |
macros 'LUA_QL'/'LUA_QL' deprecated
Diffstat (limited to 'lparser.c')
-rw-r--r-- | lparser.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lparser.c,v 2.141 2014/07/18 13:36:14 roberto Exp roberto $ | 2 | ** $Id: lparser.c,v 2.142 2014/07/21 16:02:10 roberto Exp roberto $ |
3 | ** Lua Parser | 3 | ** Lua Parser |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -340,7 +340,7 @@ static void closegoto (LexState *ls, int g, Labeldesc *label) { | |||
340 | if (gt->nactvar < label->nactvar) { | 340 | if (gt->nactvar < label->nactvar) { |
341 | TString *vname = getlocvar(fs, gt->nactvar)->varname; | 341 | TString *vname = getlocvar(fs, gt->nactvar)->varname; |
342 | const char *msg = luaO_pushfstring(ls->L, | 342 | const char *msg = luaO_pushfstring(ls->L, |
343 | "<goto %s> at line %d jumps into the scope of local " LUA_QS, | 343 | "<goto %s> at line %d jumps into the scope of local '%s'", |
344 | getstr(gt->name), gt->line, getstr(vname)); | 344 | getstr(gt->name), gt->line, getstr(vname)); |
345 | semerror(ls, msg); | 345 | semerror(ls, msg); |
346 | } | 346 | } |
@@ -457,7 +457,7 @@ static void breaklabel (LexState *ls) { | |||
457 | static l_noret undefgoto (LexState *ls, Labeldesc *gt) { | 457 | static l_noret undefgoto (LexState *ls, Labeldesc *gt) { |
458 | const char *msg = isreserved(gt->name) | 458 | const char *msg = isreserved(gt->name) |
459 | ? "<%s> at line %d not inside a loop" | 459 | ? "<%s> at line %d not inside a loop" |
460 | : "no visible label " LUA_QS " for <goto> at line %d"; | 460 | : "no visible label '%s' for <goto> at line %d"; |
461 | msg = luaO_pushfstring(ls->L, msg, getstr(gt->name), gt->line); | 461 | msg = luaO_pushfstring(ls->L, msg, getstr(gt->name), gt->line); |
462 | semerror(ls, msg); | 462 | semerror(ls, msg); |
463 | } | 463 | } |
@@ -761,7 +761,7 @@ static void parlist (LexState *ls) { | |||
761 | f->is_vararg = 1; | 761 | f->is_vararg = 1; |
762 | break; | 762 | break; |
763 | } | 763 | } |
764 | default: luaX_syntaxerror(ls, "<name> or " LUA_QL("...") " expected"); | 764 | default: luaX_syntaxerror(ls, "<name> or '...' expected"); |
765 | } | 765 | } |
766 | } while (!f->is_vararg && testnext(ls, ',')); | 766 | } while (!f->is_vararg && testnext(ls, ',')); |
767 | } | 767 | } |
@@ -953,7 +953,7 @@ static void simpleexp (LexState *ls, expdesc *v) { | |||
953 | case TK_DOTS: { /* vararg */ | 953 | case TK_DOTS: { /* vararg */ |
954 | FuncState *fs = ls->fs; | 954 | FuncState *fs = ls->fs; |
955 | check_condition(ls, fs->f->is_vararg, | 955 | check_condition(ls, fs->f->is_vararg, |
956 | "cannot use " LUA_QL("...") " outside a vararg function"); | 956 | "cannot use '...' outside a vararg function"); |
957 | init_exp(v, VVARARG, luaK_codeABC(fs, OP_VARARG, 0, 1, 0)); | 957 | init_exp(v, VVARARG, luaK_codeABC(fs, OP_VARARG, 0, 1, 0)); |
958 | break; | 958 | break; |
959 | } | 959 | } |
@@ -1200,7 +1200,7 @@ static void checkrepeated (FuncState *fs, Labellist *ll, TString *label) { | |||
1200 | for (i = fs->bl->firstlabel; i < ll->n; i++) { | 1200 | for (i = fs->bl->firstlabel; i < ll->n; i++) { |
1201 | if (eqstr(label, ll->arr[i].name)) { | 1201 | if (eqstr(label, ll->arr[i].name)) { |
1202 | const char *msg = luaO_pushfstring(fs->ls->L, | 1202 | const char *msg = luaO_pushfstring(fs->ls->L, |
1203 | "label " LUA_QS " already defined on line %d", | 1203 | "label '%s' already defined on line %d", |
1204 | getstr(label), ll->arr[i].line); | 1204 | getstr(label), ll->arr[i].line); |
1205 | semerror(fs->ls, msg); | 1205 | semerror(fs->ls, msg); |
1206 | } | 1206 | } |
@@ -1367,7 +1367,7 @@ static void forstat (LexState *ls, int line) { | |||
1367 | switch (ls->t.token) { | 1367 | switch (ls->t.token) { |
1368 | case '=': fornum(ls, varname, line); break; | 1368 | case '=': fornum(ls, varname, line); break; |
1369 | case ',': case TK_IN: forlist(ls, varname); break; | 1369 | case ',': case TK_IN: forlist(ls, varname); break; |
1370 | default: luaX_syntaxerror(ls, LUA_QL("=") " or " LUA_QL("in") " expected"); | 1370 | default: luaX_syntaxerror(ls, "'=' or 'in' expected"); |
1371 | } | 1371 | } |
1372 | check_match(ls, TK_END, TK_FOR, line); | 1372 | check_match(ls, TK_END, TK_FOR, line); |
1373 | leaveblock(fs); /* loop scope (`break' jumps to this point) */ | 1373 | leaveblock(fs); /* loop scope (`break' jumps to this point) */ |