Move ISASCII defination to parse.y
This commit is contained in:
parent
3c4d788bfe
commit
8b2a0ec8df
Notes:
git
2023-07-08 06:27:14 +00:00
11
parse.y
11
parse.y
@ -6351,6 +6351,17 @@ ripper_dispatch_delayed_token(struct parser_params *p, enum yytokentype t)
|
||||
#define dispatch_delayed_token(p, t) ripper_dispatch_delayed_token(p, t)
|
||||
#endif /* RIPPER */
|
||||
|
||||
static inline int
|
||||
parse_isascii(int c)
|
||||
{
|
||||
return '\0' <= c && c <= '\x7f';
|
||||
}
|
||||
|
||||
#ifdef ISASCII
|
||||
#undef ISASCII
|
||||
#define ISASCII parse_isascii
|
||||
#endif
|
||||
|
||||
static inline int
|
||||
is_identchar(struct parser_params *p, const char *ptr, const char *MAYBE_UNUSED(ptr_end), rb_encoding *enc)
|
||||
{
|
||||
|
@ -791,7 +791,6 @@ rb_parser_config_initialize(rb_parser_config_t *config)
|
||||
config->strtod = ruby_strtod;
|
||||
|
||||
config->isspace = rb_isspace;
|
||||
config->isascii = rb_isascii;
|
||||
config->iscntrl = rb_iscntrl;
|
||||
config->isalpha = rb_isalpha;
|
||||
config->isdigit = rb_isdigit;
|
||||
|
@ -588,7 +588,6 @@ typedef struct rb_parser_config_struct {
|
||||
|
||||
/* ctype */
|
||||
int (*isspace)(int c);
|
||||
int (*isascii)(int c);
|
||||
int (*iscntrl)(int c);
|
||||
int (*isalpha)(int c);
|
||||
int (*isdigit)(int c);
|
||||
|
Loading…
x
Reference in New Issue
Block a user