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()
1747 static ZEND_COLD void zend_ast_export_hook_list(smart_str *str, zend_ast_list *hook_list, int inden… in zend_ast_export_hook_list() argument
1749 smart_str_appends(str, " {"); in zend_ast_export_hook_list()
1750 smart_str_appendc(str, '\n'); in zend_ast_export_hook_list()
1752 zend_ast_export_indent(str, indent); in zend_ast_export_hook_list()
1756 zend_ast_export_visibility(str, hook->flags, ZEND_MODIFIER_TARGET_PROPERTY); in zend_ast_export_hook_list()
1758 smart_str_appends(str, "final "); in zend_ast_export_hook_list()
1760 smart_str_append(str, hook->name); in zend_ast_export_hook_list()
1763 smart_str_appendc(str, ';'); in zend_ast_export_hook_list()
1765 smart_str_appends(str, " => "); in zend_ast_export_hook_list()
1766 zend_ast_export_ex(str, body->child[0], 0, indent); in zend_ast_export_hook_list()
1767 smart_str_appendc(str, ';'); in zend_ast_export_hook_list()
1769 smart_str_appends(str, " {\n"); in zend_ast_export_hook_list()
1770 zend_ast_export_stmt(str, body, indent + 1); in zend_ast_export_hook_list()
1771 zend_ast_export_indent(str, indent); in zend_ast_export_hook_list()
1772 smart_str_appendc(str, '}'); in zend_ast_export_hook_list()
1775 smart_str_appendc(str, '\n'); in zend_ast_export_hook_list()
1776 zend_ast_export_indent(str, indent); in zend_ast_export_hook_list()
1779 smart_str_appendc(str, '\n'); in zend_ast_export_hook_list()
1781 zend_ast_export_indent(str, indent); in zend_ast_export_hook_list()
1782 smart_str_appendc(str, '}'); in zend_ast_export_hook_list()
1827 static ZEND_COLD void zend_ast_export_ex(smart_str *str, zend_ast *ast, int priority, int indent) in zend_ast_export_ex() argument
1840 zend_ast_export_zval(str, zend_ast_get_zval(ast), priority, indent); in zend_ast_export_ex()
1844 smart_str_appendl(str, ZSTR_VAL(name), ZSTR_LEN(name)); in zend_ast_export_ex()
1848 smart_str_appendl(str, "__CLASS__", sizeof("__CLASS__")-1); in zend_ast_export_ex()
1863 zend_ast_export_attributes(str, decl->child[4], indent, newlines); in zend_ast_export_ex()
1866 zend_ast_export_visibility(str, decl->flags, ZEND_MODIFIER_TARGET_METHOD); in zend_ast_export_ex()
1869 smart_str_appends(str, "static "); in zend_ast_export_ex()
1872 smart_str_appends(str, "abstract "); in zend_ast_export_ex()
1875 smart_str_appends(str, "final "); in zend_ast_export_ex()
1878 smart_str_appends(str, "fn"); in zend_ast_export_ex()
1880 smart_str_appends(str, "function "); in zend_ast_export_ex()
1883 smart_str_appendc(str, '&'); in zend_ast_export_ex()
1886 smart_str_appendl(str, ZSTR_VAL(decl->name), ZSTR_LEN(decl->name)); in zend_ast_export_ex()
1888 smart_str_appendc(str, '('); in zend_ast_export_ex()
1889 zend_ast_export_ex(str, decl->child[0], 0, indent); in zend_ast_export_ex()
1890 smart_str_appendc(str, ')'); in zend_ast_export_ex()
1891 zend_ast_export_ex(str, decl->child[1], 0, indent); in zend_ast_export_ex()
1893 smart_str_appends(str, ": "); in zend_ast_export_ex()
1894 zend_ast_export_type(str, decl->child[3], indent); in zend_ast_export_ex()
1902 smart_str_appends(str, " => "); in zend_ast_export_ex()
1903 zend_ast_export_ex(str, body, 0, indent); in zend_ast_export_ex()
1907 smart_str_appends(str, " {\n"); in zend_ast_export_ex()
1908 zend_ast_export_stmt(str, decl->child[2], indent + 1); in zend_ast_export_ex()
1909 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
1910 smart_str_appendc(str, '}'); in zend_ast_export_ex()
1912 smart_str_appendc(str, '\n'); in zend_ast_export_ex()
1915 smart_str_appends(str, ";\n"); in zend_ast_export_ex()
1921 zend_ast_export_attributes(str, decl->child[3], indent, 1); in zend_ast_export_ex()
1924 smart_str_appends(str, "interface "); in zend_ast_export_ex()
1926 smart_str_appends(str, "trait "); in zend_ast_export_ex()
1928 smart_str_appends(str, "enum "); in zend_ast_export_ex()
1931 smart_str_appends(str, "abstract "); in zend_ast_export_ex()
1934 smart_str_appends(str, "final "); in zend_ast_export_ex()
1937 smart_str_appends(str, "readonly "); in zend_ast_export_ex()
1939 smart_str_appends(str, "class "); in zend_ast_export_ex()
1941 smart_str_appendl(str, ZSTR_VAL(decl->name), ZSTR_LEN(decl->name)); in zend_ast_export_ex()
1943 smart_str_appends(str, ": "); in zend_ast_export_ex()
1944 zend_ast_export_type(str, decl->child[4], indent); in zend_ast_export_ex()
1946 zend_ast_export_class_no_header(str, decl, indent); in zend_ast_export_ex()
1947 smart_str_appendc(str, '\n'); in zend_ast_export_ex()
1955 zend_ast_export_list(str, (zend_ast_list*)ast, 1, 20, indent); in zend_ast_export_ex()
1958 smart_str_appendc(str, '['); in zend_ast_export_ex()
1959 zend_ast_export_list(str, (zend_ast_list*)ast, 1, 20, indent); in zend_ast_export_ex()
1960 smart_str_appendc(str, ']'); in zend_ast_export_ex()
1963 smart_str_appendc(str, '"'); in zend_ast_export_ex()
1964 zend_ast_export_encaps_list(str, '"', (zend_ast_list*)ast, indent); in zend_ast_export_ex()
1965 smart_str_appendc(str, '"'); in zend_ast_export_ex()
1969 zend_ast_export_stmt(str, ast, indent); in zend_ast_export_ex()
1972 zend_ast_export_if_stmt(str, (zend_ast_list*)ast, indent); in zend_ast_export_ex()
1977 zend_ast_export_list(str, (zend_ast_list*)ast, 0, 0, indent); in zend_ast_export_ex()
1980 smart_str_appends(str, " use("); in zend_ast_export_ex()
1981 zend_ast_export_var_list(str, (zend_ast_list*)ast, indent); in zend_ast_export_ex()
1982 smart_str_appendc(str, ')'); in zend_ast_export_ex()
1989 zend_ast_export_attributes(str, ast->child[2], indent, 1); in zend_ast_export_ex()
1992 zend_ast_export_visibility(str, ast->attr, ZEND_MODIFIER_TARGET_PROPERTY); in zend_ast_export_ex()
1995 smart_str_appends(str, "static "); in zend_ast_export_ex()
1998 smart_str_appends(str, "readonly "); in zend_ast_export_ex()
2002 zend_ast_export_type(str, type_ast, indent); in zend_ast_export_ex()
2003 smart_str_appendc(str, ' '); in zend_ast_export_ex()
2011 smart_str_appends(str, "const "); in zend_ast_export_ex()
2015 zend_ast_export_attributes(str, ast->child[1], indent, 1); in zend_ast_export_ex()
2018 zend_ast_export_visibility(str, ast->attr, ZEND_MODIFIER_TARGET_CONSTANT); in zend_ast_export_ex()
2019 smart_str_appends(str, "const "); in zend_ast_export_ex()
2021 zend_ast_export_type(str, ast->child[2], indent); in zend_ast_export_ex()
2022 smart_str_appendc(str, ' '); in zend_ast_export_ex()
2029 zend_ast_export_name_list(str, (zend_ast_list*)ast, indent); in zend_ast_export_ex()
2032 smart_str_appends(str, "use "); in zend_ast_export_ex()
2034 smart_str_appends(str, "function "); in zend_ast_export_ex()
2036 smart_str_appends(str, "const "); in zend_ast_export_ex()
2067 smart_str_appendc(str, '$'); in zend_ast_export_ex()
2068 zend_ast_export_var(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2071 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2074 smart_str_appends(str, "..."); in zend_ast_export_ex()
2098 smart_str_appendc(str, '`'); in zend_ast_export_ex()
2100 zend_ast_export_encaps_list(str, '`', (zend_ast_list*)ast->child[0], indent); in zend_ast_export_ex()
2106 zend_ast_export_qstr(str, '`', Z_STR_P(zv)); in zend_ast_export_ex()
2108 smart_str_appendc(str, '`'); in zend_ast_export_ex()
2154 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2155 smart_str_appendc(str, ':'); in zend_ast_export_ex()
2158 smart_str_appendc(str, '&'); in zend_ast_export_ex()
2168 smart_str_appends(str, "goto "); in zend_ast_export_ex()
2169 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2178 zend_ast_export_ex(str, ast->child[0], 260, indent); in zend_ast_export_ex()
2179 smart_str_appendc(str, '['); in zend_ast_export_ex()
2181 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2183 smart_str_appendc(str, ']'); in zend_ast_export_ex()
2187 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2188 smart_str_appends(str, ast->kind == ZEND_AST_NULLSAFE_PROP ? "?->" : "->"); in zend_ast_export_ex()
2189 zend_ast_export_var(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2192 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2193 smart_str_appends(str, "::$"); in zend_ast_export_ex()
2194 zend_ast_export_var(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2197 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2198 smart_str_appendc(str, '('); in zend_ast_export_ex()
2199 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2200 smart_str_appendc(str, ')'); in zend_ast_export_ex()
2203 smart_str_append(str, Z_STR_P(zend_ast_get_zval(ast->child[0]))); in zend_ast_export_ex()
2204 smart_str_appendc(str, '('); in zend_ast_export_ex()
2205 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2206 smart_str_appendc(str, ')'); in zend_ast_export_ex()
2209 smart_str_appends(str, "..."); in zend_ast_export_ex()
2212 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2213 smart_str_appends(str, "::"); in zend_ast_export_ex()
2214 zend_ast_export_name(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2221 smart_str_appends(str, "self"); in zend_ast_export_ex()
2224 smart_str_appends(str, "parent"); in zend_ast_export_ex()
2229 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2231 smart_str_appends(str, "::class"); in zend_ast_export_ex()
2284 zend_ast_export_ex(str, ast->child[1], 80, indent); in zend_ast_export_ex()
2285 smart_str_appends(str, " => "); in zend_ast_export_ex()
2288 smart_str_appendc(str, '&'); in zend_ast_export_ex()
2289 zend_ast_export_ex(str, ast->child[0], 80, indent); in zend_ast_export_ex()
2292 smart_str_appends(str, "new "); in zend_ast_export_ex()
2296 zend_ast_export_attributes(str, decl->child[3], indent, 0); in zend_ast_export_ex()
2298 smart_str_appends(str, "class"); in zend_ast_export_ex()
2301 smart_str_appendc(str, '('); in zend_ast_export_ex()
2302 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2303 smart_str_appendc(str, ')'); in zend_ast_export_ex()
2305 zend_ast_export_class_no_header(str, decl, indent); in zend_ast_export_ex()
2307 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2308 smart_str_appendc(str, '('); in zend_ast_export_ex()
2309 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2310 smart_str_appendc(str, ')'); in zend_ast_export_ex()
2314 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2315 smart_str_appends(str, " instanceof "); in zend_ast_export_ex()
2316 zend_ast_export_ns_name(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2319 if (priority > 70) smart_str_appendc(str, '('); in zend_ast_export_ex()
2320 smart_str_appends(str, "yield "); in zend_ast_export_ex()
2323 zend_ast_export_ex(str, ast->child[1], 70, indent); in zend_ast_export_ex()
2324 smart_str_appends(str, " => "); in zend_ast_export_ex()
2326 zend_ast_export_ex(str, ast->child[0], 70, indent); in zend_ast_export_ex()
2328 if (priority > 70) smart_str_appendc(str, ')'); in zend_ast_export_ex()
2334 smart_str_appends(str, "static $"); in zend_ast_export_ex()
2335 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2338 smart_str_appends(str, "while ("); in zend_ast_export_ex()
2339 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2340 smart_str_appends(str, ") {\n"); in zend_ast_export_ex()
2341 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_ex()
2342 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2343 smart_str_appendc(str, '}'); in zend_ast_export_ex()
2346 smart_str_appends(str, "do {\n"); in zend_ast_export_ex()
2347 zend_ast_export_stmt(str, ast->child[0], indent + 1); in zend_ast_export_ex()
2348 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2349 smart_str_appends(str, "} while ("); in zend_ast_export_ex()
2350 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2351 smart_str_appendc(str, ')'); in zend_ast_export_ex()
2356 smart_str_appends(str, "if ("); in zend_ast_export_ex()
2357 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2358 smart_str_appends(str, ") {\n"); in zend_ast_export_ex()
2359 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_ex()
2361 smart_str_appends(str, "else {\n"); in zend_ast_export_ex()
2362 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_ex()
2364 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2365 smart_str_appendc(str, '}'); in zend_ast_export_ex()
2368 smart_str_appends(str, "switch ("); in zend_ast_export_ex()
2369 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2370 smart_str_appends(str, ") {\n"); in zend_ast_export_ex()
2371 zend_ast_export_ex(str, ast->child[1], 0, indent + 1); in zend_ast_export_ex()
2372 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2373 smart_str_appendc(str, '}'); in zend_ast_export_ex()
2376 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2378 smart_str_appends(str, "case "); in zend_ast_export_ex()
2379 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2380 smart_str_appends(str, ":\n"); in zend_ast_export_ex()
2382 smart_str_appends(str, "default:\n"); in zend_ast_export_ex()
2384 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_ex()
2387 smart_str_appends(str, "match ("); in zend_ast_export_ex()
2388 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2389 smart_str_appends(str, ") {\n"); in zend_ast_export_ex()
2390 zend_ast_export_ex(str, ast->child[1], 0, indent + 1); in zend_ast_export_ex()
2391 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2392 smart_str_appendc(str, '}'); in zend_ast_export_ex()
2395 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2397 zend_ast_export_list(str, (zend_ast_list*)ast->child[0], 1, 0, indent); in zend_ast_export_ex()
2398 smart_str_appends(str, " => "); in zend_ast_export_ex()
2400 smart_str_appends(str, "default => "); in zend_ast_export_ex()
2402 zend_ast_export_ex(str, ast->child[1], 0, 0); in zend_ast_export_ex()
2403 smart_str_appends(str, ",\n"); in zend_ast_export_ex()
2406 smart_str_appends(str, "declare("); in zend_ast_export_ex()
2408 zend_ast_export_list(str, (zend_ast_list*)ast->child[0], 1, 0, indent); in zend_ast_export_ex()
2409 smart_str_appendc(str, ')'); in zend_ast_export_ex()
2411 smart_str_appends(str, " {\n"); in zend_ast_export_ex()
2412 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_ex()
2413 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2414 smart_str_appendc(str, '}'); in zend_ast_export_ex()
2416 smart_str_appendc(str, ';'); in zend_ast_export_ex()
2420 smart_str_appendc(str, '$'); in zend_ast_export_ex()
2421 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2425 smart_str_appends(str, " = "); in zend_ast_export_ex()
2426 zend_ast_export_ex(str, default_value, 0, indent + 1); in zend_ast_export_ex()
2430 zend_ast_export_hook_list(str, zend_ast_get_list(ast->child[3]), indent); in zend_ast_export_ex()
2434 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2437 smart_str_appends(str, "use "); in zend_ast_export_ex()
2438 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2440 smart_str_appends(str, " {\n"); in zend_ast_export_ex()
2441 zend_ast_export_ex(str, ast->child[1], 0, indent + 1); in zend_ast_export_ex()
2442 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2443 smart_str_appends(str, "}"); in zend_ast_export_ex()
2445 smart_str_appends(str, ";"); in zend_ast_export_ex()
2449 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2450 smart_str_appends(str, " insteadof "); in zend_ast_export_ex()
2451 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2455 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2456 smart_str_appends(str, "::"); in zend_ast_export_ex()
2458 zend_ast_export_name(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2461 smart_str_appends(str, "namespace"); in zend_ast_export_ex()
2463 smart_str_appendc(str, ' '); in zend_ast_export_ex()
2464 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2467 smart_str_appends(str, " {\n"); in zend_ast_export_ex()
2468 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_ex()
2469 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2470 smart_str_appends(str, "}\n"); in zend_ast_export_ex()
2472 smart_str_appendc(str, ';'); in zend_ast_export_ex()
2477 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2479 smart_str_appends(str, " as public"); in zend_ast_export_ex()
2481 smart_str_appends(str, " as protected"); in zend_ast_export_ex()
2483 smart_str_appends(str, " as private"); in zend_ast_export_ex()
2485 smart_str_appends(str, " as"); in zend_ast_export_ex()
2488 smart_str_appendc(str, ' '); in zend_ast_export_ex()
2489 zend_ast_export_name(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2493 smart_str_append(str, zend_ast_get_str(ast->child[0])); in zend_ast_export_ex()
2494 smart_str_appends(str, ": "); in zend_ast_export_ex()
2501 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2502 smart_str_appends(str, ast->kind == ZEND_AST_NULLSAFE_METHOD_CALL ? "?->" : "->"); in zend_ast_export_ex()
2503 zend_ast_export_var(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2504 smart_str_appendc(str, '('); in zend_ast_export_ex()
2505 zend_ast_export_ex(str, ast->child[2], 0, indent); in zend_ast_export_ex()
2506 smart_str_appendc(str, ')'); in zend_ast_export_ex()
2509 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2510 smart_str_appends(str, "::"); in zend_ast_export_ex()
2511 zend_ast_export_var(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2512 smart_str_appendc(str, '('); in zend_ast_export_ex()
2513 zend_ast_export_ex(str, ast->child[2], 0, indent); in zend_ast_export_ex()
2514 smart_str_appendc(str, ')'); in zend_ast_export_ex()
2517 if (priority > 100) smart_str_appendc(str, '('); in zend_ast_export_ex()
2518 zend_ast_export_ex(str, ast->child[0], 100, indent); in zend_ast_export_ex()
2520 smart_str_appends(str, " ? "); in zend_ast_export_ex()
2521 zend_ast_export_ex(str, ast->child[1], 101, indent); in zend_ast_export_ex()
2522 smart_str_appends(str, " : "); in zend_ast_export_ex()
2524 smart_str_appends(str, " ?: "); in zend_ast_export_ex()
2526 zend_ast_export_ex(str, ast->child[2], 101, indent); in zend_ast_export_ex()
2527 if (priority > 100) smart_str_appendc(str, ')'); in zend_ast_export_ex()
2531 smart_str_appends(str, "try {\n"); in zend_ast_export_ex()
2532 zend_ast_export_stmt(str, ast->child[0], indent + 1); in zend_ast_export_ex()
2533 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2534 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2536 smart_str_appends(str, "} finally {\n"); in zend_ast_export_ex()
2537 zend_ast_export_stmt(str, ast->child[2], indent + 1); in zend_ast_export_ex()
2538 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2540 smart_str_appendc(str, '}'); in zend_ast_export_ex()
2543 smart_str_appends(str, "} catch ("); in zend_ast_export_ex()
2544 zend_ast_export_catch_name_list(str, zend_ast_get_list(ast->child[0]), indent); in zend_ast_export_ex()
2546 smart_str_appends(str, " $"); in zend_ast_export_ex()
2547 zend_ast_export_var(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2549 smart_str_appends(str, ") {\n"); in zend_ast_export_ex()
2550 zend_ast_export_stmt(str, ast->child[2], indent + 1); in zend_ast_export_ex()
2551 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2555 zend_ast_export_attributes(str, ast->child[3], indent, 0); in zend_ast_export_ex()
2557 zend_ast_export_visibility(str, ast->attr, ZEND_MODIFIER_TARGET_CPP); in zend_ast_export_ex()
2559 zend_ast_export_type(str, ast->child[0], indent); in zend_ast_export_ex()
2560 smart_str_appendc(str, ' '); in zend_ast_export_ex()
2563 smart_str_appendc(str, '&'); in zend_ast_export_ex()
2566 smart_str_appends(str, "..."); in zend_ast_export_ex()
2568 smart_str_appendc(str, '$'); in zend_ast_export_ex()
2569 zend_ast_export_name(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2571 smart_str_appends(str, " = "); in zend_ast_export_ex()
2572 zend_ast_export_ex(str, ast->child[2], 0, indent); in zend_ast_export_ex()
2575 zend_ast_export_hook_list(str, zend_ast_get_list(ast->child[5]), indent); in zend_ast_export_ex()
2580 zend_ast_export_attributes(str, ast->child[3], indent, 1); in zend_ast_export_ex()
2582 smart_str_appends(str, "case "); in zend_ast_export_ex()
2583 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2585 smart_str_appends(str, " = "); in zend_ast_export_ex()
2586 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2592 smart_str_appends(str, "for ("); in zend_ast_export_ex()
2593 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2594 smart_str_appendc(str, ';'); in zend_ast_export_ex()
2596 smart_str_appendc(str, ' '); in zend_ast_export_ex()
2597 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2599 smart_str_appendc(str, ';'); in zend_ast_export_ex()
2601 smart_str_appendc(str, ' '); in zend_ast_export_ex()
2602 zend_ast_export_ex(str, ast->child[2], 0, indent); in zend_ast_export_ex()
2604 smart_str_appends(str, ") {\n"); in zend_ast_export_ex()
2605 zend_ast_export_stmt(str, ast->child[3], indent + 1); in zend_ast_export_ex()
2606 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2607 smart_str_appendc(str, '}'); in zend_ast_export_ex()
2610 smart_str_appends(str, "foreach ("); in zend_ast_export_ex()
2611 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2612 smart_str_appends(str, " as "); in zend_ast_export_ex()
2614 zend_ast_export_ex(str, ast->child[2], 0, indent); in zend_ast_export_ex()
2615 smart_str_appends(str, " => "); in zend_ast_export_ex()
2617 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2618 smart_str_appends(str, ") {\n"); in zend_ast_export_ex()
2619 zend_ast_export_stmt(str, ast->child[3], indent + 1); in zend_ast_export_ex()
2620 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2621 smart_str_appendc(str, '}'); in zend_ast_export_ex()
2628 if (priority > p) smart_str_appendc(str, '('); in zend_ast_export_ex()
2629 zend_ast_export_ex(str, ast->child[0], pl, indent); in zend_ast_export_ex()
2630 smart_str_appends(str, op); in zend_ast_export_ex()
2631 zend_ast_export_ex(str, ast->child[1], pr, indent); in zend_ast_export_ex()
2632 if (priority > p) smart_str_appendc(str, ')'); in zend_ast_export_ex()
2636 if (priority > p) smart_str_appendc(str, '('); in zend_ast_export_ex()
2637 smart_str_appends(str, op); in zend_ast_export_ex()
2638 zend_ast_export_ex(str, ast->child[0], pl, indent); in zend_ast_export_ex()
2639 if (priority > p) smart_str_appendc(str, ')'); in zend_ast_export_ex()
2643 if (priority > p) smart_str_appendc(str, '('); in zend_ast_export_ex()
2644 zend_ast_export_ex(str, ast->child[0], pl, indent); in zend_ast_export_ex()
2645 smart_str_appends(str, op); in zend_ast_export_ex()
2646 if (priority > p) smart_str_appendc(str, ')'); in zend_ast_export_ex()
2650 smart_str_appends(str, op); in zend_ast_export_ex()
2651 smart_str_appendc(str, '('); in zend_ast_export_ex()
2652 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2653 smart_str_appendc(str, ')'); in zend_ast_export_ex()
2657 smart_str_appends(str, op); in zend_ast_export_ex()
2659 smart_str_appendc(str, ' '); in zend_ast_export_ex()
2666 smart_str_appends(str, op); in zend_ast_export_ex()
2671 smart_str_appends(str, " = "); in zend_ast_export_ex()
2680 smart_str str = {0}; in zend_ast_export() local
2682 smart_str_appends(&str, prefix); in zend_ast_export()
2683 zend_ast_export_ex(&str, ast, 0, 0); in zend_ast_export()
2684 smart_str_appends(&str, suffix); in zend_ast_export()
2685 smart_str_0(&str); in zend_ast_export()
2686 return str.s; in zend_ast_export()