Store tokens in Hash by name
This commit is contained in:
1 parent
280b749e38
commit
f3ed678fe1
3 files changed
+13
-15
No files matched your search
+2
-2
@@ -6,7 +6,7 @@ class <%= classname %>
|
||||
{
|
||||
enum
|
||||
{
|
||||
<% @tokens.each_with_index do |token, index| %>
|
||||
<% @tokens.each_with_index do |(name, token), index| %>
|
||||
<% if token.name %>
|
||||
TOKEN_<%= token.c_name %> = <%= index %>,
|
||||
<% end %>
|
||||
@@ -18,7 +18,7 @@ class <%= classname %>
|
||||
}
|
||||
|
||||
static immutable string TokenNames[] = [
|
||||
<% @tokens.each_with_index do |token, index| %>
|
||||
<% @tokens.each_with_index do |(name, token), index| %>
|
||||
<% if token.name %>
|
||||
"<%= token.name %>",
|
||||
<% else %>
|
||||
|
||||
Reference in new issue
Block a user