** 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. */
| 436 | ** incomplete statements. |
| 437 | */ |
| 438 | static int incomplete (lua_State *L, int status) { |
| 439 | if (status == LUA_ERRSYNTAX) { |
| 440 | size_t lmsg; |
| 441 | const char *msg = lua_tolstring(L, -1, &lmsg); |
| 442 | if (lmsg >= marklen && strcmp(msg + lmsg - marklen, EOFMARK) == 0) { |
| 443 | lua_pop(L, 1); |
| 444 | return 1; |
| 445 | } |
| 446 | } |
| 447 | return 0; /* else... */ |
| 448 | } |
| 449 | |
| 450 | |
| 451 | /* |
no test coverage detected