diff options
author | ZyX <kp-pav@yandex.ru> | 2016-01-01 12:17:22 +0300 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2016-08-31 21:40:20 +0200 |
commit | 8fb7273ac0b981eeb9afdc82675b908c1600d34f (patch) | |
tree | f59ff8bf7226a85817e29dac7d564a54662e71b1 /scripts/genvimvim.lua | |
parent | 0ade1bb7067d0cdb9b059fb66a8c4b868408be9c (diff) | |
download | rneovim-8fb7273ac0b981eeb9afdc82675b908c1600d34f.tar.gz rneovim-8fb7273ac0b981eeb9afdc82675b908c1600d34f.tar.bz2 rneovim-8fb7273ac0b981eeb9afdc82675b908c1600d34f.zip |
eval: Move VimL functions list to a lua file
Removes all kinds of problems with sorting, provides a ready-to-use function
list representation for genvimvim.lua, does not require specifying function name
twice (VimL function name (string) + f_ function name).
Diffstat (limited to 'scripts/genvimvim.lua')
-rw-r--r-- | scripts/genvimvim.lua | 22 |
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() |