MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / get_prompt

Function get_prompt

third-party/lua-5.3.5/src/lua.c:273–279  ·  view source on GitHub ↗

** Returns the string to be used as a prompt by the interpreter. */

Source from the content-addressed store, hash-verified

271** Returns the string to be used as a prompt by the interpreter.
272*/
273static 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>"

Callers 1

pushlineFunction · 0.70

Calls 1

lua_getglobalFunction · 0.70

Tested by

no test coverage detected