Skip to content

Commit

Permalink
Fix swow_php_ast_children
Browse files Browse the repository at this point in the history
  • Loading branch information
dixyes committed Nov 29, 2024
1 parent fda5b40 commit 57b5b1d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ext/src/swow_tokenizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,15 +244,15 @@ SWOW_API uint32_t swow_php_ast_children(zend_ast *node, zend_ast ***child)
case ZEND_AST_METHOD:
case ZEND_AST_CLASS:
case ZEND_AST_ARROW_FUNC:
#ifdef ZEND_AST_PROPERTY_HOOK
#if PHP_VERSION_ID >= 80400
case ZEND_AST_PROPERTY_HOOK:
#endif // ZEND_AST_PROPERTY_HOOK
#endif // PHP_VERSION_ID >= 80400
children = 5;
*child = (zend_ast **) (((zend_ast_decl *) node)->child);
break;
default:
CAT_NEVER_HERE("unknown ast kind");
return -1;
return 0;
}
} else {
children = (node->kind >> ZEND_AST_NUM_CHILDREN_SHIFT) & 7;
Expand Down

0 comments on commit 57b5b1d

Please sign in to comment.