** Returns the string to be used as a prompt by the interpreter. */
| 418 | ** Returns the string to be used as a prompt by the interpreter. |
| 419 | */ |
| 420 | static const char *get_prompt (lua_State *L, int firstline) { |
| 421 | const char *p; |
| 422 | lua_getglobal(L, firstline ? "_PROMPT" : "_PROMPT2"); |
| 423 | p = lua_tostring(L, -1); |
| 424 | if (p == NULL) p = (firstline ? LUA_PROMPT : LUA_PROMPT2); |
| 425 | return p; |
| 426 | } |
| 427 | |
| 428 | /* mark in error messages for incomplete statements */ |
| 429 | #define EOFMARK "<eof>" |
no test coverage detected