diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-07-21 14:52:43 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-07-21 14:52:43 +0900 |
commit | 47c7c188e08dae5a81be9126f4ea2e201e981bba (patch) | |
tree | f92c78ab15b290ca682fa1395a7cf3f2e27dfd70 /template | |
parent | 8d9a25a6d799c50514213b0d15250d9c260213d1 (diff) |
Add comments to id.h and undef finished macros
Diffstat (limited to 'template')
-rw-r--r-- | template/id.h.tmpl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/template/id.h.tmpl b/template/id.h.tmpl index 9c588305eb..4f7053885f 100644 --- a/template/id.h.tmpl +++ b/template/id.h.tmpl @@ -67,24 +67,33 @@ enum ruby_method_ids { id<%=token%>, % end tPRESERVED_ID_END, + % prev = 'tPRESERVED_ID_END' % types.each do |type| % tokens = ids[type] + /* <%= type %> tokens {{{ */ tTOKEN_<%=type%>_BEGIN = <%=prev%>-1, % tokens.each do |token| t<%=token%>, % end % prev = "tTOKEN_#{type}_END" <%=prev%>, + /* <%= type %> tokens }}} */ + % end tNEXT_ID = <%=prev%>, + % types.each do |type| % tokens = ids[type] + /* <%= type %> IDs {{{ */ #define DEFINE_<%=type%>ID_FROM_TOKEN(n) id##n = TOKEN2<%=type%>ID(t##n) % tokens or next % tokens.each do |token| DEFINE_<%=type%>ID_FROM_TOKEN(<%=token%>), % end +#undef DEFINE_<%=type%>ID_FROM_TOKEN + /* <%= type %> IDs }}} */ + % end tLAST_OP_ID = tPRESERVED_ID_END-1, idLAST_OP_ID = tLAST_OP_ID >> ID_SCOPE_SHIFT |