#include "nvim/ascii.h"
#include "nvim/charset.h"
#include "nvim/debugger.h"
#include "nvim/edit.h"
#include "nvim/eval.h"
#include "nvim/eval/encode.h"
#include "nvim/eval/userfunc.h"
#include "nvim/ex_cmds2.h"
#include "nvim/ex_docmd.h"
#include "nvim/ex_getln.h"
#include "nvim/fileio.h"
#include "nvim/getchar.h"
#include "nvim/globals.h"
#include "nvim/lua/executor.h"
#include "nvim/os/input.h"
#include "nvim/regexp.h"
#include "nvim/search.h"
#include "nvim/ui.h"
#include "nvim/vim.h"
Macros | |
#define | FC_ABORT 0x01 |
#define | FC_RANGE 0x02 |
#define | FC_DICT 0x04 |
#define | FC_CLOSURE 0x08 |
#define | FC_DELETED 0x10 |
#define | FC_REMOVED 0x20 |
#define | FC_SANDBOX 0x40 |
#define | FC_DEAD 0x80 |
#define | FC_EXPORT 0x100 |
#define | FC_NOARGS 0x200 |
#define | FC_VIM9 0x400 |
#define | FC_CFUNC 0x800 |
#define | FLEN_FIXED 40 |
#define FC_ABORT 0x01 |
#define FC_CFUNC 0x800 |
#define FC_CLOSURE 0x08 |
#define FC_DEAD 0x80 |
#define FC_DELETED 0x10 |
#define FC_DICT 0x04 |
#define FC_EXPORT 0x100 |
#define FC_NOARGS 0x200 |
#define FC_RANGE 0x02 |
#define FC_REMOVED 0x20 |
#define FC_SANDBOX 0x40 |
#define FC_VIM9 0x400 |
#define FLEN_FIXED 40 |
void call_user_func | ( | ufunc_T * | fp, |
int | argcount, | ||
typval_T * | argvars, | ||
typval_T * | rettv, | ||
linenr_T | firstline, | ||
linenr_T | lastline, | ||
dict_T * | selfdict | ||
) |
Call a user function
fp | Function to call. | |
[in] | argcount | Number of arguments. |
argvars | Arguments. | |
[out] | rettv | Return value. |
[in] | firstline | First line of range. |
[in] | lastline | Last line of range. |
selfdict | Dictionary for "self" for dictionary functions. |
cleanup_function_call | ( | fc | ) |
char_u* deref_func_name | ( | const char * | name, |
int * | lenp, | ||
partial_T **const | partialp, | ||
bool | no_autoload | ||
) |
Return name of the function corresponding to name
If name
points to variable that is either a function or partial then corresponding function name is returned. Otherwise it returns name
itself.
[in] | name | Function name to check. |
[in,out] | lenp | Location where length of the returned name is stored. Must be set to the length of the name argument. |
[out] | partialp | Location where partial will be stored if found function appears to be a partial. May be NULL if this is not needed. |
[in] | no_autoload | If true, do not source autoload scripts if function was not found. |
Find a function by name, return pointer to it in ufuncs.
for | ( | ) |
int func_call | ( | char_u * | name, |
typval_T * | args, | ||
partial_T * | partial, | ||
dict_T * | selfdict, | ||
typval_T * | rettv | ||
) |
func_ptr_ref | ( | fp | ) |
funccall_T* get_current_funccal | ( | void | ) |
int get_func_tv | ( | const char_u * | name, |
int | len, | ||
typval_T * | rettv, | ||
char_u ** | arg, | ||
funcexe_T * | funcexe | ||
) |
Allocate a variable for the result of a function.
name | name of the function |
len | length of "name" or -1 to use strlen() |
arg | argument, pointing to the '(' |
funcexe | various values |
Parse a lambda expression and get a Funcref from "*arg".
if | ( | ! | ins_compl_active() | ) |
if | ( | (did_emsg &&(fp->uf_flags &FC_ABORT))||rettv-> | v_type = = VAR_UNKNOWN | ) |
if | ( | default_arg_err && | fp->uf_flags &FC_ABORT | ) |
if | ( | depth >= | p_mfd | ) |
if | ( | did_save_redo | ) |
if | ( | do_profiling_yes | ) |
if | ( | fp->uf_flags & | FC_SANDBOX | ) |
if | ( | p_verbose >=12 &&sourcing_name ! | = NULL | ) |
if | ( | p_verbose >= | 12 | ) |
if | ( | using_sandbox | ) |
if | ( | v ! | = NULL && v->di_tv.v_type == VAR_FUNC | ) |
line_breakcheck | ( | void | ) |
Check for CTRL-C pressed, but only once in a while.
Should be used instead of os_breakcheck() for functions that check for each line in the file. Calling os_breakcheck() each time takes too much time, because it will use system calls to check for input.
restore_search_patterns | ( | ) |
return | ( | char_u * | ) |
void save_funccal | ( | funccal_entry_T * | entry | ) |
Save the current function call pointer, and set it to NULL. Used when executing autocommands and for ":source".
save_search_patterns | ( | ) |
void set_current_funccal | ( | funccall_T * | fc | ) |
xfree | ( | sourcing_name | ) |
int ai |
fc breakpoint = dbg_find_breakpoint(false, fp->uf_name, (linenr_T)0) |
proftime_T call_start |
fc caller = current_funccal |
current_sctx = fp->uf_script_ctx |
fc dbg_tick = debug_tick |
did_emsg = FALSE |
else |
tv_list_set_lock & fc = xcalloc(1, sizeof(funccall_T)) |
int fixvar_idx = 0 |
hashtab_T func_hashtab |
bool func_not_yet_profiling_but_should |
bool func_or_func_caller_profiling |
size_t len |
fc level = ex_nesting_level |
* name = NULL |
RedrawingDisabled |
fc rettv = rettv |
const sctx_T save_current_sctx = current_sctx |
save_did_emsg = did_emsg |
save_redo_T save_redo |
save_sourcing_lnum |
save_sourcing_name = (char_u *)sourcing_name |
sourcing_lnum = 1 |
int started_profiling = false |
typval_T* tv_to_free[MAX_FUNC_ARGS] |
int tv_to_free_len = 0 |
fp uf_calls |
dictitem_T* v |
proftime_T wait_start |