diff options
Diffstat (limited to 'include/ruby')
-rw-r--r-- | include/ruby/oniguruma.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/ruby/oniguruma.h b/include/ruby/oniguruma.h index 00b299915..52f0c687e 100644 --- a/include/ruby/oniguruma.h +++ b/include/ruby/oniguruma.h @@ -200,6 +200,14 @@ ONIG_EXTERN OnigEncodingType OnigEncodingASCII; #define ONIGENC_CTYPE_ALNUM 13 /* alpha || digit */ #define ONIGENC_CTYPE_ASCII 14 #define ONIGENC_MAX_STD_CTYPE ONIGENC_CTYPE_ASCII +#define ONIGENC_CTYPE_SPECIAL_MASK 128 +#define ONIGENC_CTYPE_S /* [\t\n\v\f\r\s] */ \ + ONIGENC_CTYPE_SPECIAL_MASK | ONIGENC_CTYPE_SPACE +#define ONIGENC_CTYPE_D /* [0-9] */ \ + ONIGENC_CTYPE_SPECIAL_MASK | ONIGENC_CTYPE_DIGIT +#define ONIGENC_CTYPE_W /* [0-9A-Za-z_] */ \ + ONIGENC_CTYPE_SPECIAL_MASK | ONIGENC_CTYPE_WORD +#define ONIGENC_CTYPE_SPECIAL_P(ctype) ((ctype) & ONIGENC_CTYPE_SPECIAL_MASK) #define onig_enc_len(enc,p,e) ONIGENC_MBC_ENC_LEN(enc, p, e) |