Add TokenNames array

This commit is contained in:
Josh Holtrop 2021-06-29 22:49:12 -04:00
parent 4beb3d2016
commit 15454f926a

View File

@ -13,6 +13,16 @@ class <%= classname %>
<% end %> <% end %>
} }
static immutable string TokenNames[] = [
<% @grammar.tokens.each_with_index do |token, index| %>
<% if token.name %>
"<%= token.name %>",
<% else %>
null,
<% end %>
<% end %>
];
private struct Transition private struct Transition
{ {
uint first; uint first;