aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp_defs.h
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2020-08-08 08:57:35 -0400
committerJames McCoy <jamessan@jamessan.com>2020-08-08 08:57:35 -0400
commit840c12c10741d8f70e1787534fb6ea6d2b70edee (patch)
treef89ad27acbbf0b36db7ac08eeae0b8362da1fabb /src/nvim/regexp_defs.h
parente813ec79c201c85c5af3b10c051ae92ab5cb8606 (diff)
parentf26df8bb66158baacb79c79822babaf137607cd6 (diff)
downloadrneovim-840c12c10741d8f70e1787534fb6ea6d2b70edee.tar.gz
rneovim-840c12c10741d8f70e1787534fb6ea6d2b70edee.tar.bz2
rneovim-840c12c10741d8f70e1787534fb6ea6d2b70edee.zip
Merge remote-tracking branch 'upstream/master' into libcallnr
Diffstat (limited to 'src/nvim/regexp_defs.h')
-rw-r--r--src/nvim/regexp_defs.h27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/nvim/regexp_defs.h b/src/nvim/regexp_defs.h
index 5e5b19b63f..a729a91555 100644
--- a/src/nvim/regexp_defs.h
+++ b/src/nvim/regexp_defs.h
@@ -72,6 +72,7 @@ struct regprog {
unsigned regflags;
unsigned re_engine; ///< Automatic, backtracking or NFA engine.
unsigned re_flags; ///< Second argument for vim_regcomp().
+ bool re_in_use; ///< prog is being executed
};
/*
@@ -84,14 +85,15 @@ typedef struct {
regengine_T *engine;
unsigned regflags;
unsigned re_engine;
- unsigned re_flags; ///< Second argument for vim_regcomp().
+ unsigned re_flags;
+ bool re_in_use;
int regstart;
char_u reganch;
char_u *regmust;
int regmlen;
char_u reghasz;
- char_u program[1]; /* actually longer.. */
+ char_u program[1]; // actually longer..
} bt_regprog_T;
// Structure representing a NFA state.
@@ -102,7 +104,7 @@ struct nfa_state {
nfa_state_T *out;
nfa_state_T *out1;
int id;
- int lastlist[2]; /* 0: normal, 1: recursive */
+ int lastlist[2]; // 0: normal, 1: recursive
int val;
};
@@ -114,21 +116,22 @@ typedef struct {
regengine_T *engine;
unsigned regflags;
unsigned re_engine;
- unsigned re_flags; ///< Second argument for vim_regcomp().
+ unsigned re_flags;
+ bool re_in_use;
- nfa_state_T *start; /* points into state[] */
+ nfa_state_T *start; // points into state[]
- int reganch; /* pattern starts with ^ */
- int regstart; /* char at start of pattern */
- char_u *match_text; /* plain text to match with */
+ int reganch; // pattern starts with ^
+ int regstart; // char at start of pattern
+ char_u *match_text; // plain text to match with
- int has_zend; /* pattern contains \ze */
- int has_backref; /* pattern contains \1 .. \9 */
+ int has_zend; // pattern contains \ze
+ int has_backref; // pattern contains \1 .. \9
int reghasz;
char_u *pattern;
- int nsubexp; /* number of () */
+ int nsubexp; // number of ()
int nstate;
- nfa_state_T state[1]; /* actually longer.. */
+ nfa_state_T state[1]; // actually longer..
} nfa_regprog_T;
/*