summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/ripper/eventids2.c4
-rw-r--r--parse.y6
2 files changed, 5 insertions, 5 deletions
diff --git a/ext/ripper/eventids2.c b/ext/ripper/eventids2.c
index 66e7c8fb3f8..663f8c1d910 100644
--- a/ext/ripper/eventids2.c
+++ b/ext/ripper/eventids2.c
@@ -294,13 +294,13 @@ static const struct token_assoc {
};
static ID
-ripper_token2eventid(int tok)
+ripper_token2eventid(enum yytokentype tok)
{
int i;
for (i = 0; i < numberof(token_to_eventid); i++) {
const struct token_assoc *const a = &token_to_eventid[i];
- if (a->token == tok)
+ if ((enum yytokentype)a->token == tok)
return *(const ID *)((const char *)&ripper_scanner_ids + a->id_offset);
}
if (tok < 256) {
diff --git a/parse.y b/parse.y
index bac64e458da..1ce75fd07bd 100644
--- a/parse.y
+++ b/parse.y
@@ -5330,7 +5330,7 @@ ripper_has_scan_event(struct parser_params *p)
}
static VALUE
-ripper_scan_event_val(struct parser_params *p, int t)
+ripper_scan_event_val(struct parser_params *p, enum yytokentype t)
{
VALUE str = STR_NEW(p->lex.ptok, p->lex.pcur - p->lex.ptok);
VALUE rval = ripper_dispatch1(p, ripper_token2eventid(t), str);
@@ -5339,7 +5339,7 @@ ripper_scan_event_val(struct parser_params *p, int t)
}
static void
-ripper_dispatch_scan_event(struct parser_params *p, int t)
+ripper_dispatch_scan_event(struct parser_params *p, enum yytokentype t)
{
if (!ripper_has_scan_event(p)) return;
add_mark_object(p, yylval_rval = ripper_scan_event_val(p, t));
@@ -5347,7 +5347,7 @@ ripper_dispatch_scan_event(struct parser_params *p, int t)
#define dispatch_scan_event(p, t) ripper_dispatch_scan_event(p, t)
static void
-ripper_dispatch_delayed_token(struct parser_params *p, int t)
+ripper_dispatch_delayed_token(struct parser_params *p, enum yytokentype t)
{
int saved_line = p->ruby_sourceline;
const char *saved_tokp = p->lex.ptok;