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 /lparser.c | |
| parent | e21b26a964774e29f24e5f6ae97808fdb5bce9d5 (diff) | |
| download | lua-6d8b67209443e03d83cb7b6306dc0ef098d0f1f8.tar.gz lua-6d8b67209443e03d83cb7b6306dc0ef098d0f1f8.tar.bz2 lua-6d8b67209443e03d83cb7b6306dc0ef098d0f1f8.zip | |
more uses of 'l_noret'
Diffstat (limited to 'lparser.c')
| -rw-r--r-- | lparser.c | 12 |
1 files changed, 5 insertions, 7 deletions
| @@ -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 | } |
