diff options
Diffstat (limited to 'src/lparser.c')
| -rw-r--r-- | src/lparser.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/lparser.c b/src/lparser.c index a53a9312..c294a373 100644 --- a/src/lparser.c +++ b/src/lparser.c @@ -1,5 +1,5 @@ /* -** $Id: lparser.c,v 2.122 2011/10/31 17:46:04 roberto Exp $ +** $Id: lparser.c,v 2.123 2011/11/30 12:43:51 roberto Exp $ ** Lua Parser ** See Copyright Notice in lua.h */ @@ -68,19 +68,19 @@ static void anchor_token (LexState *ls) { /* semantic error */ -static void semerror (LexState *ls, const char *msg) { +static l_noret semerror (LexState *ls, const char *msg) { ls->t.token = 0; /* remove 'near to' from final message */ luaX_syntaxerror(ls, msg); } -static void error_expected (LexState *ls, int token) { +static l_noret error_expected (LexState *ls, int token) { luaX_syntaxerror(ls, luaO_pushfstring(ls->L, "%s expected", luaX_token2str(ls, token))); } -static void errorlimit (FuncState *fs, int limit, const char *what) { +static l_noret errorlimit (FuncState *fs, int limit, const char *what) { lua_State *L = fs->ls->L; const char *msg; int line = fs->f->linedefined; @@ -460,7 +460,7 @@ static void breaklabel (LexState *ls) { ** generates an error for an undefined 'goto'; choose appropriate ** message when label name is a reserved word (which can only be 'break') */ -static void undefgoto (LexState *ls, Labeldesc *gt) { +static l_noret undefgoto (LexState *ls, Labeldesc *gt) { const char *msg = (gt->name->tsv.reserved > 0) ? "<%s> at line %d not inside a loop" : "no visible label " LUA_QS " for <goto> at line %d"; @@ -852,7 +852,6 @@ static void funcargs (LexState *ls, expdesc *f, int line) { } default: { luaX_syntaxerror(ls, "function arguments expected"); - return; } } lua_assert(f->k == VNONRELOC); @@ -897,7 +896,6 @@ static void prefixexp (LexState *ls, expdesc *v) { } default: { luaX_syntaxerror(ls, "unexpected symbol"); - return; } } } |
