** Check whether 'status' signals a syntax error and the error ** message at the top of the stack ends with the above mark for ** incomplete statements. */
| 287 | ** incomplete statements. |
| 288 | */ |
| 289 | static int incomplete(lua_State *L, int status) { |
| 290 | if (status == LUA_ERRSYNTAX) { |
| 291 | size_t lmsg; |
| 292 | const char *msg = lua_tolstring(L, -1, &lmsg); |
| 293 | if (lmsg >= marklen && strcmp(msg + lmsg - marklen, EOFMARK) == 0) { |
| 294 | lua_pop(L, 1); |
| 295 | return 1; |
| 296 | } |
| 297 | } |
| 298 | return 0; /* else... */ |
| 299 | } |
| 300 | |
| 301 | |
| 302 | /* |
no test coverage detected