MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / incomplete

Function incomplete

xrepo/packages/l/lua/port/lua/src/lua.c:470–480  ·  view source on GitHub ↗

** 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. */

Source from the content-addressed store, hash-verified

468** incomplete statements.
469*/
470static 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/*

Callers 1

multilineFunction · 0.85

Calls 1

lua_tolstringFunction · 0.70

Tested by

no test coverage detected