diff options
author | ZyX <kp-pav@yandex.ru> | 2017-10-30 01:48:32 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-11-06 01:17:37 +0300 |
commit | 3ecb95298ffd9ef6ee681876f2d32553fd222b96 (patch) | |
tree | 0085994aa9e95957abef84f84a6b29714a31d53c /test/unit/viml/expressions/parser_spec.lua | |
parent | 0356dbbb36ffa7934c35e9dbfc6667f9118c244f (diff) | |
download | rneovim-3ecb95298ffd9ef6ee681876f2d32553fd222b96.tar.gz rneovim-3ecb95298ffd9ef6ee681876f2d32553fd222b96.tar.bz2 rneovim-3ecb95298ffd9ef6ee681876f2d32553fd222b96.zip |
tests: Fix testlint errors
Diffstat (limited to 'test/unit/viml/expressions/parser_spec.lua')
-rw-r--r-- | test/unit/viml/expressions/parser_spec.lua | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/test/unit/viml/expressions/parser_spec.lua b/test/unit/viml/expressions/parser_spec.lua index 019fe69046..df69c60dd0 100644 --- a/test/unit/viml/expressions/parser_spec.lua +++ b/test/unit/viml/expressions/parser_spec.lua @@ -14,7 +14,6 @@ local ffi = helpers.ffi local eq = helpers.eq local conv_ccs = viml_helpers.conv_ccs -local pline2lua = viml_helpers.pline2lua local new_pstate = viml_helpers.new_pstate local intchar2lua = viml_helpers.intchar2lua local conv_cmp_type = viml_helpers.conv_cmp_type @@ -174,10 +173,7 @@ local function eastnode2lua(pstate, eastnode, checked_nodes) ffi.string(eastnode.data.env.ident, eastnode.data.env.ident_len)) end ret_str = typ .. ':' .. ret_str - local can_simplify = true - for k, v in pairs(ret) do - can_simplify = false - end + local can_simplify = not ret.children if can_simplify then ret = ret_str else @@ -218,12 +214,11 @@ local function phl2lua(pstate) pstate, chunk.start, chunk.end_col - chunk.start.col, { group = ffi.string(chunk.group), }) - chunk_str = ('%s:%u:%u:%s'):format( + ret[i + 1] = ('%s:%u:%u:%s'):format( chunk_tbl.group, chunk_tbl.start.line, chunk_tbl.start.col, chunk_tbl.str) - ret[i + 1] = chunk_str end return ret end |