summaryrefslogtreecommitdiff
path: root/template/id.h.tmpl
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-14 01:35:06 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-14 01:35:06 (GMT)
commit48f9f0bda9c09f946b912e954f755591966ee703 (patch)
tree0903c9284bb24db0f643cb1deccb57d42662e844 /template/id.h.tmpl
parent6b4525912b67b085b1c6d958fdca8aef87a6c28d (diff)
method_ids
* template/id.h.tmpl (method_ids): define at once predefined method IDs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'template/id.h.tmpl')
-rw-r--r--template/id.h.tmpl45
1 files changed, 21 insertions, 24 deletions
diff --git a/template/id.h.tmpl b/template/id.h.tmpl
index 5ad9145..52c3685 100644
--- a/template/id.h.tmpl
+++ b/template/id.h.tmpl
@@ -31,6 +31,21 @@ vpath.find do |dir|
true
end
end
+
+method_ids = %w[
+ Intern
+ MethodMissing
+ Length
+ Size
+ Gets
+ Succ
+ Each
+ Lambda
+ Send
+ __send__
+ Initialize
+ UScore
+]
%>
#ifndef RUBY_ID_H
#define RUBY_ID_H
@@ -91,18 +106,9 @@ enum ruby_method_ids {
idAREF = tAREF,
idASET = tASET,
idLAST_TOKEN = tLAST_TOKEN >> ID_SCOPE_SHIFT,
- tIntern,
- tMethodMissing,
- tLength,
- tSize,
- tGets,
- tSucc,
- tEach,
- tLambda,
- tSend,
- t__send__,
- tInitialize,
- tUScore,
+% method_ids.each do |token|
+ t<%=token%>,
+% end
#if SUPPORT_JOKE
tBitblt,
tAnswer,
@@ -113,18 +119,9 @@ enum ruby_method_ids {
TOKEN2ID(Bitblt),
TOKEN2ID(Answer),
#endif
- TOKEN2ID(Intern),
- TOKEN2ID(MethodMissing),
- TOKEN2ID(Length),
- TOKEN2ID(Size),
- TOKEN2ID(Gets),
- TOKEN2ID(Succ),
- TOKEN2ID(Each),
- TOKEN2ID(Lambda),
- TOKEN2ID(Send),
- TOKEN2ID(__send__),
- TOKEN2ID(Initialize),
- TOKEN2ID(UScore),
+% method_ids.each do |token|
+ TOKEN2ID(<%=token%>),
+% end
TOKEN2ID(LAST_ID)
};