Explorar o código

more uses of 'l_noret'

Roberto Ierusalimschy %!s(int64=13) %!d(string=hai) anos
pai
achega
6d8b672094
Modificáronse 4 ficheiros con 14 adicións e 16 borrados
  1. 3 3
      ldebug.c
  2. 4 4
      llex.c
  3. 2 2
      llex.h
  4. 5 7
      lparser.c

+ 3 - 3
ldebug.c

@@ -1,5 +1,5 @@
 /*
-** $Id: ldebug.c,v 2.86 2011/09/13 18:05:59 roberto Exp roberto $
+** $Id: ldebug.c,v 2.87 2011/10/07 20:45:19 roberto Exp roberto $
 ** Debug Interface
 ** See Copyright Notice in lua.h
 */
@@ -494,7 +494,7 @@ static const char *getupvalname (CallInfo *ci, const TValue *o,
 }
 
 
-void luaG_typeerror (lua_State *L, const TValue *o, const char *op) {
+l_noret luaG_typeerror (lua_State *L, const TValue *o, const char *op) {
   CallInfo *ci = L->ci;
   const char *name = NULL;
   const char *t = objtypename(o);
@@ -513,7 +513,7 @@ void luaG_typeerror (lua_State *L, const TValue *o, const char *op) {
 }
 
 
-void luaG_concaterror (lua_State *L, StkId p1, StkId p2) {
+l_noret luaG_concaterror (lua_State *L, StkId p1, StkId p2) {
   if (ttisstring(p1) || ttisnumber(p1)) p1 = p2;
   lua_assert(!ttisstring(p1) && !ttisnumber(p2));
   luaG_typeerror(L, p1, "concatenate");

+ 4 - 4
llex.c

@@ -1,5 +1,5 @@
 /*
-** $Id: llex.c,v 2.57 2011/08/11 17:06:12 roberto Exp roberto $
+** $Id: llex.c,v 2.58 2011/08/15 19:41:58 roberto Exp roberto $
 ** Lexical Analyzer
 ** See Copyright Notice in lua.h
 */
@@ -46,7 +46,7 @@ static const char *const luaX_tokens [] = {
 #define save_and_next(ls) (save(ls, ls->current), next(ls))
 
 
-static void lexerror (LexState *ls, const char *msg, int token);
+static l_noret lexerror (LexState *ls, const char *msg, int token);
 
 
 static void save (LexState *ls, int c) {
@@ -101,7 +101,7 @@ static const char *txtToken (LexState *ls, int token) {
 }
 
 
-static void lexerror (LexState *ls, const char *msg, int token) {
+static l_noret lexerror (LexState *ls, const char *msg, int token) {
   char buff[LUA_IDSIZE];
   luaO_chunkid(buff, getstr(ls->source), LUA_IDSIZE);
   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) {
 }
 
 
-void luaX_syntaxerror (LexState *ls, const char *msg) {
+l_noret luaX_syntaxerror (LexState *ls, const char *msg) {
   lexerror(ls, msg, ls->t.token);
 }
 

+ 2 - 2
llex.h

@@ -1,5 +1,5 @@
 /*
-** $Id: llex.h,v 1.70 2011/05/03 15:51:16 roberto Exp roberto $
+** $Id: llex.h,v 1.71 2011/06/20 16:52:48 roberto Exp roberto $
 ** Lexical Analyzer
 ** See Copyright Notice in lua.h
 */
@@ -71,7 +71,7 @@ LUAI_FUNC void luaX_setinput (lua_State *L, LexState *ls, ZIO *z,
 LUAI_FUNC TString *luaX_newstring (LexState *ls, const char *str, size_t l);
 LUAI_FUNC void luaX_next (LexState *ls);
 LUAI_FUNC int luaX_lookahead (LexState *ls);
-LUAI_FUNC void luaX_syntaxerror (LexState *ls, const char *s);
+LUAI_FUNC l_noret luaX_syntaxerror (LexState *ls, const char *s);
 LUAI_FUNC const char *luaX_token2str (LexState *ls, int token);
 
 

+ 5 - 7
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 <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;
     }
   }
 }