mirror of https://github.com/rusefi/lua.git
comments
This commit is contained in:
parent
69ba1ac441
commit
058279d548
12
lparser.c
12
lparser.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lparser.c,v 2.83 2010/04/17 12:46:32 roberto Exp roberto $
|
** $Id: lparser.c,v 2.84 2010/05/13 12:03:26 roberto Exp roberto $
|
||||||
** Lua Parser
|
** Lua Parser
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -1316,7 +1316,6 @@ static void retstat (LexState *ls) {
|
||||||
FuncState *fs = ls->fs;
|
FuncState *fs = ls->fs;
|
||||||
expdesc e;
|
expdesc e;
|
||||||
int first, nret; /* registers with returned values */
|
int first, nret; /* registers with returned values */
|
||||||
luaX_next(ls); /* skip RETURN */
|
|
||||||
if (block_follow(ls->t.token) || ls->t.token == ';')
|
if (block_follow(ls->t.token) || ls->t.token == ';')
|
||||||
first = nret = 0; /* return no values */
|
first = nret = 0; /* return no values */
|
||||||
else {
|
else {
|
||||||
|
@ -1372,8 +1371,8 @@ static int statement (LexState *ls) {
|
||||||
repeatstat(ls, line);
|
repeatstat(ls, line);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
case TK_FUNCTION: {
|
case TK_FUNCTION: { /* stat -> funcstat */
|
||||||
funcstat(ls, line); /* stat -> funcstat */
|
funcstat(ls, line);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
case TK_LOCAL: { /* stat -> localstat */
|
case TK_LOCAL: { /* stat -> localstat */
|
||||||
|
@ -1385,6 +1384,7 @@ static int statement (LexState *ls) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
case TK_RETURN: { /* stat -> retstat */
|
case TK_RETURN: { /* stat -> retstat */
|
||||||
|
luaX_next(ls); /* skip RETURN */
|
||||||
retstat(ls);
|
retstat(ls);
|
||||||
return 1; /* must be last statement */
|
return 1; /* must be last statement */
|
||||||
}
|
}
|
||||||
|
@ -1393,9 +1393,9 @@ static int statement (LexState *ls) {
|
||||||
breakstat(ls);
|
breakstat(ls);
|
||||||
return 1; /* must be last statement */
|
return 1; /* must be last statement */
|
||||||
}
|
}
|
||||||
default: {
|
default: { /* stat -> func | assignment */
|
||||||
exprstat(ls);
|
exprstat(ls);
|
||||||
return 0; /* to avoid warnings */
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue