aboutsummaryrefslogtreecommitdiff
path: root/test/unit/viml/helpers.lua
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2017-11-12 02:18:43 +0300
committerZyX <kp-pav@yandex.ru>2017-11-12 02:18:43 +0300
commitc7495ebcc0918ffd682083408895451318e41d1f (patch)
treea5868eb68f0308c8ce5eae057aa47f9adb6ab36d /test/unit/viml/helpers.lua
parent1aa6276c29d562a6287519e6755a613eabca5c31 (diff)
downloadrneovim-c7495ebcc0918ffd682083408895451318e41d1f.tar.gz
rneovim-c7495ebcc0918ffd682083408895451318e41d1f.tar.bz2
rneovim-c7495ebcc0918ffd682083408895451318e41d1f.zip
viml/parser/expressions: Add support for parsing assignments
Diffstat (limited to 'test/unit/viml/helpers.lua')
-rw-r--r--test/unit/viml/helpers.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/unit/viml/helpers.lua b/test/unit/viml/helpers.lua
index 9d2d7b61c7..9d8102e023 100644
--- a/test/unit/viml/helpers.lua
+++ b/test/unit/viml/helpers.lua
@@ -107,6 +107,18 @@ local function conv_ccs(ccs)
return conv_enum(ccs_tab, ccs)
end
+local expr_asgn_type_tab
+make_enum_conv_tab(lib, {
+ 'kExprAsgnPlain',
+ 'kExprAsgnAdd',
+ 'kExprAsgnSubtract',
+ 'kExprAsgnConcat',
+}, 'kExprAsgn', function(ret) expr_asgn_type_tab = ret end)
+
+local function conv_expr_asgn_type(expr_asgn_type)
+ return conv_enum(expr_asgn_type_tab, expr_asgn_type)
+end
+
return {
conv_ccs = conv_ccs,
pline2lua = pline2lua,
@@ -114,4 +126,5 @@ return {
new_pstate = new_pstate,
conv_cmp_type = conv_cmp_type,
pstate_set_str = pstate_set_str,
+ conv_expr_asgn_type = conv_expr_asgn_type,
}