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