summaryrefslogtreecommitdiff
path: root/ext/ripper
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-15 11:58:02 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-15 11:58:02 +0900
commit6fa4c904483588d2aa08d1fd84e2b8efc95227df (patch)
tree939aeba386783d72fb84628b6e476ac06e6ef9e4 /ext/ripper
parent46527e1bf4a66a42ac4729e23f12bdfec8ae953e (diff)
Prefer `enum yytokentype` to int
Diffstat (limited to 'ext/ripper')
-rw-r--r--ext/ripper/eventids2.c4
1 files changed, 2 insertions, 2 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) {