MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / get_prompt

Function get_prompt

src/Chain/libraries/glua/lua.cpp:271–277  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

Callers 1

pushlineFunction · 0.70

Calls 1

lua_getglobalFunction · 0.85

Tested by

no test coverage detected