| 6813 | |
| 6814 | |
| 6815 | void luaX_lexerror (LexState *ls, const char *msg, int token) { |
| 6816 | char buff[MAXSRC]; |
| 6817 | luaO_chunkid(buff, getstr(ls->source), MAXSRC); |
| 6818 | msg = luaO_pushfstring(ls->L, "%s:%d: %s", buff, ls->linenumber, msg); |
| 6819 | if (token) |
| 6820 | luaO_pushfstring(ls->L, "%s near " LUA_QS, msg, txtToken(ls, token)); |
| 6821 | luaD_throw(ls->L, LUA_ERRSYNTAX); |
| 6822 | } |
| 6823 | |
| 6824 | |
| 6825 | void luaX_syntaxerror (LexState *ls, const char *msg) { |
no test coverage detected