From 0ef703b91c9c185067f6484d8c6ad689750194ad Mon Sep 17 00:00:00 2001 From: Alexander Momchilov Date: Thu, 15 Aug 2024 13:31:51 -0400 Subject: [PATCH] [ruby/prism] Render node comments into their `ast.h` https://github.com/ruby/prism/commit/b17c3241d3 --- prism/templates/include/prism/ast.h.erb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/prism/templates/include/prism/ast.h.erb b/prism/templates/include/prism/ast.h.erb index 54da751bd5..e5926c112c 100644 --- a/prism/templates/include/prism/ast.h.erb +++ b/prism/templates/include/prism/ast.h.erb @@ -151,10 +151,12 @@ typedef struct pm_node { <%- nodes.each do |node| -%> /** - * <%= node.name %> - * - * Type: <%= node.type %> +<%- node.each_comment_line do |line| -%> + *<%= line %> +<%- end -%> + * <%= node.name %> (type: <%= node.type %>) <%- if (node_flags = node.flags) -%> + * * Flags: <%- node_flags.values.each do |value| -%> * PM_<%= node_flags.human.upcase %>_<%= value.name %>