robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
38986188ba
master
1#pragma once 2 3#include <stdbool.h> 4#include <stdint.h> 5 6#include "nvim/cmdexpand_defs.h" // IWYU pragma: keep 7#include "nvim/eval/typval_defs.h" 8#include "nvim/pos_defs.h" // IWYU pragma: keep 9#include "nvim/types_defs.h" 10 11/// Prototype of C function that implements Vimscript function 12typedef void (* VimLFunc )(typval_T * args ,typval_T * rvar ,EvalFuncData data ); 13 14/// Special flags for base_arg @see EvalFuncDef 15enum { 16BASE_NONE = 0 ,///< Not a method (no base argument). 17BASE_LAST = UINT8_MAX ,///< Use the last argument as the method base. 18}; 19 20/// Structure holding Vimscript function definition 21typedef struct { 22char * name ;///< Name of the function. 23uint8_t min_argc ;///< Minimal number of arguments. 24uint8_t max_argc ;///< Maximal number of arguments. 25uint8_t base_arg ;///< Method base arg # (1-indexed), BASE_NONE or BASE_LAST. 26bool fast ;///< Can be run in |api-fast| events 27VimLFunc func ;///< Function implementation. 28EvalFuncData data ;///< Userdata for function implementation. 29}EvalFuncDef ; 30 31#include "eval/funcs.h.generated.h"