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