Lots of work on the lua read-eval-print loop
This commit is contained in:
@@ -336,7 +336,7 @@ eng::string LuaCoreStack::load(LuaSlot result, std::string_view code, std::strin
|
||||
const char *str = lua_tolstring(L_, -1, &len);
|
||||
eng::string message(str, len);
|
||||
lua_pop(L_, 1);
|
||||
if (sv::has_suffix(message, "near <eof>"))
|
||||
if (sv::has_suffix(message, "near <eof>") && sv::is_possible_long_lua_expression(code))
|
||||
{
|
||||
message = "truncated lua";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user