forked from aniani/vim
patch 9.0.1890: Vim9: lookup code for class/object repaeated
Problem: Vim9: lookup code for class/object repaeated Solution: Refactor and make use of lookup functions closes: #13067 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
committed by
Christian Brabandt
parent
0661033075
commit
f36bbcd402
@@ -6,8 +6,16 @@ void ex_enum(exarg_T *eap);
|
||||
void ex_type(exarg_T *eap);
|
||||
int class_object_index(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int verbose);
|
||||
ufunc_T *find_class_func(char_u **arg);
|
||||
int class_member_index(char_u *name, size_t len, class_T **cl_ret, cctx_T *cctx);
|
||||
int class_method_index(char_u *name, size_t len, class_T **cl_ret, cctx_T *cctx);
|
||||
int class_member_idx(class_T *cl, char_u *name, size_t namelen);
|
||||
ocmember_T *class_member_lookup(class_T *cl, char_u *name, size_t namelen, int *idx);
|
||||
int class_method_idx(class_T *cl, char_u *name, size_t namelen);
|
||||
ufunc_T *class_method_lookup(class_T *cl, char_u *name, size_t namelen, int *idx);
|
||||
int object_member_idx(class_T *cl, char_u *name, size_t namelen);
|
||||
ocmember_T *object_member_lookup(class_T *cl, char_u *name, size_t namelen, int *idx);
|
||||
int object_method_idx(class_T *cl, char_u *name, size_t namelen);
|
||||
ufunc_T *object_method_lookup(class_T *cl, char_u *name, size_t namelen, int *idx);
|
||||
ocmember_T *member_lookup(class_T *cl, vartype_T v_type, char_u *name, size_t namelen, int *idx);
|
||||
ufunc_T *method_lookup(class_T *cl, vartype_T v_type, char_u *name, size_t namelen, int *idx);
|
||||
int inside_class(cctx_T *cctx_arg, class_T *cl);
|
||||
void copy_object(typval_T *from, typval_T *to);
|
||||
void object_unref(object_T *obj);
|
||||
|
@@ -4,6 +4,8 @@ int arg_exists(char_u *name, size_t len, int *idxp, type_T **type, int *gen_load
|
||||
void update_script_var_block_id(char_u *name, int block_id);
|
||||
int script_is_vim9(void);
|
||||
int script_var_exists(char_u *name, size_t len, cctx_T *cctx, cstack_T *cstack);
|
||||
int cctx_class_method_idx(cctx_T *cctx, char_u *name, size_t len, class_T **cl_ret);
|
||||
int cctx_class_member_idx(cctx_T *cctx, char_u *name, size_t len, class_T **cl_ret);
|
||||
int check_defined(char_u *p, size_t len, cctx_T *cctx, cstack_T *cstack, int is_arg);
|
||||
int need_type_where(type_T *actual, type_T *expected, int number_ok, int offset, where_T where, cctx_T *cctx, int silent, int actual_is_const);
|
||||
int need_type(type_T *actual, type_T *expected, int number_ok, int offset, int arg_idx, cctx_T *cctx, int silent, int actual_is_const);
|
||||
|
Reference in New Issue
Block a user