| 100 | |
| 101 | |
| 102 | void luaX_lexerror (LexState *ls, const char *msg, int token) { |
| 103 | char buff[MAXSRC]; |
| 104 | luaO_chunkid(buff, getstr(ls->source), MAXSRC); |
| 105 | msg = luaO_pushfstring(ls->L, "%s:%d: %s", buff, ls->linenumber, msg); |
| 106 | if (token) |
| 107 | luaO_pushfstring(ls->L, "%s near " LUA_QS, msg, txtToken(ls, token)); |
| 108 | luaD_throw(ls->L, LUA_ERRSYNTAX); |
| 109 | } |
| 110 | |
| 111 | |
| 112 | void luaX_syntaxerror (LexState *ls, const char *msg) { |
no test coverage detected