aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp_defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/regexp_defs.h')
-rw-r--r--src/nvim/regexp_defs.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/nvim/regexp_defs.h b/src/nvim/regexp_defs.h
index 1d112bd64a..09f244c2f6 100644
--- a/src/nvim/regexp_defs.h
+++ b/src/nvim/regexp_defs.h
@@ -34,7 +34,7 @@
// In the NFA engine: how many states are allowed.
#define NFA_MAX_STATES 100000
-#define NFA_TOO_EXPENSIVE -1
+#define NFA_TOO_EXPENSIVE (-1)
// Which regexp engine to use? Needed for vim_regcomp().
// Must match with 'regexpengine'.
@@ -157,12 +157,20 @@ struct reg_extmatch {
};
struct regengine {
+ /// bt_regcomp or nfa_regcomp
regprog_T *(*regcomp)(char_u *, int);
+ /// bt_regfree or nfa_regfree
void (*regfree)(regprog_T *);
+ /// bt_regexec_nl or nfa_regexec_nl
int (*regexec_nl)(regmatch_T *, char_u *, colnr_T, bool);
- long (*regexec_multi)(regmmatch_T *, win_T *, buf_T *, linenr_T, colnr_T,
- proftime_T *, int *);
- char_u *expr;
+ /// bt_regexec_mult or nfa_regexec_mult
+ long (*regexec_multi)(regmmatch_T *, win_T *, buf_T *, linenr_T, colnr_T, proftime_T *, int *);
+ // char_u *expr;
};
+// Flags used by vim_regsub() and vim_regsub_both()
+#define REGSUB_COPY 1
+#define REGSUB_MAGIC 2
+#define REGSUB_BACKSLASH 4
+
#endif // NVIM_REGEXP_DEFS_H