** 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. */
| 461 | ** incomplete statements. |
| 462 | */ |
| 463 | static int incomplete (lua_State *L, int status) { |
| 464 | if (status == LUA_ERRSYNTAX) { |
| 465 | size_t lmsg; |
| 466 | const char *msg = lua_tolstring(L, -1, &lmsg); |
| 467 | if (lmsg >= marklen && strcmp(msg + lmsg - marklen, EOFMARK) == 0) { |
| 468 | lua_pop(L, 1); |
| 469 | return 1; |
| 470 | } |
| 471 | } |
| 472 | return 0; /* else... */ |
| 473 | } |
| 474 | |
| 475 | |
| 476 | /* |
no test coverage detected