** Returns the string to be used as a prompt by the interpreter. */
| 269 | ** Returns the string to be used as a prompt by the interpreter. |
| 270 | */ |
| 271 | static const char *get_prompt(lua_State *L, int firstline) { |
| 272 | const char *p; |
| 273 | lua_getglobal(L, firstline ? "_PROMPT" : "_PROMPT2"); |
| 274 | p = lua_tostring(L, -1); |
| 275 | if (p == nullptr) p = (firstline ? LUA_PROMPT : LUA_PROMPT2); |
| 276 | return p; |
| 277 | } |
| 278 | |
| 279 | /* mark in error messages for incomplete statements */ |
| 280 | #define EOFMARK "<eof>" |
no test coverage detected