Generate enum of token identifiers

This commit is contained in:
josh committed 2021-06-23 22:22:45 -04:00
1 parent ebc1d8f001
commit 5881f13380
2 files changed
+10

No files matched your search

+6
View File
@@ -4,4 +4,10 @@ module <%= @grammar.modulename %>;
<% end %>
class <%= classname %>
{
enum
{
<% @grammar.tokens.each do |token| %>
TOKEN_<%= token.c_name %>,
<% end %>
}
}