** 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. */
| 289 | ** incomplete statements. |
| 290 | */ |
| 291 | static int incomplete (lua_State *L, int status) { |
| 292 | if (status == LUA_ERRSYNTAX) { |
| 293 | size_t lmsg; |
| 294 | const char *msg = lua_tolstring(L, -1, &lmsg); |
| 295 | if (lmsg >= marklen && strcmp(msg + lmsg - marklen, EOFMARK) == 0) { |
| 296 | lua_pop(L, 1); |
| 297 | return 1; |
| 298 | } |
| 299 | } |
| 300 | return 0; /* else... */ |
| 301 | } |
| 302 | |
| 303 | |
| 304 | /* |
no test coverage detected