diff options
author | Jo-Philipp Wich <jo@mein.io> | 2022-10-05 21:34:59 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2022-10-05 23:01:05 +0200 |
commit | 21ace5e5c7c98271d78ff9cdf2b61e3ac70704d8 (patch) | |
tree | bc2f084916c574acb4c6e10ddf5146a796c4b7f7 /lib/math.c | |
parent | f8e00b4b83dad76e183b8293870cfe3110f1fa94 (diff) |
lexer: fixes for regex literal parsing
- Ensure that regexp extension escapes are consistently handled;
substitute `\d`, `\D`, `\s`, `\S`, `\w` and `\W` with `[[:digit:]]`,
`[^[:digit:]]`, `[[:space:]]`, `[^[:space:]]`, `[[:alnum:]_]` and
`[^[:alnum:]_]` character classes respectively since not all POSIX
regexp implementations implement all of those extensions
- Preserve `\b`, `\B`, `\<` and `\>` boundary matches
Fixes: a45f2a3 ("lexer: improve regex literal handling")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'lib/math.c')
0 files changed, 0 insertions, 0 deletions