From ab0ee1d5e98183e0994765352998b5543cd7f02f Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 13 Aug 2008 05:00:26 +0000 Subject: * common.mk (parse.c): generates parse.h together. * id.c, id.h: use constants for parser tokens. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- id.h | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) (limited to 'id.h') diff --git a/id.h b/id.h index 977dcf57a3..ece5ae0d00 100644 --- a/id.h +++ b/id.h @@ -12,28 +12,34 @@ #ifndef RUBY_ID_H #define RUBY_ID_H +#include "parse.h" + extern VALUE symIFUNC; extern VALUE symCFUNC; -extern ID idPLUS; -extern ID idMINUS; -extern ID idMULT; -extern ID idDIV; -extern ID idMOD; -extern ID idLT; -extern ID idLTLT; -extern ID idLE; -extern ID idGT; -extern ID idGE; -extern ID idEq; -extern ID idEqq; -extern ID idNeq; -extern ID idNot; -extern ID idBackquote; -extern ID idEqTilde; +enum ruby_method_ids { + idPLUS = '+', + idMINUS = '-', + idMULT = '*', + idDIV = '/', + idMOD = '%', + idLT = '<', + idLTLT = tLSHFT, + idLE = tLEQ, + idGT = '>', + idGE = tGEQ, + idEq = tEQ, + idEqq = tEQQ, + idNeq = tNEQ, + idNot = '!', + idBackquote = '`', + idEqTilde = tMATCH, + idAREF = tAREF, + idASET = tASET, + idDummy +}; + extern ID idThrowState; -extern ID idAREF; -extern ID idASET; extern ID idIntern; extern ID idMethodMissing; extern ID idLength; -- cgit v1.2.3