** 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. */
| 487 | ** incomplete statements. |
| 488 | */ |
| 489 | static int incomplete (lua_State *L, int status) { |
| 490 | if (status == LUA_ERRSYNTAX) { |
| 491 | size_t lmsg; |
| 492 | const char *msg = lua_tolstring(L, -1, &lmsg); |
| 493 | if (lmsg >= marklen && strcmp(msg + lmsg - marklen, EOFMARK) == 0) { |
| 494 | lua_pop(L, 1); |
| 495 | return 1; |
| 496 | } |
| 497 | } |
| 498 | return 0; /* else... */ |
| 499 | } |
| 500 | |
| 501 | |
| 502 | /* |
no test coverage detected