Skip to content

Commit

Permalink
Rename error and target mapper functions
Browse files Browse the repository at this point in the history
  • Loading branch information
julianolf committed Mar 4, 2024
1 parent 891fd9b commit 82fe696
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lua/dap-lldb.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ local function find_codelldb()
return nil
end

local function compiler_errors(input)
local function compiler_error(input)
local _, json = pcall(vim.fn.json_decode, input)

if type(json) == "table" and json.reason == "compiler-message" then
Expand All @@ -29,7 +29,7 @@ local function compiler_errors(input)
return nil
end

local function compiler_targets(input)
local function compiler_target(input)
local _, json = pcall(vim.fn.json_decode, input)

if
Expand All @@ -55,12 +55,12 @@ local function list_targets(selection)
local out = vim.fn.systemlist(cmd)

if vim.v.shell_error ~= 0 then
local errors = vim.tbl_map(compiler_errors, out)
local errors = vim.tbl_map(compiler_error, out)
vim.notify(table.concat(errors, "\n"), vim.log.levels.ERROR)
return nil
end

return vim.tbl_map(compiler_targets, out)
return vim.tbl_map(compiler_target, out)
end

local function select_target(selection)
Expand Down

0 comments on commit 82fe696

Please sign in to comment.