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