mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 06:58:35 +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)
|
static int parser_set_ranges(lua_State *L)
|
||||||
{
|
{
|
||||||
if (lua_gettop(L) < 2) {
|
if (lua_gettop(L) < 2) {
|
||||||
lua_pushstring(L, "not enough args to parser:set_included_ranges()");
|
return luaL_error(
|
||||||
return lua_error(L);
|
L,
|
||||||
|
"not enough args to parser:set_included_ranges()");
|
||||||
}
|
}
|
||||||
|
|
||||||
TSLua_parser *p = parser_check(L);
|
TSLua_parser *p = parser_check(L);
|
||||||
@@ -397,8 +398,9 @@ static int parser_set_ranges(lua_State *L)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!lua_istable(L, 2)) {
|
if (!lua_istable(L, 2)) {
|
||||||
lua_pushstring(L, "argument for parser:set_included_ranges() should be a table.");
|
return luaL_error(
|
||||||
return lua_error(L);
|
L,
|
||||||
|
"argument for parser:set_included_ranges() should be a table.");
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t tbl_len = lua_objlen(L, 2);
|
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)) {
|
if (!lua_istable(L, -1)) {
|
||||||
xfree(ranges);
|
xfree(ranges);
|
||||||
lua_pushstring(
|
return luaL_error(
|
||||||
L,
|
L,
|
||||||
"argument for parser:set_included_ranges() should be a table of tables.");
|
"argument for parser:set_included_ranges() should be a table of tables.");
|
||||||
return lua_error(L);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lua_objlen(L, -1) != 2) {
|
if (lua_objlen(L, -1) != 2) {
|
||||||
xfree(ranges);
|
xfree(ranges);
|
||||||
lua_pushstring(
|
return luaL_error(
|
||||||
L,
|
L,
|
||||||
"argument for parser:set_included_ranges() should be a table of ranges of 2 elements.");
|
"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