Add token_names API - close #17

This commit is contained in:
josh committed 2024-03-29 15:02:01 -04:00
1 parent 5dfd62b756
commit 1c91dcd298
5 files changed
+46

No files matched your search

+11
View File
@@ -3,6 +3,17 @@
#include <stdlib.h>
#include <string.h>
/**************************************************************************
* Public data
*************************************************************************/
/** Token names. */
const char * <%= @grammar.prefix %>token_names[] = {
<% @grammar.tokens.each_with_index do |token, index| %>
"<%= token.name %>",
<% end %>
};
/**************************************************************************
* User code blocks
*************************************************************************/