Do not generate token names for drop tokens

This commit is contained in:
josh committed 2021-06-26 16:16:18 -04:00
1 parent 61dd5bc5a0
commit 93cb25df62
2 files changed
+14 -2

No files matched your search

+4 -2
View File
@@ -6,8 +6,10 @@ class <%= classname %>
{
enum
{
<% @grammar.tokens.each do |token| %>
TOKEN_<%= token.c_name %>,
<% @grammar.tokens.each_with_index do |token, index| %>
<% if token.name %>
TOKEN_<%= token.c_name %> = <%= index %>,
<% end %>
<% end %>
}