diff --git a/src/lib/lstrlib.c b/src/lib/lstrlib.c index 66e4368..4850157 100644 --- a/src/lib/lstrlib.c +++ b/src/lib/lstrlib.c @@ -743,6 +743,12 @@ static int str_format (lua_State *L) { } +static int str_lualex (lua_State *L) { + // TODO: Implement + return 1; +} + + static const luaL_reg strlib[] = { {"len", str_len}, {"sub", str_sub}, @@ -756,6 +762,7 @@ static const luaL_reg strlib[] = { {"find", str_find}, {"gfind", gfind}, {"gsub", str_gsub}, + {"lualex", str_lualex}, {NULL, NULL} }; diff --git a/test/faf.lua b/test/faf.lua index 7a09f21..8c226d8 100644 --- a/test/faf.lua +++ b/test/faf.lua @@ -120,6 +120,8 @@ assert(str:sub(2) == "bcdefghijklmnop") assert(str:sub(2, -2) == "bcdefghijklmno") assert(str:sub(2, 8) == "bcdefgh") +assert(str:lualex() == str) + local string_func_names = {} local n=0 @@ -129,6 +131,7 @@ for k in string do end assert(table.concat(string_func_names) == table.concat({ "sub", + "lualex", "gfind", "rep", "gsub",