diff options
| author | Kevin Newton <kddnewton@gmail.com> | 2023-10-13 15:48:09 -0400 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2023-10-13 19:48:15 +0000 |
| commit | 81fbacb59d39ceb2e2bc6dc6bf52d727f148bfdf (patch) | |
| tree | ab701cd5724c7aca8b5a51a608d6f6a7171b8914 | |
| parent | e700582d983e5fc40da621ec4a82aa46da11302b (diff) | |
[ruby/prism] Make PM_NODE_FLAG_COMMON_MASK into a constant
https://github.com/ruby/prism/commit/ec66feb595
| -rw-r--r-- | prism/templates/include/prism/ast.h.erb | 2 |
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 3a95676c95..bdd31538a7 100644 --- a/prism/templates/include/prism/ast.h.erb +++ b/prism/templates/include/prism/ast.h.erb @@ -55,7 +55,7 @@ typedef uint16_t pm_node_flags_t; #define PM_NODE_FLAG_BITS (sizeof(pm_node_flags_t) * 8) static const pm_node_flags_t PM_NODE_FLAG_NEWLINE = (1 << (PM_NODE_FLAG_BITS - 1)); static const pm_node_flags_t PM_NODE_FLAG_STATIC_LITERAL = (1 << (PM_NODE_FLAG_BITS - 2)); -static const pm_node_flags_t PM_NODE_FLAG_COMMON_MASK = PM_NODE_FLAG_NEWLINE | PM_NODE_FLAG_STATIC_LITERAL; +static const pm_node_flags_t PM_NODE_FLAG_COMMON_MASK = (1 << (PM_NODE_FLAG_BITS - 1)) | (1 << (PM_NODE_FLAG_BITS - 2)); // For easy access, we define some macros to check node type #define PM_NODE_TYPE(node) ((enum pm_node_type)node->type) |
