From 6d8b67209443e03d83cb7b6306dc0ef098d0f1f8 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 30 Nov 2011 10:43:51 -0200 Subject: more uses of 'l_noret' --- lparser.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'lparser.c') diff --git a/lparser.c b/lparser.c index 69168a16..08d19045 100644 --- a/lparser.c +++ b/lparser.c @@ -1,5 +1,5 @@ /* -** $Id: lparser.c,v 2.121 2011/10/24 14:51:44 roberto Exp roberto $ +** $Id: lparser.c,v 2.122 2011/10/31 17:46:04 roberto Exp roberto $ ** 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 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; } } } -- cgit v1.2.3-55-g6feb