mirror of https://github.com/rusefi/lua.git
detail (breaking a long line)
This commit is contained in:
parent
b6e9fcbd70
commit
0d00729e31
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lparser.c,v 2.82 2010/04/05 16:35:37 roberto Exp roberto $
|
** $Id: lparser.c,v 2.83 2010/04/17 12:46:32 roberto Exp roberto $
|
||||||
** Lua Parser
|
** Lua Parser
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -74,9 +74,10 @@ static void error_expected (LexState *ls, int token) {
|
||||||
|
|
||||||
static void errorlimit (FuncState *fs, int limit, const char *what) {
|
static void errorlimit (FuncState *fs, int limit, const char *what) {
|
||||||
const char *msg;
|
const char *msg;
|
||||||
const char *where = (fs->f->linedefined == 0) ?
|
int line = fs->f->linedefined;
|
||||||
"main function" :
|
const char *where = (line == 0)
|
||||||
luaO_pushfstring(fs->L, "function at line %d", fs->f->linedefined);
|
? "main function"
|
||||||
|
: luaO_pushfstring(fs->L, "function at line %d", line);
|
||||||
msg = luaO_pushfstring(fs->L, "too many %s (limit is %d) in %s",
|
msg = luaO_pushfstring(fs->L, "too many %s (limit is %d) in %s",
|
||||||
what, limit, where);
|
what, limit, where);
|
||||||
luaX_syntaxerror(fs->ls, msg);
|
luaX_syntaxerror(fs->ls, msg);
|
||||||
|
|
Loading…
Reference in New Issue