@@ -2139,7 +2139,7 @@ static ZEND_COLD void zend_ast_export_ex(smart_str *str, zend_ast *ast, int prio
21392139 case ZEND_AST_CLASS :
21402140 decl = (const zend_ast_decl * ) ast ;
21412141 if (decl -> child [3 ]) {
2142- zend_ast_export_attributes (str , decl -> child [3 ], indent , 1 );
2142+ zend_ast_export_attributes (str , decl -> child [3 ], indent , true );
21432143 }
21442144 if (decl -> flags & ZEND_ACC_INTERFACE ) {
21452145 smart_str_appends (str , "interface " );
@@ -2173,11 +2173,11 @@ static ZEND_COLD void zend_ast_export_ex(smart_str *str, zend_ast *ast, int prio
21732173 case ZEND_AST_EXPR_LIST :
21742174 case ZEND_AST_PARAM_LIST :
21752175simple_list :
2176- zend_ast_export_list (str , zend_ast_get_list (ast ), 1 , 20 , indent );
2176+ zend_ast_export_list (str , zend_ast_get_list (ast ), true , 20 , indent );
21772177 break ;
21782178 case ZEND_AST_ARRAY :
21792179 smart_str_appendc (str , '[' );
2180- zend_ast_export_list (str , zend_ast_get_list (ast ), 1 , 20 , indent );
2180+ zend_ast_export_list (str , zend_ast_get_list (ast ), true , 20 , indent );
21812181 smart_str_appendc (str , ']' );
21822182 break ;
21832183 case ZEND_AST_ENCAPS_LIST :
@@ -2195,7 +2195,7 @@ static ZEND_COLD void zend_ast_export_ex(smart_str *str, zend_ast *ast, int prio
21952195 case ZEND_AST_SWITCH_LIST :
21962196 case ZEND_AST_CATCH_LIST :
21972197 case ZEND_AST_MATCH_ARM_LIST :
2198- zend_ast_export_list (str , zend_ast_get_list (ast ), 0 , 0 , indent );
2198+ zend_ast_export_list (str , zend_ast_get_list (ast ), false , 0 , indent );
21992199 break ;
22002200 case ZEND_AST_CLOSURE_USES :
22012201 smart_str_appends (str , " use(" );
@@ -2207,7 +2207,7 @@ static ZEND_COLD void zend_ast_export_ex(smart_str *str, zend_ast *ast, int prio
22072207 zend_ast * prop_ast = ast -> child [1 ];
22082208
22092209 if (ast -> child [2 ]) {
2210- zend_ast_export_attributes (str , ast -> child [2 ], indent , 1 );
2210+ zend_ast_export_attributes (str , ast -> child [2 ], indent , true );
22112211 }
22122212
22132213 zend_ast_export_visibility (str , ast -> attr , ZEND_MODIFIER_TARGET_PROPERTY );
@@ -2236,21 +2236,21 @@ static ZEND_COLD void zend_ast_export_ex(smart_str *str, zend_ast *ast, int prio
22362236 str ,
22372237 ast_list -> child [ast_list -> children - 1 ],
22382238 indent ,
2239- 1
2239+ true
22402240 );
22412241 /* So that the list printing doesn't try to print the attributes,
22422242 * use zend_ast_export_list_ex() to override the number of children
22432243 * to print. */
22442244 smart_str_appends (str , "const " );
2245- zend_ast_export_list_ex (str , ast_list , 1 , 20 , indent , ast_list -> children - 1 );
2245+ zend_ast_export_list_ex (str , ast_list , true , 20 , indent , ast_list -> children - 1 );
22462246 break ;
22472247 }
22482248 smart_str_appends (str , "const " );
22492249 goto simple_list ;
22502250 }
22512251 case ZEND_AST_CLASS_CONST_GROUP :
22522252 if (ast -> child [1 ]) {
2253- zend_ast_export_attributes (str , ast -> child [1 ], indent , 1 );
2253+ zend_ast_export_attributes (str , ast -> child [1 ], indent , true );
22542254 }
22552255
22562256 zend_ast_export_visibility (str , ast -> attr , ZEND_MODIFIER_TARGET_CONSTANT );
@@ -2534,7 +2534,7 @@ static ZEND_COLD void zend_ast_export_ex(smart_str *str, zend_ast *ast, int prio
25342534 if (ast -> child [0 ]-> kind == ZEND_AST_CLASS ) {
25352535 const zend_ast_decl * decl = (const zend_ast_decl * ) ast -> child [0 ];
25362536 if (decl -> child [3 ]) {
2537- zend_ast_export_attributes (str , decl -> child [3 ], indent , 0 );
2537+ zend_ast_export_attributes (str , decl -> child [3 ], indent , false );
25382538 }
25392539 smart_str_appends (str , "class" );
25402540 if (!zend_ast_is_list (ast -> child [1 ])
@@ -2635,7 +2635,7 @@ static ZEND_COLD void zend_ast_export_ex(smart_str *str, zend_ast *ast, int prio
26352635 case ZEND_AST_MATCH_ARM :
26362636 zend_ast_export_indent (str , indent );
26372637 if (ast -> child [0 ]) {
2638- zend_ast_export_list (str , zend_ast_get_list (ast -> child [0 ]), 1 , 0 , indent );
2638+ zend_ast_export_list (str , zend_ast_get_list (ast -> child [0 ]), true , 0 , indent );
26392639 smart_str_appends (str , " => " );
26402640 } else {
26412641 smart_str_appends (str , "default => " );
@@ -2646,7 +2646,7 @@ static ZEND_COLD void zend_ast_export_ex(smart_str *str, zend_ast *ast, int prio
26462646 case ZEND_AST_DECLARE :
26472647 smart_str_appends (str , "declare(" );
26482648 ZEND_ASSERT (ast -> child [0 ]-> kind == ZEND_AST_CONST_DECL );
2649- zend_ast_export_list (str , zend_ast_get_list (ast -> child [0 ]), 1 , 0 , indent );
2649+ zend_ast_export_list (str , zend_ast_get_list (ast -> child [0 ]), true , 0 , indent );
26502650 smart_str_appendc (str , ')' );
26512651 if (ast -> child [1 ]) {
26522652 smart_str_appends (str , " {\n" );
@@ -2793,7 +2793,7 @@ static ZEND_COLD void zend_ast_export_ex(smart_str *str, zend_ast *ast, int prio
27932793 break ;
27942794 case ZEND_AST_PARAM :
27952795 if (ast -> child [3 ]) {
2796- zend_ast_export_attributes (str , ast -> child [3 ], indent , 0 );
2796+ zend_ast_export_attributes (str , ast -> child [3 ], indent , false );
27972797 }
27982798 zend_ast_export_visibility (str , ast -> attr , ZEND_MODIFIER_TARGET_CPP );
27992799 if (ast -> attr & ZEND_ACC_FINAL ) {
@@ -2821,7 +2821,7 @@ static ZEND_COLD void zend_ast_export_ex(smart_str *str, zend_ast *ast, int prio
28212821 break ;
28222822 case ZEND_AST_ENUM_CASE :
28232823 if (ast -> child [3 ]) {
2824- zend_ast_export_attributes (str , ast -> child [3 ], indent , 1 );
2824+ zend_ast_export_attributes (str , ast -> child [3 ], indent , true );
28252825 }
28262826 smart_str_appends (str , "case " );
28272827 zend_ast_export_name (str , ast -> child [0 ], 0 , indent );
0 commit comments