Lines Matching refs:str

79 ZEND_API zend_ast * ZEND_FASTCALL zend_ast_create_zval_from_str(zend_string *str) {  in zend_ast_create_zval_from_str()  argument
81 ZVAL_STR(&zv, str); in zend_ast_create_zval_from_str()
1267 static ZEND_COLD void zend_ast_export_ex(smart_str *str, zend_ast *ast, int priority, int indent);
1269 static ZEND_COLD void zend_ast_export_str(smart_str *str, zend_string *s) in zend_ast_export_str() argument
1276 smart_str_appendc(str, '\\'); in zend_ast_export_str()
1277 smart_str_appendc(str, c); in zend_ast_export_str()
1279 smart_str_appendc(str, c); in zend_ast_export_str()
1284 static ZEND_COLD void zend_ast_export_qstr(smart_str *str, char quote, zend_string *s) in zend_ast_export_qstr() argument
1293 smart_str_appends(str, "\\n"); in zend_ast_export_qstr()
1296 smart_str_appends(str, "\\r"); in zend_ast_export_qstr()
1299 smart_str_appends(str, "\\t"); in zend_ast_export_qstr()
1302 smart_str_appends(str, "\\f"); in zend_ast_export_qstr()
1305 smart_str_appends(str, "\\v"); in zend_ast_export_qstr()
1312 smart_str_appends(str, "\\e"); in zend_ast_export_qstr()
1315 smart_str_appends(str, "\\0"); in zend_ast_export_qstr()
1316 smart_str_appendc(str, '0' + (c / 8)); in zend_ast_export_qstr()
1317 smart_str_appendc(str, '0' + (c % 8)); in zend_ast_export_qstr()
1322 smart_str_appendc(str, '\\'); in zend_ast_export_qstr()
1324 smart_str_appendc(str, c); in zend_ast_export_qstr()
1329 static ZEND_COLD void zend_ast_export_indent(smart_str *str, int indent) in zend_ast_export_indent() argument
1332 smart_str_appends(str, " "); in zend_ast_export_indent()
1337 static ZEND_COLD void zend_ast_export_name(smart_str *str, zend_ast *ast, int priority, int indent) in zend_ast_export_name() argument
1343 smart_str_append(str, Z_STR_P(zv)); in zend_ast_export_name()
1347 zend_ast_export_ex(str, ast, priority, indent); in zend_ast_export_name()
1350 static ZEND_COLD void zend_ast_export_ns_name(smart_str *str, zend_ast *ast, int priority, int inde… in zend_ast_export_ns_name() argument
1357 smart_str_appendc(str, '\\'); in zend_ast_export_ns_name()
1359 smart_str_appends(str, "namespace\\"); in zend_ast_export_ns_name()
1361 smart_str_append(str, Z_STR_P(zv)); in zend_ast_export_ns_name()
1365 zend_ast_export_ex(str, ast, priority, indent); in zend_ast_export_ns_name()
1412 static ZEND_COLD void zend_ast_export_var(smart_str *str, zend_ast *ast, int priority, int indent) in zend_ast_export_var() argument
1418 smart_str_append(str, Z_STR_P(zv)); in zend_ast_export_var()
1422 zend_ast_export_ex(str, ast, 0, indent); in zend_ast_export_var()
1425 smart_str_appendc(str, '{'); in zend_ast_export_var()
1426 zend_ast_export_name(str, ast, 0, indent); in zend_ast_export_var()
1427 smart_str_appendc(str, '}'); in zend_ast_export_var()
1430 static ZEND_COLD void zend_ast_export_list(smart_str *str, zend_ast_list *list, bool separator, int… in zend_ast_export_list() argument
1436 smart_str_appends(str, ", "); in zend_ast_export_list()
1438 zend_ast_export_ex(str, list->child[i], priority, indent); in zend_ast_export_list()
1443 static ZEND_COLD void zend_ast_export_encaps_list(smart_str *str, char quote, zend_ast_list *list, … in zend_ast_export_encaps_list() argument
1454 zend_ast_export_qstr(str, quote, Z_STR_P(zv)); in zend_ast_export_encaps_list()
1462 zend_ast_export_ex(str, ast, 0, indent); in zend_ast_export_encaps_list()
1464 smart_str_appendc(str, '{'); in zend_ast_export_encaps_list()
1465 zend_ast_export_ex(str, ast, 0, indent); in zend_ast_export_encaps_list()
1466 smart_str_appendc(str, '}'); in zend_ast_export_encaps_list()
1472 static ZEND_COLD void zend_ast_export_name_list_ex(smart_str *str, zend_ast_list *list, int indent,… in zend_ast_export_name_list_ex() argument
1478 smart_str_appends(str, separator); in zend_ast_export_name_list_ex()
1480 zend_ast_export_name(str, list->child[i], 0, indent); in zend_ast_export_name_list_ex()
1488 static ZEND_COLD void zend_ast_export_var_list(smart_str *str, zend_ast_list *list, int indent) in zend_ast_export_var_list() argument
1494 smart_str_appends(str, ", "); in zend_ast_export_var_list()
1497 smart_str_appendc(str, '&'); in zend_ast_export_var_list()
1499 smart_str_appendc(str, '$'); in zend_ast_export_var_list()
1500 zend_ast_export_name(str, list->child[i], 20, indent); in zend_ast_export_var_list()
1505 static ZEND_COLD void zend_ast_export_stmt(smart_str *str, zend_ast *ast, int indent) in zend_ast_export_stmt() argument
1518 zend_ast_export_stmt(str, ast, indent); in zend_ast_export_stmt()
1522 zend_ast_export_indent(str, indent); in zend_ast_export_stmt()
1523 zend_ast_export_ex(str, ast, 0, indent); in zend_ast_export_stmt()
1543 smart_str_appendc(str, ';'); in zend_ast_export_stmt()
1548 smart_str_appendc(str, ';'); in zend_ast_export_stmt()
1551 smart_str_appendc(str, '\n'); in zend_ast_export_stmt()
1555 static ZEND_COLD void zend_ast_export_if_stmt(smart_str *str, zend_ast_list *list, int indent) in zend_ast_export_if_stmt() argument
1567 smart_str_appends(str, "if ("); in zend_ast_export_if_stmt()
1569 zend_ast_export_indent(str, indent); in zend_ast_export_if_stmt()
1570 smart_str_appends(str, "} elseif ("); in zend_ast_export_if_stmt()
1572 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_if_stmt()
1573 smart_str_appends(str, ") {\n"); in zend_ast_export_if_stmt()
1574 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_if_stmt()
1576 zend_ast_export_indent(str, indent); in zend_ast_export_if_stmt()
1577 smart_str_appends(str, "} else "); in zend_ast_export_if_stmt()
1582 smart_str_appends(str, "{\n"); in zend_ast_export_if_stmt()
1583 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_if_stmt()
1588 zend_ast_export_indent(str, indent); in zend_ast_export_if_stmt()
1589 smart_str_appendc(str, '}'); in zend_ast_export_if_stmt()
1592 static ZEND_COLD void zend_ast_export_zval(smart_str *str, zval *zv, int priority, int indent) in zend_ast_export_zval() argument
1597 smart_str_appends(str, "null"); in zend_ast_export_zval()
1600 smart_str_appends(str, "false"); in zend_ast_export_zval()
1603 smart_str_appends(str, "true"); in zend_ast_export_zval()
1606 smart_str_append_long(str, Z_LVAL_P(zv)); in zend_ast_export_zval()
1610 str, Z_DVAL_P(zv), (int) EG(precision), /* zero_fraction */ false); in zend_ast_export_zval()
1613 smart_str_appendc(str, '\''); in zend_ast_export_zval()
1614 zend_ast_export_str(str, Z_STR_P(zv)); in zend_ast_export_zval()
1615 smart_str_appendc(str, '\''); in zend_ast_export_zval()
1622 smart_str_appendc(str, '['); in zend_ast_export_zval()
1627 smart_str_appends(str, ", "); in zend_ast_export_zval()
1630 smart_str_appendc(str, '\''); in zend_ast_export_zval()
1631 zend_ast_export_str(str, key); in zend_ast_export_zval()
1632 smart_str_appends(str, "' => "); in zend_ast_export_zval()
1634 smart_str_append_long(str, idx); in zend_ast_export_zval()
1635 smart_str_appends(str, " => "); in zend_ast_export_zval()
1637 zend_ast_export_zval(str, val, 0, indent); in zend_ast_export_zval()
1639 smart_str_appendc(str, ']'); in zend_ast_export_zval()
1643 zend_ast_export_ex(str, Z_ASTVAL_P(zv), priority, indent); in zend_ast_export_zval()
1649 static ZEND_COLD void zend_ast_export_class_no_header(smart_str *str, zend_ast_decl *decl, int inde… in zend_ast_export_class_no_header() argument
1651 smart_str_appends(str, " extends "); in zend_ast_export_class_no_header()
1652 zend_ast_export_ns_name(str, decl->child[0], 0, indent); in zend_ast_export_class_no_header()
1655 smart_str_appends(str, " implements "); in zend_ast_export_class_no_header()
1656 zend_ast_export_ex(str, decl->child[1], 0, indent); in zend_ast_export_class_no_header()
1658 smart_str_appends(str, " {\n"); in zend_ast_export_class_no_header()
1659 zend_ast_export_stmt(str, decl->child[2], indent + 1); in zend_ast_export_class_no_header()
1660 zend_ast_export_indent(str, indent); in zend_ast_export_class_no_header()
1661 smart_str_appends(str, "}"); in zend_ast_export_class_no_header()
1664 static ZEND_COLD void zend_ast_export_attribute_group(smart_str *str, zend_ast *ast, int indent) { in zend_ast_export_attribute_group() argument
1670 smart_str_appends(str, ", "); in zend_ast_export_attribute_group()
1672 zend_ast_export_ns_name(str, attr->child[0], 0, indent); in zend_ast_export_attribute_group()
1675 smart_str_appendc(str, '('); in zend_ast_export_attribute_group()
1676 zend_ast_export_ex(str, attr->child[1], 0, indent); in zend_ast_export_attribute_group()
1677 smart_str_appendc(str, ')'); in zend_ast_export_attribute_group()
1682 static ZEND_COLD void zend_ast_export_attributes(smart_str *str, zend_ast *ast, int indent, bool ne… in zend_ast_export_attributes() argument
1687 smart_str_appends(str, "#["); in zend_ast_export_attributes()
1688 zend_ast_export_attribute_group(str, list->child[i], indent); in zend_ast_export_attributes()
1689 smart_str_appends(str, "]"); in zend_ast_export_attributes()
1692 smart_str_appendc(str, '\n'); in zend_ast_export_attributes()
1693 zend_ast_export_indent(str, indent); in zend_ast_export_attributes()
1695 smart_str_appendc(str, ' '); in zend_ast_export_attributes()
1700 static ZEND_COLD void zend_ast_export_visibility(smart_str *str, uint32_t flags, zend_modifier_targ… in zend_ast_export_visibility() argument
1702 smart_str_appends(str, "public "); in zend_ast_export_visibility()
1704 smart_str_appends(str, "protected "); in zend_ast_export_visibility()
1706 smart_str_appends(str, "private "); in zend_ast_export_visibility()
1711 smart_str_appends(str, "private(set) "); in zend_ast_export_visibility()
1713 smart_str_appends(str, "protected(set) "); in zend_ast_export_visibility()
1715 smart_str_appends(str, "public(set) "); in zend_ast_export_visibility()
1720 static ZEND_COLD void zend_ast_export_type(smart_str *str, zend_ast *ast, int indent) { in zend_ast_export_type() argument
1725 smart_str_appendc(str, '|'); in zend_ast_export_type()
1727 zend_ast_export_type(str, list->child[i], indent); in zend_ast_export_type()
1735 smart_str_appendc(str, '&'); in zend_ast_export_type()
1737 zend_ast_export_type(str, list->child[i], indent); in zend_ast_export_type()
1742 smart_str_appendc(str, '?'); in zend_ast_export_type()
1744 zend_ast_export_ns_name(str, ast, 0, indent); in zend_ast_export_type()
1789 static ZEND_COLD void zend_ast_export_ex(smart_str *str, zend_ast *ast, int priority, int indent) in zend_ast_export_ex() argument
1802 zend_ast_export_zval(str, zend_ast_get_zval(ast), priority, indent); in zend_ast_export_ex()
1806 smart_str_appendl(str, ZSTR_VAL(name), ZSTR_LEN(name)); in zend_ast_export_ex()
1810 smart_str_appendl(str, "__CLASS__", sizeof("__CLASS__")-1); in zend_ast_export_ex()
1825 zend_ast_export_attributes(str, decl->child[4], indent, newlines); in zend_ast_export_ex()
1828 zend_ast_export_visibility(str, decl->flags, ZEND_MODIFIER_TARGET_METHOD); in zend_ast_export_ex()
1831 smart_str_appends(str, "static "); in zend_ast_export_ex()
1834 smart_str_appends(str, "abstract "); in zend_ast_export_ex()
1837 smart_str_appends(str, "final "); in zend_ast_export_ex()
1840 smart_str_appends(str, "fn"); in zend_ast_export_ex()
1842 smart_str_appends(str, "function "); in zend_ast_export_ex()
1845 smart_str_appendc(str, '&'); in zend_ast_export_ex()
1848 smart_str_appendl(str, ZSTR_VAL(decl->name), ZSTR_LEN(decl->name)); in zend_ast_export_ex()
1850 smart_str_appendc(str, '('); in zend_ast_export_ex()
1851 zend_ast_export_ex(str, decl->child[0], 0, indent); in zend_ast_export_ex()
1852 smart_str_appendc(str, ')'); in zend_ast_export_ex()
1853 zend_ast_export_ex(str, decl->child[1], 0, indent); in zend_ast_export_ex()
1855 smart_str_appends(str, ": "); in zend_ast_export_ex()
1856 zend_ast_export_type(str, decl->child[3], indent); in zend_ast_export_ex()
1864 smart_str_appends(str, " => "); in zend_ast_export_ex()
1865 zend_ast_export_ex(str, body, 0, indent); in zend_ast_export_ex()
1869 smart_str_appends(str, " {\n"); in zend_ast_export_ex()
1870 zend_ast_export_stmt(str, decl->child[2], indent + 1); in zend_ast_export_ex()
1871 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
1872 smart_str_appendc(str, '}'); in zend_ast_export_ex()
1874 smart_str_appendc(str, '\n'); in zend_ast_export_ex()
1877 smart_str_appends(str, ";\n"); in zend_ast_export_ex()
1883 zend_ast_export_attributes(str, decl->child[3], indent, 1); in zend_ast_export_ex()
1886 smart_str_appends(str, "interface "); in zend_ast_export_ex()
1888 smart_str_appends(str, "trait "); in zend_ast_export_ex()
1890 smart_str_appends(str, "enum "); in zend_ast_export_ex()
1893 smart_str_appends(str, "abstract "); in zend_ast_export_ex()
1896 smart_str_appends(str, "final "); in zend_ast_export_ex()
1899 smart_str_appends(str, "readonly "); in zend_ast_export_ex()
1901 smart_str_appends(str, "class "); in zend_ast_export_ex()
1903 smart_str_appendl(str, ZSTR_VAL(decl->name), ZSTR_LEN(decl->name)); in zend_ast_export_ex()
1905 smart_str_appends(str, ": "); in zend_ast_export_ex()
1906 zend_ast_export_type(str, decl->child[4], indent); in zend_ast_export_ex()
1908 zend_ast_export_class_no_header(str, decl, indent); in zend_ast_export_ex()
1909 smart_str_appendc(str, '\n'); in zend_ast_export_ex()
1917 zend_ast_export_list(str, (zend_ast_list*)ast, 1, 20, indent); in zend_ast_export_ex()
1920 smart_str_appendc(str, '['); in zend_ast_export_ex()
1921 zend_ast_export_list(str, (zend_ast_list*)ast, 1, 20, indent); in zend_ast_export_ex()
1922 smart_str_appendc(str, ']'); in zend_ast_export_ex()
1925 smart_str_appendc(str, '"'); in zend_ast_export_ex()
1926 zend_ast_export_encaps_list(str, '"', (zend_ast_list*)ast, indent); in zend_ast_export_ex()
1927 smart_str_appendc(str, '"'); in zend_ast_export_ex()
1931 zend_ast_export_stmt(str, ast, indent); in zend_ast_export_ex()
1934 zend_ast_export_if_stmt(str, (zend_ast_list*)ast, indent); in zend_ast_export_ex()
1939 zend_ast_export_list(str, (zend_ast_list*)ast, 0, 0, indent); in zend_ast_export_ex()
1942 smart_str_appends(str, " use("); in zend_ast_export_ex()
1943 zend_ast_export_var_list(str, (zend_ast_list*)ast, indent); in zend_ast_export_ex()
1944 smart_str_appendc(str, ')'); in zend_ast_export_ex()
1951 zend_ast_export_attributes(str, ast->child[2], indent, 1); in zend_ast_export_ex()
1954 zend_ast_export_visibility(str, ast->attr, ZEND_MODIFIER_TARGET_PROPERTY); in zend_ast_export_ex()
1957 smart_str_appends(str, "static "); in zend_ast_export_ex()
1960 smart_str_appends(str, "readonly "); in zend_ast_export_ex()
1964 zend_ast_export_type(str, type_ast, indent); in zend_ast_export_ex()
1965 smart_str_appendc(str, ' '); in zend_ast_export_ex()
1973 smart_str_appends(str, "const "); in zend_ast_export_ex()
1977 zend_ast_export_attributes(str, ast->child[1], indent, 1); in zend_ast_export_ex()
1980 zend_ast_export_visibility(str, ast->attr, ZEND_MODIFIER_TARGET_CONSTANT); in zend_ast_export_ex()
1981 smart_str_appends(str, "const "); in zend_ast_export_ex()
1983 zend_ast_export_type(str, ast->child[2], indent); in zend_ast_export_ex()
1984 smart_str_appendc(str, ' '); in zend_ast_export_ex()
1991 zend_ast_export_name_list(str, (zend_ast_list*)ast, indent); in zend_ast_export_ex()
1994 smart_str_appends(str, "use "); in zend_ast_export_ex()
1996 smart_str_appends(str, "function "); in zend_ast_export_ex()
1998 smart_str_appends(str, "const "); in zend_ast_export_ex()
2029 smart_str_appendc(str, '$'); in zend_ast_export_ex()
2030 zend_ast_export_var(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2033 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2036 smart_str_appends(str, "..."); in zend_ast_export_ex()
2060 smart_str_appendc(str, '`'); in zend_ast_export_ex()
2062 zend_ast_export_encaps_list(str, '`', (zend_ast_list*)ast->child[0], indent); in zend_ast_export_ex()
2068 zend_ast_export_qstr(str, '`', Z_STR_P(zv)); in zend_ast_export_ex()
2070 smart_str_appendc(str, '`'); in zend_ast_export_ex()
2116 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2117 smart_str_appendc(str, ':'); in zend_ast_export_ex()
2120 smart_str_appendc(str, '&'); in zend_ast_export_ex()
2130 smart_str_appends(str, "goto "); in zend_ast_export_ex()
2131 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2140 zend_ast_export_ex(str, ast->child[0], 260, indent); in zend_ast_export_ex()
2141 smart_str_appendc(str, '['); in zend_ast_export_ex()
2143 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2145 smart_str_appendc(str, ']'); in zend_ast_export_ex()
2149 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2150 smart_str_appends(str, ast->kind == ZEND_AST_NULLSAFE_PROP ? "?->" : "->"); in zend_ast_export_ex()
2151 zend_ast_export_var(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2154 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2155 smart_str_appends(str, "::$"); in zend_ast_export_ex()
2156 zend_ast_export_var(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2159 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2160 smart_str_appendc(str, '('); in zend_ast_export_ex()
2161 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2162 smart_str_appendc(str, ')'); in zend_ast_export_ex()
2165 smart_str_append(str, Z_STR_P(zend_ast_get_zval(ast->child[0]))); in zend_ast_export_ex()
2166 smart_str_appendc(str, '('); in zend_ast_export_ex()
2167 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2168 smart_str_appendc(str, ')'); in zend_ast_export_ex()
2171 smart_str_appends(str, "..."); in zend_ast_export_ex()
2174 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2175 smart_str_appends(str, "::"); in zend_ast_export_ex()
2176 zend_ast_export_name(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2183 smart_str_appends(str, "self"); in zend_ast_export_ex()
2186 smart_str_appends(str, "parent"); in zend_ast_export_ex()
2191 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2193 smart_str_appends(str, "::class"); in zend_ast_export_ex()
2246 zend_ast_export_ex(str, ast->child[1], 80, indent); in zend_ast_export_ex()
2247 smart_str_appends(str, " => "); in zend_ast_export_ex()
2250 smart_str_appendc(str, '&'); in zend_ast_export_ex()
2251 zend_ast_export_ex(str, ast->child[0], 80, indent); in zend_ast_export_ex()
2254 smart_str_appends(str, "new "); in zend_ast_export_ex()
2258 zend_ast_export_attributes(str, decl->child[3], indent, 0); in zend_ast_export_ex()
2260 smart_str_appends(str, "class"); in zend_ast_export_ex()
2263 smart_str_appendc(str, '('); in zend_ast_export_ex()
2264 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2265 smart_str_appendc(str, ')'); in zend_ast_export_ex()
2267 zend_ast_export_class_no_header(str, decl, indent); in zend_ast_export_ex()
2269 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2270 smart_str_appendc(str, '('); in zend_ast_export_ex()
2271 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2272 smart_str_appendc(str, ')'); in zend_ast_export_ex()
2276 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2277 smart_str_appends(str, " instanceof "); in zend_ast_export_ex()
2278 zend_ast_export_ns_name(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2281 if (priority > 70) smart_str_appendc(str, '('); in zend_ast_export_ex()
2282 smart_str_appends(str, "yield "); in zend_ast_export_ex()
2285 zend_ast_export_ex(str, ast->child[1], 70, indent); in zend_ast_export_ex()
2286 smart_str_appends(str, " => "); in zend_ast_export_ex()
2288 zend_ast_export_ex(str, ast->child[0], 70, indent); in zend_ast_export_ex()
2290 if (priority > 70) smart_str_appendc(str, ')'); in zend_ast_export_ex()
2296 smart_str_appends(str, "static $"); in zend_ast_export_ex()
2297 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2300 smart_str_appends(str, "while ("); in zend_ast_export_ex()
2301 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2302 smart_str_appends(str, ") {\n"); in zend_ast_export_ex()
2303 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_ex()
2304 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2305 smart_str_appendc(str, '}'); in zend_ast_export_ex()
2308 smart_str_appends(str, "do {\n"); in zend_ast_export_ex()
2309 zend_ast_export_stmt(str, ast->child[0], indent + 1); in zend_ast_export_ex()
2310 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2311 smart_str_appends(str, "} while ("); in zend_ast_export_ex()
2312 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2313 smart_str_appendc(str, ')'); in zend_ast_export_ex()
2318 smart_str_appends(str, "if ("); in zend_ast_export_ex()
2319 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2320 smart_str_appends(str, ") {\n"); in zend_ast_export_ex()
2321 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_ex()
2323 smart_str_appends(str, "else {\n"); in zend_ast_export_ex()
2324 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_ex()
2326 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2327 smart_str_appendc(str, '}'); in zend_ast_export_ex()
2330 smart_str_appends(str, "switch ("); in zend_ast_export_ex()
2331 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2332 smart_str_appends(str, ") {\n"); in zend_ast_export_ex()
2333 zend_ast_export_ex(str, ast->child[1], 0, indent + 1); in zend_ast_export_ex()
2334 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2335 smart_str_appendc(str, '}'); in zend_ast_export_ex()
2338 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2340 smart_str_appends(str, "case "); in zend_ast_export_ex()
2341 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2342 smart_str_appends(str, ":\n"); in zend_ast_export_ex()
2344 smart_str_appends(str, "default:\n"); in zend_ast_export_ex()
2346 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_ex()
2349 smart_str_appends(str, "match ("); in zend_ast_export_ex()
2350 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2351 smart_str_appends(str, ") {\n"); in zend_ast_export_ex()
2352 zend_ast_export_ex(str, ast->child[1], 0, indent + 1); in zend_ast_export_ex()
2353 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2354 smart_str_appendc(str, '}'); in zend_ast_export_ex()
2357 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2359 zend_ast_export_list(str, (zend_ast_list*)ast->child[0], 1, 0, indent); in zend_ast_export_ex()
2360 smart_str_appends(str, " => "); in zend_ast_export_ex()
2362 smart_str_appends(str, "default => "); in zend_ast_export_ex()
2364 zend_ast_export_ex(str, ast->child[1], 0, 0); in zend_ast_export_ex()
2365 smart_str_appends(str, ",\n"); in zend_ast_export_ex()
2368 smart_str_appends(str, "declare("); in zend_ast_export_ex()
2370 zend_ast_export_list(str, (zend_ast_list*)ast->child[0], 1, 0, indent); in zend_ast_export_ex()
2371 smart_str_appendc(str, ')'); in zend_ast_export_ex()
2373 smart_str_appends(str, " {\n"); in zend_ast_export_ex()
2374 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_ex()
2375 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2376 smart_str_appendc(str, '}'); in zend_ast_export_ex()
2378 smart_str_appendc(str, ';'); in zend_ast_export_ex()
2382 smart_str_appendc(str, '$'); in zend_ast_export_ex()
2383 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2387 smart_str_appends(str, " = "); in zend_ast_export_ex()
2388 zend_ast_export_ex(str, default_value, 0, indent + 1); in zend_ast_export_ex()
2394 smart_str_appends(str, " {"); in zend_ast_export_ex()
2395 smart_str_appendc(str, '\n'); in zend_ast_export_ex()
2397 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2401 zend_ast_export_visibility(str, hook->flags, ZEND_MODIFIER_TARGET_PROPERTY); in zend_ast_export_ex()
2403 smart_str_appends(str, "final "); in zend_ast_export_ex()
2407 smart_str_appends(str, "get"); in zend_ast_export_ex()
2410 smart_str_appends(str, "set"); in zend_ast_export_ex()
2415 smart_str_appendc(str, ';'); in zend_ast_export_ex()
2417 smart_str_appends(str, " => "); in zend_ast_export_ex()
2418 zend_ast_export_ex(str, body->child[0], 0, indent); in zend_ast_export_ex()
2419 smart_str_appendc(str, ';'); in zend_ast_export_ex()
2421 smart_str_appends(str, " {\n"); in zend_ast_export_ex()
2422 zend_ast_export_stmt(str, body, indent + 1); in zend_ast_export_ex()
2423 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2424 smart_str_appendc(str, '}'); in zend_ast_export_ex()
2427 smart_str_appendc(str, '\n'); in zend_ast_export_ex()
2428 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2431 smart_str_appendc(str, '\n'); in zend_ast_export_ex()
2433 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2434 smart_str_appendc(str, '}'); in zend_ast_export_ex()
2438 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2441 smart_str_appends(str, "use "); in zend_ast_export_ex()
2442 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2444 smart_str_appends(str, " {\n"); in zend_ast_export_ex()
2445 zend_ast_export_ex(str, ast->child[1], 0, indent + 1); in zend_ast_export_ex()
2446 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2447 smart_str_appends(str, "}"); in zend_ast_export_ex()
2449 smart_str_appends(str, ";"); in zend_ast_export_ex()
2453 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2454 smart_str_appends(str, " insteadof "); in zend_ast_export_ex()
2455 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2459 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2460 smart_str_appends(str, "::"); in zend_ast_export_ex()
2462 zend_ast_export_name(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2465 smart_str_appends(str, "namespace"); in zend_ast_export_ex()
2467 smart_str_appendc(str, ' '); in zend_ast_export_ex()
2468 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2471 smart_str_appends(str, " {\n"); in zend_ast_export_ex()
2472 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_ex()
2473 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2474 smart_str_appends(str, "}\n"); in zend_ast_export_ex()
2476 smart_str_appendc(str, ';'); in zend_ast_export_ex()
2481 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2483 smart_str_appends(str, " as public"); in zend_ast_export_ex()
2485 smart_str_appends(str, " as protected"); in zend_ast_export_ex()
2487 smart_str_appends(str, " as private"); in zend_ast_export_ex()
2489 smart_str_appends(str, " as"); in zend_ast_export_ex()
2492 smart_str_appendc(str, ' '); in zend_ast_export_ex()
2493 zend_ast_export_name(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2497 smart_str_append(str, zend_ast_get_str(ast->child[0])); in zend_ast_export_ex()
2498 smart_str_appends(str, ": "); in zend_ast_export_ex()
2505 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2506 smart_str_appends(str, ast->kind == ZEND_AST_NULLSAFE_METHOD_CALL ? "?->" : "->"); in zend_ast_export_ex()
2507 zend_ast_export_var(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2508 smart_str_appendc(str, '('); in zend_ast_export_ex()
2509 zend_ast_export_ex(str, ast->child[2], 0, indent); in zend_ast_export_ex()
2510 smart_str_appendc(str, ')'); in zend_ast_export_ex()
2513 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2514 smart_str_appends(str, "::"); in zend_ast_export_ex()
2515 zend_ast_export_var(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2516 smart_str_appendc(str, '('); in zend_ast_export_ex()
2517 zend_ast_export_ex(str, ast->child[2], 0, indent); in zend_ast_export_ex()
2518 smart_str_appendc(str, ')'); in zend_ast_export_ex()
2521 if (priority > 100) smart_str_appendc(str, '('); in zend_ast_export_ex()
2522 zend_ast_export_ex(str, ast->child[0], 100, indent); in zend_ast_export_ex()
2524 smart_str_appends(str, " ? "); in zend_ast_export_ex()
2525 zend_ast_export_ex(str, ast->child[1], 101, indent); in zend_ast_export_ex()
2526 smart_str_appends(str, " : "); in zend_ast_export_ex()
2528 smart_str_appends(str, " ?: "); in zend_ast_export_ex()
2530 zend_ast_export_ex(str, ast->child[2], 101, indent); in zend_ast_export_ex()
2531 if (priority > 100) smart_str_appendc(str, ')'); in zend_ast_export_ex()
2535 smart_str_appends(str, "try {\n"); in zend_ast_export_ex()
2536 zend_ast_export_stmt(str, ast->child[0], indent + 1); in zend_ast_export_ex()
2537 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2538 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2540 smart_str_appends(str, "} finally {\n"); in zend_ast_export_ex()
2541 zend_ast_export_stmt(str, ast->child[2], indent + 1); in zend_ast_export_ex()
2542 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2544 smart_str_appendc(str, '}'); in zend_ast_export_ex()
2547 smart_str_appends(str, "} catch ("); in zend_ast_export_ex()
2548 zend_ast_export_catch_name_list(str, zend_ast_get_list(ast->child[0]), indent); in zend_ast_export_ex()
2550 smart_str_appends(str, " $"); in zend_ast_export_ex()
2551 zend_ast_export_var(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2553 smart_str_appends(str, ") {\n"); in zend_ast_export_ex()
2554 zend_ast_export_stmt(str, ast->child[2], indent + 1); in zend_ast_export_ex()
2555 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2559 zend_ast_export_attributes(str, ast->child[3], indent, 0); in zend_ast_export_ex()
2562 zend_ast_export_type(str, ast->child[0], indent); in zend_ast_export_ex()
2563 smart_str_appendc(str, ' '); in zend_ast_export_ex()
2566 smart_str_appendc(str, '&'); in zend_ast_export_ex()
2569 smart_str_appends(str, "..."); in zend_ast_export_ex()
2571 smart_str_appendc(str, '$'); in zend_ast_export_ex()
2572 zend_ast_export_name(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2576 zend_ast_export_attributes(str, ast->child[3], indent, 1); in zend_ast_export_ex()
2578 smart_str_appends(str, "case "); in zend_ast_export_ex()
2579 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2581 smart_str_appends(str, " = "); in zend_ast_export_ex()
2582 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2588 smart_str_appends(str, "for ("); in zend_ast_export_ex()
2589 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2590 smart_str_appendc(str, ';'); in zend_ast_export_ex()
2592 smart_str_appendc(str, ' '); in zend_ast_export_ex()
2593 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2595 smart_str_appendc(str, ';'); in zend_ast_export_ex()
2597 smart_str_appendc(str, ' '); in zend_ast_export_ex()
2598 zend_ast_export_ex(str, ast->child[2], 0, indent); in zend_ast_export_ex()
2600 smart_str_appends(str, ") {\n"); in zend_ast_export_ex()
2601 zend_ast_export_stmt(str, ast->child[3], indent + 1); in zend_ast_export_ex()
2602 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2603 smart_str_appendc(str, '}'); in zend_ast_export_ex()
2606 smart_str_appends(str, "foreach ("); in zend_ast_export_ex()
2607 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2608 smart_str_appends(str, " as "); in zend_ast_export_ex()
2610 zend_ast_export_ex(str, ast->child[2], 0, indent); in zend_ast_export_ex()
2611 smart_str_appends(str, " => "); in zend_ast_export_ex()
2613 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2614 smart_str_appends(str, ") {\n"); in zend_ast_export_ex()
2615 zend_ast_export_stmt(str, ast->child[3], indent + 1); in zend_ast_export_ex()
2616 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2617 smart_str_appendc(str, '}'); in zend_ast_export_ex()
2624 if (priority > p) smart_str_appendc(str, '('); in zend_ast_export_ex()
2625 zend_ast_export_ex(str, ast->child[0], pl, indent); in zend_ast_export_ex()
2626 smart_str_appends(str, op); in zend_ast_export_ex()
2627 zend_ast_export_ex(str, ast->child[1], pr, indent); in zend_ast_export_ex()
2628 if (priority > p) smart_str_appendc(str, ')'); in zend_ast_export_ex()
2632 if (priority > p) smart_str_appendc(str, '('); in zend_ast_export_ex()
2633 smart_str_appends(str, op); in zend_ast_export_ex()
2634 zend_ast_export_ex(str, ast->child[0], pl, indent); in zend_ast_export_ex()
2635 if (priority > p) smart_str_appendc(str, ')'); in zend_ast_export_ex()
2639 if (priority > p) smart_str_appendc(str, '('); in zend_ast_export_ex()
2640 zend_ast_export_ex(str, ast->child[0], pl, indent); in zend_ast_export_ex()
2641 smart_str_appends(str, op); in zend_ast_export_ex()
2642 if (priority > p) smart_str_appendc(str, ')'); in zend_ast_export_ex()
2646 smart_str_appends(str, op); in zend_ast_export_ex()
2647 smart_str_appendc(str, '('); in zend_ast_export_ex()
2648 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2649 smart_str_appendc(str, ')'); in zend_ast_export_ex()
2653 smart_str_appends(str, op); in zend_ast_export_ex()
2655 smart_str_appendc(str, ' '); in zend_ast_export_ex()
2662 smart_str_appends(str, op); in zend_ast_export_ex()
2667 smart_str_appends(str, " = "); in zend_ast_export_ex()
2676 smart_str str = {0}; in zend_ast_export() local
2678 smart_str_appends(&str, prefix); in zend_ast_export()
2679 zend_ast_export_ex(&str, ast, 0, 0); in zend_ast_export()
2680 smart_str_appends(&str, suffix); in zend_ast_export()
2681 smart_str_0(&str); in zend_ast_export()
2682 return str.s; in zend_ast_export()