| 161 | |
| 162 | |
| 163 | static int incomplete (lua_State *L, int status) { |
| 164 | if (status == LUA_ERRSYNTAX) { |
| 165 | size_t lmsg; |
| 166 | const char *msg = lua_tolstring(L, -1, &lmsg); |
| 167 | const char *tp = msg + lmsg - (sizeof(LUA_QL("<eof>")) - 1); |
| 168 | if (strstr(msg, LUA_QL("<eof>")) == tp) { |
| 169 | lua_pop(L, 1); |
| 170 | return 1; |
| 171 | } |
| 172 | } |
| 173 | return 0; /* else... */ |
| 174 | } |
| 175 | |
| 176 | |
| 177 | static int pushline (lua_State *L, int firstline) { |
no test coverage detected