summaryrefslogtreecommitdiff
path: root/yarp
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2023-09-05 21:43:40 +0200
committergit <svn-admin@ruby-lang.org>2023-09-06 12:30:36 +0000
commit6408da70b036de1d0f158f29051eadf4040ab471 (patch)
treeaf081cc32ee60647534b23fc7427d2e8b8ffecdf /yarp
parent6356f6d3cd4a8bd470176d80bd880882bf40beb8 (diff)
[ruby/yarp] Add deprecated aliases of the form YP_NODE_<name>_NODE
https://github.com/ruby/yarp/commit/ae1f45ff52
Diffstat (limited to 'yarp')
-rw-r--r--yarp/templates/include/yarp/ast.h.erb6
1 files changed, 6 insertions, 0 deletions
diff --git a/yarp/templates/include/yarp/ast.h.erb b/yarp/templates/include/yarp/ast.h.erb
index cc631568ed..82fb758440 100644
--- a/yarp/templates/include/yarp/ast.h.erb
+++ b/yarp/templates/include/yarp/ast.h.erb
@@ -47,6 +47,12 @@ enum yp_node_type {
YP_SCOPE_NODE
};
+// Deprecated aliases
+#define YP_NODE_SCOPE_NODE YP_SCOPE_NODE
+<%- nodes.each do |node| -%>
+#define <%= node.type.sub(/^YP_/, 'YP_NODE_') %> <%= node.type %>
+<%- end -%>
+
typedef uint16_t yp_node_type_t;
typedef uint16_t yp_node_flags_t;