mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 14:38:32 +00:00
treesitter: fix lint
This commit is contained in:
@@ -387,8 +387,9 @@ static int parser_edit(lua_State *L)
|
||||
static int parser_set_ranges(lua_State *L)
|
||||
{
|
||||
if (lua_gettop(L) < 2) {
|
||||
lua_pushstring(L, "not enough args to parser:set_included_ranges()");
|
||||
return lua_error(L);
|
||||
return luaL_error(
|
||||
L,
|
||||
"not enough args to parser:set_included_ranges()");
|
||||
}
|
||||
|
||||
TSLua_parser *p = parser_check(L);
|
||||
@@ -397,8 +398,9 @@ static int parser_set_ranges(lua_State *L)
|
||||
}
|
||||
|
||||
if (!lua_istable(L, 2)) {
|
||||
lua_pushstring(L, "argument for parser:set_included_ranges() should be a table.");
|
||||
return lua_error(L);
|
||||
return luaL_error(
|
||||
L,
|
||||
"argument for parser:set_included_ranges() should be a table.");
|
||||
}
|
||||
|
||||
size_t tbl_len = lua_objlen(L, 2);
|
||||
@@ -411,18 +413,16 @@ static int parser_set_ranges(lua_State *L)
|
||||
|
||||
if (!lua_istable(L, -1)) {
|
||||
xfree(ranges);
|
||||
lua_pushstring(
|
||||
return luaL_error(
|
||||
L,
|
||||
"argument for parser:set_included_ranges() should be a table of tables.");
|
||||
return lua_error(L);
|
||||
}
|
||||
|
||||
if (lua_objlen(L, -1) != 2) {
|
||||
xfree(ranges);
|
||||
lua_pushstring(
|
||||
return luaL_error(
|
||||
L,
|
||||
"argument for parser:set_included_ranges() should be a table of ranges of 2 elements.");
|
||||
return lua_error(L);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user