mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 20:08:17 +00:00
*: Fix linter errors
This commit is contained in:
@@ -2014,17 +2014,20 @@ viml_pexpr_parse_process_token:
|
|||||||
lambda_node->data.fig.type_guesses.allow_lambda = false;
|
lambda_node->data.fig.type_guesses.allow_lambda = false;
|
||||||
if (lambda_node->children != NULL
|
if (lambda_node->children != NULL
|
||||||
&& lambda_node->children->type == kExprNodeComma) {
|
&& lambda_node->children->type == kExprNodeComma) {
|
||||||
// If lambda has comma child this means that parser has already seen at
|
// If lambda has comma child this means that parser has already seen
|
||||||
// least "{arg1,", so node cannot possibly be anything, but lambda.
|
// at least "{arg1,", so node cannot possibly be anything, but
|
||||||
|
// lambda.
|
||||||
|
|
||||||
// Vim may give E121 or E720 in this case, but it does not look right to
|
// Vim may give E121 or E720 in this case, but it does not look
|
||||||
// have either because both are results of reevaluation possibly-lambda
|
// right to have either because both are results of reevaluation
|
||||||
// node as a dictionary and here this is not going to happen.
|
// possibly-lambda node as a dictionary and here this is not going
|
||||||
|
// to happen.
|
||||||
ERROR_FROM_TOKEN_AND_MSG(
|
ERROR_FROM_TOKEN_AND_MSG(
|
||||||
cur_token, _("E15: Expected lambda arguments list or arrow: %.*s"));
|
cur_token,
|
||||||
|
_("E15: Expected lambda arguments list or arrow: %.*s"));
|
||||||
} else {
|
} else {
|
||||||
// Else it may appear that possibly-lambda node is actually a dictionary
|
// Else it may appear that possibly-lambda node is actually
|
||||||
// or curly-braces-name identifier.
|
// a dictionary or curly-braces-name identifier.
|
||||||
lambda_node = NULL;
|
lambda_node = NULL;
|
||||||
kv_drop(pt_stack, 1);
|
kv_drop(pt_stack, 1);
|
||||||
}
|
}
|
||||||
|
@@ -12,7 +12,6 @@ local request = helpers.request
|
|||||||
local meth_pcall = helpers.meth_pcall
|
local meth_pcall = helpers.meth_pcall
|
||||||
local command = helpers.command
|
local command = helpers.command
|
||||||
|
|
||||||
local REMOVE_THIS = global_helpers.REMOVE_THIS
|
|
||||||
local intchar2lua = global_helpers.intchar2lua
|
local intchar2lua = global_helpers.intchar2lua
|
||||||
local format_string = global_helpers.format_string
|
local format_string = global_helpers.format_string
|
||||||
local mergedicts_copy = global_helpers.mergedicts_copy
|
local mergedicts_copy = global_helpers.mergedicts_copy
|
||||||
|
@@ -522,7 +522,7 @@ local function fixtbl(tbl)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function fixtbl_rec(tbl)
|
local function fixtbl_rec(tbl)
|
||||||
for k, v in pairs(tbl) do
|
for _, v in pairs(tbl) do
|
||||||
if type(v) == 'table' then
|
if type(v) == 'table' then
|
||||||
fixtbl_rec(v)
|
fixtbl_rec(v)
|
||||||
end
|
end
|
||||||
|
@@ -7,7 +7,6 @@ local make_enum_conv_tab = helpers.make_enum_conv_tab
|
|||||||
local child_call_once = helpers.child_call_once
|
local child_call_once = helpers.child_call_once
|
||||||
local alloc_log_new = helpers.alloc_log_new
|
local alloc_log_new = helpers.alloc_log_new
|
||||||
local kvi_destroy = helpers.kvi_destroy
|
local kvi_destroy = helpers.kvi_destroy
|
||||||
local array_size = helpers.array_size
|
|
||||||
local conv_enum = helpers.conv_enum
|
local conv_enum = helpers.conv_enum
|
||||||
local debug_log = helpers.debug_log
|
local debug_log = helpers.debug_log
|
||||||
local ptr2key = helpers.ptr2key
|
local ptr2key = helpers.ptr2key
|
||||||
@@ -26,7 +25,6 @@ local mergedicts_copy = global_helpers.mergedicts_copy
|
|||||||
local format_string = global_helpers.format_string
|
local format_string = global_helpers.format_string
|
||||||
local format_luav = global_helpers.format_luav
|
local format_luav = global_helpers.format_luav
|
||||||
local intchar2lua = global_helpers.intchar2lua
|
local intchar2lua = global_helpers.intchar2lua
|
||||||
local REMOVE_THIS = global_helpers.REMOVE_THIS
|
|
||||||
local dictdiff = global_helpers.dictdiff
|
local dictdiff = global_helpers.dictdiff
|
||||||
|
|
||||||
local lib = cimport('./src/nvim/viml/parser/expressions.h',
|
local lib = cimport('./src/nvim/viml/parser/expressions.h',
|
||||||
@@ -147,12 +145,14 @@ child_call_once(function()
|
|||||||
-- nvim_hl_defs.
|
-- nvim_hl_defs.
|
||||||
eq(true, not not (nvim_hl_defs[grp_link]
|
eq(true, not not (nvim_hl_defs[grp_link]
|
||||||
or predefined_hl_defs[grp_link]))
|
or predefined_hl_defs[grp_link]))
|
||||||
|
eq(false, not not (nvim_hl_defs[new_grp]
|
||||||
|
or predefined_hl_defs[new_grp]))
|
||||||
nvim_hl_defs[new_grp] = {'link', grp_link}
|
nvim_hl_defs[new_grp] = {'link', grp_link}
|
||||||
else
|
else
|
||||||
local new_grp, grp_args = s:match('^(%w+) (.*)')
|
local new_grp, grp_args = s:match('^(%w+) (.*)')
|
||||||
neq(nil, new_grp)
|
neq(nil, new_grp)
|
||||||
eq(false, not not (nvim_hl_defs[grp_link]
|
eq(false, not not (nvim_hl_defs[new_grp]
|
||||||
or predefined_hl_defs[grp_link]))
|
or predefined_hl_defs[new_grp]))
|
||||||
nvim_hl_defs[new_grp] = {'definition', grp_args}
|
nvim_hl_defs[new_grp] = {'definition', grp_args}
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
@@ -206,7 +206,7 @@ local function format_check(expr, format_check_data, opts)
|
|||||||
-- That forces specific order.
|
-- That forces specific order.
|
||||||
local zflags = opts.flags[1]
|
local zflags = opts.flags[1]
|
||||||
local zdata = format_check_data[zflags]
|
local zdata = format_check_data[zflags]
|
||||||
local dig_len = 0
|
local dig_len
|
||||||
if opts.funcname then
|
if opts.funcname then
|
||||||
print(format_string('\n%s(%r, {', opts.funcname, expr))
|
print(format_string('\n%s(%r, {', opts.funcname, expr))
|
||||||
dig_len = #opts.funcname + 2
|
dig_len = #opts.funcname + 2
|
||||||
|
Reference in New Issue
Block a user