Skip to content

Commit ec66feb

Browse files
committed
Make PM_NODE_FLAG_COMMON_MASK into a constant
1 parent 189dad6 commit ec66feb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/include/prism/ast.h.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ typedef uint16_t pm_node_flags_t;
5555
#define PM_NODE_FLAG_BITS (sizeof(pm_node_flags_t) * 8)
5656
static const pm_node_flags_t PM_NODE_FLAG_NEWLINE = (1 << (PM_NODE_FLAG_BITS - 1));
5757
static const pm_node_flags_t PM_NODE_FLAG_STATIC_LITERAL = (1 << (PM_NODE_FLAG_BITS - 2));
58-
static const pm_node_flags_t PM_NODE_FLAG_COMMON_MASK = PM_NODE_FLAG_NEWLINE | PM_NODE_FLAG_STATIC_LITERAL;
58+
static const pm_node_flags_t PM_NODE_FLAG_COMMON_MASK = (1 << (PM_NODE_FLAG_BITS - 1)) | (1 << (PM_NODE_FLAG_BITS - 2));
5959

6060
// For easy access, we define some macros to check node type
6161
#define PM_NODE_TYPE(node) ((enum pm_node_type)node->type)

0 commit comments

Comments
 (0)