diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-11-30 10:43:51 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-11-30 10:43:51 -0200 |
commit | 6d8b67209443e03d83cb7b6306dc0ef098d0f1f8 (patch) | |
tree | e7c9e14b1529483132a714eb9c5ffeeeb2dc825b | |
parent | e21b26a964774e29f24e5f6ae97808fdb5bce9d5 (diff) | |
download | lua-6d8b67209443e03d83cb7b6306dc0ef098d0f1f8.tar.gz lua-6d8b67209443e03d83cb7b6306dc0ef098d0f1f8.tar.bz2 lua-6d8b67209443e03d83cb7b6306dc0ef098d0f1f8.zip |
more uses of 'l_noret'
-rw-r--r-- | ldebug.c | 6 | ||||
-rw-r--r-- | llex.c | 8 | ||||
-rw-r--r-- | llex.h | 4 | ||||
-rw-r--r-- | lparser.c | 12 |
4 files changed, 14 insertions, 16 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldebug.c,v 2.86 2011/09/13 18:05:59 roberto Exp roberto $ | 2 | ** $Id: ldebug.c,v 2.87 2011/10/07 20:45:19 roberto Exp roberto $ |
3 | ** Debug Interface | 3 | ** Debug Interface |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -494,7 +494,7 @@ static const char *getupvalname (CallInfo *ci, const TValue *o, | |||
494 | } | 494 | } |
495 | 495 | ||
496 | 496 | ||
497 | void luaG_typeerror (lua_State *L, const TValue *o, const char *op) { | 497 | l_noret luaG_typeerror (lua_State *L, const TValue *o, const char *op) { |
498 | CallInfo *ci = L->ci; | 498 | CallInfo *ci = L->ci; |
499 | const char *name = NULL; | 499 | const char *name = NULL; |
500 | const char *t = objtypename(o); | 500 | const char *t = objtypename(o); |
@@ -513,7 +513,7 @@ void luaG_typeerror (lua_State *L, const TValue *o, const char *op) { | |||
513 | } | 513 | } |
514 | 514 | ||
515 | 515 | ||
516 | void luaG_concaterror (lua_State *L, StkId p1, StkId p2) { | 516 | l_noret luaG_concaterror (lua_State *L, StkId p1, StkId p2) { |
517 | if (ttisstring(p1) || ttisnumber(p1)) p1 = p2; | 517 | if (ttisstring(p1) || ttisnumber(p1)) p1 = p2; |
518 | lua_assert(!ttisstring(p1) && !ttisnumber(p2)); | 518 | lua_assert(!ttisstring(p1) && !ttisnumber(p2)); |
519 | luaG_typeerror(L, p1, "concatenate"); | 519 | luaG_typeerror(L, p1, "concatenate"); |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: llex.c,v 2.57 2011/08/11 17:06:12 roberto Exp roberto $ | 2 | ** $Id: llex.c,v 2.58 2011/08/15 19:41:58 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 | */ |
@@ -46,7 +46,7 @@ static const char *const luaX_tokens [] = { | |||
46 | #define save_and_next(ls) (save(ls, ls->current), next(ls)) | 46 | #define save_and_next(ls) (save(ls, ls->current), next(ls)) |
47 | 47 | ||
48 | 48 | ||
49 | static void lexerror (LexState *ls, const char *msg, int token); | 49 | static l_noret lexerror (LexState *ls, const char *msg, int token); |
50 | 50 | ||
51 | 51 | ||
52 | static void save (LexState *ls, int c) { | 52 | static void save (LexState *ls, int c) { |
@@ -101,7 +101,7 @@ static const char *txtToken (LexState *ls, int token) { | |||
101 | } | 101 | } |
102 | 102 | ||
103 | 103 | ||
104 | static void lexerror (LexState *ls, const char *msg, int token) { | 104 | static l_noret lexerror (LexState *ls, const char *msg, int token) { |
105 | char buff[LUA_IDSIZE]; | 105 | char buff[LUA_IDSIZE]; |
106 | luaO_chunkid(buff, getstr(ls->source), LUA_IDSIZE); | 106 | luaO_chunkid(buff, getstr(ls->source), LUA_IDSIZE); |
107 | msg = luaO_pushfstring(ls->L, "%s:%d: %s", buff, ls->linenumber, msg); | 107 | msg = luaO_pushfstring(ls->L, "%s:%d: %s", buff, ls->linenumber, msg); |
@@ -111,7 +111,7 @@ static void lexerror (LexState *ls, const char *msg, int token) { | |||
111 | } | 111 | } |
112 | 112 | ||
113 | 113 | ||
114 | void luaX_syntaxerror (LexState *ls, const char *msg) { | 114 | l_noret luaX_syntaxerror (LexState *ls, const char *msg) { |
115 | lexerror(ls, msg, ls->t.token); | 115 | lexerror(ls, msg, ls->t.token); |
116 | } | 116 | } |
117 | 117 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: llex.h,v 1.70 2011/05/03 15:51:16 roberto Exp roberto $ | 2 | ** $Id: llex.h,v 1.71 2011/06/20 16:52:48 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 | */ |
@@ -71,7 +71,7 @@ LUAI_FUNC void luaX_setinput (lua_State *L, LexState *ls, ZIO *z, | |||
71 | LUAI_FUNC TString *luaX_newstring (LexState *ls, const char *str, size_t l); | 71 | LUAI_FUNC TString *luaX_newstring (LexState *ls, const char *str, size_t l); |
72 | LUAI_FUNC void luaX_next (LexState *ls); | 72 | LUAI_FUNC void luaX_next (LexState *ls); |
73 | LUAI_FUNC int luaX_lookahead (LexState *ls); | 73 | LUAI_FUNC int luaX_lookahead (LexState *ls); |
74 | LUAI_FUNC void luaX_syntaxerror (LexState *ls, const char *s); | 74 | LUAI_FUNC l_noret luaX_syntaxerror (LexState *ls, const char *s); |
75 | LUAI_FUNC const char *luaX_token2str (LexState *ls, int token); | 75 | LUAI_FUNC const char *luaX_token2str (LexState *ls, int token); |
76 | 76 | ||
77 | 77 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lparser.c,v 2.121 2011/10/24 14:51:44 roberto Exp roberto $ | 2 | ** $Id: lparser.c,v 2.122 2011/10/31 17:46:04 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 | */ |
@@ -68,19 +68,19 @@ static void anchor_token (LexState *ls) { | |||
68 | 68 | ||
69 | 69 | ||
70 | /* semantic error */ | 70 | /* semantic error */ |
71 | static void semerror (LexState *ls, const char *msg) { | 71 | static l_noret semerror (LexState *ls, const char *msg) { |
72 | ls->t.token = 0; /* remove 'near to' from final message */ | 72 | ls->t.token = 0; /* remove 'near to' from final message */ |
73 | luaX_syntaxerror(ls, msg); | 73 | luaX_syntaxerror(ls, msg); |
74 | } | 74 | } |
75 | 75 | ||
76 | 76 | ||
77 | static void error_expected (LexState *ls, int token) { | 77 | static l_noret error_expected (LexState *ls, int token) { |
78 | luaX_syntaxerror(ls, | 78 | luaX_syntaxerror(ls, |
79 | luaO_pushfstring(ls->L, "%s expected", luaX_token2str(ls, token))); | 79 | luaO_pushfstring(ls->L, "%s expected", luaX_token2str(ls, token))); |
80 | } | 80 | } |
81 | 81 | ||
82 | 82 | ||
83 | static void errorlimit (FuncState *fs, int limit, const char *what) { | 83 | static l_noret errorlimit (FuncState *fs, int limit, const char *what) { |
84 | lua_State *L = fs->ls->L; | 84 | lua_State *L = fs->ls->L; |
85 | const char *msg; | 85 | const char *msg; |
86 | int line = fs->f->linedefined; | 86 | int line = fs->f->linedefined; |
@@ -460,7 +460,7 @@ static void breaklabel (LexState *ls) { | |||
460 | ** generates an error for an undefined 'goto'; choose appropriate | 460 | ** generates an error for an undefined 'goto'; choose appropriate |
461 | ** message when label name is a reserved word (which can only be 'break') | 461 | ** message when label name is a reserved word (which can only be 'break') |
462 | */ | 462 | */ |
463 | static void undefgoto (LexState *ls, Labeldesc *gt) { | 463 | static l_noret undefgoto (LexState *ls, Labeldesc *gt) { |
464 | const char *msg = (gt->name->tsv.reserved > 0) | 464 | const char *msg = (gt->name->tsv.reserved > 0) |
465 | ? "<%s> at line %d not inside a loop" | 465 | ? "<%s> at line %d not inside a loop" |
466 | : "no visible label " LUA_QS " for <goto> at line %d"; | 466 | : "no visible label " LUA_QS " for <goto> at line %d"; |
@@ -852,7 +852,6 @@ static void funcargs (LexState *ls, expdesc *f, int line) { | |||
852 | } | 852 | } |
853 | default: { | 853 | default: { |
854 | luaX_syntaxerror(ls, "function arguments expected"); | 854 | luaX_syntaxerror(ls, "function arguments expected"); |
855 | return; | ||
856 | } | 855 | } |
857 | } | 856 | } |
858 | lua_assert(f->k == VNONRELOC); | 857 | lua_assert(f->k == VNONRELOC); |
@@ -897,7 +896,6 @@ static void prefixexp (LexState *ls, expdesc *v) { | |||
897 | } | 896 | } |
898 | default: { | 897 | default: { |
899 | luaX_syntaxerror(ls, "unexpected symbol"); | 898 | luaX_syntaxerror(ls, "unexpected symbol"); |
900 | return; | ||
901 | } | 899 | } |
902 | } | 900 | } |
903 | } | 901 | } |