comparison src/structs.h @ 34676:5b25ec43f208 v9.1.0219

patch 9.1.0219: Vim9: No enum support Commit: https://github.com/vim/vim/commit/3164cf8f12f14b725b918e3170bb0a9085af8298 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Thu Mar 28 10:36:42 2024 +0100 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 <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Thu, 28 Mar 2024 10:45:06 +0100
parents 80991201ed38
children 159d598e6781
comparison
equal deleted inserted replaced
34675:42bca55140ec 34676:5b25ec43f208
1560 class_T *i2c_class; 1560 class_T *i2c_class;
1561 int i2c_is_method; // TRUE for method indexes 1561 int i2c_is_method; // TRUE for method indexes
1562 // array with ints follows 1562 // array with ints follows
1563 }; 1563 };
1564 1564
1565 #define CLASS_INTERFACE 1 1565 #define CLASS_INTERFACE 0x1
1566 #define CLASS_EXTENDED 2 // another class extends this one 1566 #define CLASS_EXTENDED 0x2 // another class extends this one
1567 #define CLASS_ABSTRACT 4 // abstract class 1567 #define CLASS_ABSTRACT 0x4 // abstract class
1568 #define CLASS_ENUM 0x8 // enum
1568 1569
1569 // "class_T": used for v_class of typval of VAR_CLASS 1570 // "class_T": used for v_class of typval of VAR_CLASS
1570 // Also used for an interface (class_flags has CLASS_INTERFACE). 1571 // Also used for an interface (class_flags has CLASS_INTERFACE).
1571 struct class_S 1572 struct class_S
1572 { 1573 {
1610 1611
1611 garray_T class_type_list; // used for type pointers 1612 garray_T class_type_list; // used for type pointers
1612 type_T class_type; // type used for the class 1613 type_T class_type; // type used for the class
1613 type_T class_object_type; // same as class_type but VAR_OBJECT 1614 type_T class_object_type; // same as class_type but VAR_OBJECT
1614 }; 1615 };
1616
1617 #define IS_INTERFACE(cl) ((cl)->class_flags & CLASS_INTERFACE)
1618 #define IS_ENUM(cl) ((cl)->class_flags & CLASS_ENUM)
1615 1619
1616 // Used for v_object of typval of VAR_OBJECT. 1620 // Used for v_object of typval of VAR_OBJECT.
1617 // The member variables follow in an array of typval_T. 1621 // The member variables follow in an array of typval_T.
1618 struct object_S 1622 struct object_S
1619 { 1623 {