From c3bccd2151aa2087f63b0456007525594ba382bc Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Tue, 14 Jul 2026 22:11:39 -0400 Subject: [PATCH] Fix tree struct type forward-declarations for C/C++ --- assets/parser.h.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/parser.h.erb b/assets/parser.h.erb index 966127f..f704f63 100644 --- a/assets/parser.h.erb +++ b/assets/parser.h.erb @@ -104,7 +104,7 @@ typedef struct <%= @grammar.tree_prefix %>Token<%= @grammar.tree_suffix %> <% @parser.rule_sets.each do |name, rule_set| %> <% next if name.start_with?("$") %> <% next if rule_set.optional? %> -struct <%= name %>; +struct <%= @grammar.tree_prefix %><%= name %><%= @grammar.tree_suffix %>; <% end %> <% @parser.rule_sets.each do |name, rule_set| %>