aboutsummaryrefslogtreecommitdiff
path: root/scripts/genvimvim.lua
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/genvimvim.lua')
-rw-r--r--scripts/genvimvim.lua22
1 files changed, 6 insertions, 16 deletions
diff --git a/scripts/genvimvim.lua b/scripts/genvimvim.lua
index 667af7be6c..729749a52f 100644
--- a/scripts/genvimvim.lua
+++ b/scripts/genvimvim.lua
@@ -23,6 +23,7 @@ end
local options = require('options')
local auevents = require('auevents')
local ex_cmds = require('ex_cmds')
+local eval = require('eval')
local cmd_kw = function(prev_cmd, cmd)
if not prev_cmd then
@@ -113,23 +114,12 @@ local vimfun_start = 'syn keyword vimFuncName contained '
w('\n\n' .. vimfun_start)
eval_fd = io.open(nvimsrcdir .. '/eval.c', 'r')
local started = 0
-for line in eval_fd:lines() do
- if line == '} functions[] =' then
- started = 1
- elseif started == 1 then
- assert (line == '{')
- started = 2
- elseif started == 2 then
- if line == '};' then
- break
- end
- local func_name = line:match('^ { "([%w_]+)",')
- if func_name then
- if lld.line_length > 850 then
- w('\n' .. vimfun_start)
- end
- w(' ' .. func_name)
+for name, def in pairs(eval.funcs) do
+ if name then
+ if lld.line_length > 850 then
+ w('\n' .. vimfun_start)
end
+ w(' ' .. name)
end
end
eval_fd:close()