summaryrefslogtreecommitdiff
path: root/prism
diff options
context:
space:
mode:
authorJenny Shen <jenny.shen@shopify.com>2024-02-01 15:07:45 -0500
committergit <svn-admin@ruby-lang.org>2024-02-01 20:17:37 +0000
commite4e5a1b4ee3f04a69c62c1cc067f65245b469321 (patch)
treef58669f0f0219bfb9abfd1fae48c6a9ec114d067 /prism
parent29b7c31b089617316793c1ea7a1c1f2a83a41d60 (diff)
[ruby/prism] Add parentheses around macro arguments
https://github.com/ruby/prism/commit/f81fe9c716 Co-authored-by: Adrianna Chang <adrianna.chang@shopify.com> Co-authored-by: Peter Zhu <peter@peterzhu.ca>
Diffstat (limited to 'prism')
-rw-r--r--prism/templates/include/prism/ast.h.erb2
1 files changed, 1 insertions, 1 deletions
diff --git a/prism/templates/include/prism/ast.h.erb b/prism/templates/include/prism/ast.h.erb
index d0d935c9dc..13b923b029 100644
--- a/prism/templates/include/prism/ast.h.erb
+++ b/prism/templates/include/prism/ast.h.erb
@@ -109,7 +109,7 @@ static const pm_node_flags_t PM_NODE_FLAG_COMMON_MASK = (1 << (PM_NODE_FLAG_BITS
* Cast the type to an enum to allow the compiler to provide exhaustiveness
* checking.
*/
-#define PM_NODE_TYPE(node) ((enum pm_node_type) node->type)
+#define PM_NODE_TYPE(node) ((enum pm_node_type) (node)->type)
/**
* Return true if the type of the given node matches the given type.