diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2021-08-26 04:26:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-26 04:26:32 -0700 |
commit | 4c499899b2c3b31d57c1911c522683bdb2e32a0a (patch) | |
tree | 73bd8630718e854355ae1cc9c4272838618b67c9 /src/nvim/eval/funcs.h | |
parent | 2548a9e18037339c4c502d971bdeaf909b82a739 (diff) | |
parent | b2994e35c9357a8144beaf27e1a8ea4dd133f5d4 (diff) | |
download | rneovim-4c499899b2c3b31d57c1911c522683bdb2e32a0a.tar.gz rneovim-4c499899b2c3b31d57c1911c522683bdb2e32a0a.tar.bz2 rneovim-4c499899b2c3b31d57c1911c522683bdb2e32a0a.zip |
Merge #15293 Vimscript "method" syntax
Port VimL's method call syntax - vim-patch:8.1.{1638,1800,1803,1807,1809,1816,1820,1821,1828,1834,1835,1861,1863,1878,1879,1888,1909,1911,1912}
Diffstat (limited to 'src/nvim/eval/funcs.h')
-rw-r--r-- | src/nvim/eval/funcs.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/eval/funcs.h b/src/nvim/eval/funcs.h index a343290734..c6a0cb959e 100644 --- a/src/nvim/eval/funcs.h +++ b/src/nvim/eval/funcs.h @@ -9,11 +9,16 @@ typedef void (*FunPtr)(void); /// Prototype of C function that implements VimL function typedef void (*VimLFunc)(typval_T *args, typval_T *rvar, FunPtr data); +/// Special flags for base_arg @see VimLFuncDef +#define BASE_NONE 0 ///< Not a method (no base argument). +#define BASE_LAST UINT8_MAX ///< Use the last argument as the method base. + /// Structure holding VimL function definition typedef struct fst { char *name; ///< Name of the function. uint8_t min_argc; ///< Minimal number of arguments. uint8_t max_argc; ///< Maximal number of arguments. + uint8_t base_arg; ///< Method base arg # (1-indexed), BASE_NONE or BASE_LAST. VimLFunc func; ///< Function implementation. FunPtr data; ///< Userdata for function implementation. } VimLFuncDef; |