From 3164cf8f12f14b725b918e3170bb0a9085af8298 Mon Sep 17 00:00:00 2001 From: Yegappan Lakshmanan Date: Thu, 28 Mar 2024 10:36:42 +0100 Subject: patch 9.1.0219: Vim9: No enum support Problem: No enum support Solution: Implement enums for Vim9 script (Yegappan Lakshmanan) closes: #14224 Signed-off-by: Yegappan Lakshmanan Signed-off-by: Christian Brabandt --- runtime/doc/builtin.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'runtime/doc/builtin.txt') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index ec702201d5..1f7a4f1bd7 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -1,4 +1,4 @@ -*builtin.txt* For Vim version 9.1. Last change: 2024 Mar 23 +*builtin.txt* For Vim version 9.1. Last change: 2024 Mar 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -9598,6 +9598,8 @@ string({expr}) Return {expr} converted to a String. If {expr} is a Number, Dictionary {key: value, key: value} Class class SomeName Object object of SomeName {lnum: 1, col: 3} + Enum enum EnumName + EnumValue enum.value When a |List| or |Dictionary| has a recursive reference it is replaced by "[...]" or "{...}". Using eval() on the result @@ -10461,6 +10463,8 @@ type({expr}) The result is a Number representing the type of {expr}. Class: 12 |v:t_class| Object: 13 |v:t_object| Typealias: 14 |v:t_typealias| + Enum: 15 |v:t_enum| + EnumValue: 16 |v:t_enumvalue| For backward compatibility, this method can be used: > :if type(myvar) == type(0) :if type(myvar) == type("") -- cgit v1.2.3