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()
1179 static ZEND_COLD void zend_ast_export_ex(smart_str *str, zend_ast *ast, int priority, int indent);
1181 static ZEND_COLD void zend_ast_export_str(smart_str *str, zend_string *s) in zend_ast_export_str() argument
1188 smart_str_appendc(str, '\\'); in zend_ast_export_str()
1189 smart_str_appendc(str, c); in zend_ast_export_str()
1191 smart_str_appendc(str, c); in zend_ast_export_str()
1196 static ZEND_COLD void zend_ast_export_qstr(smart_str *str, char quote, zend_string *s) in zend_ast_export_qstr() argument
1205 smart_str_appends(str, "\\n"); in zend_ast_export_qstr()
1208 smart_str_appends(str, "\\r"); in zend_ast_export_qstr()
1211 smart_str_appends(str, "\\t"); in zend_ast_export_qstr()
1214 smart_str_appends(str, "\\f"); in zend_ast_export_qstr()
1217 smart_str_appends(str, "\\v"); in zend_ast_export_qstr()
1224 smart_str_appends(str, "\\e"); in zend_ast_export_qstr()
1227 smart_str_appends(str, "\\0"); in zend_ast_export_qstr()
1228 smart_str_appendc(str, '0' + (c / 8)); in zend_ast_export_qstr()
1229 smart_str_appendc(str, '0' + (c % 8)); in zend_ast_export_qstr()
1234 smart_str_appendc(str, '\\'); in zend_ast_export_qstr()
1236 smart_str_appendc(str, c); in zend_ast_export_qstr()
1241 static ZEND_COLD void zend_ast_export_indent(smart_str *str, int indent) in zend_ast_export_indent() argument
1244 smart_str_appends(str, " "); in zend_ast_export_indent()
1249 static ZEND_COLD void zend_ast_export_name(smart_str *str, zend_ast *ast, int priority, int indent) in zend_ast_export_name() argument
1255 smart_str_append(str, Z_STR_P(zv)); in zend_ast_export_name()
1259 zend_ast_export_ex(str, ast, priority, indent); in zend_ast_export_name()
1262 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
1269 smart_str_appendc(str, '\\'); in zend_ast_export_ns_name()
1271 smart_str_appends(str, "namespace\\"); in zend_ast_export_ns_name()
1273 smart_str_append(str, Z_STR_P(zv)); in zend_ast_export_ns_name()
1277 zend_ast_export_ex(str, ast, priority, indent); in zend_ast_export_ns_name()
1324 static ZEND_COLD void zend_ast_export_var(smart_str *str, zend_ast *ast, int priority, int indent) in zend_ast_export_var() argument
1330 smart_str_append(str, Z_STR_P(zv)); in zend_ast_export_var()
1334 zend_ast_export_ex(str, ast, 0, indent); in zend_ast_export_var()
1337 smart_str_appendc(str, '{'); in zend_ast_export_var()
1338 zend_ast_export_name(str, ast, 0, indent); in zend_ast_export_var()
1339 smart_str_appendc(str, '}'); in zend_ast_export_var()
1342 static ZEND_COLD void zend_ast_export_list(smart_str *str, zend_ast_list *list, bool separator, int… in zend_ast_export_list() argument
1348 smart_str_appends(str, ", "); in zend_ast_export_list()
1350 zend_ast_export_ex(str, list->child[i], priority, indent); in zend_ast_export_list()
1355 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
1366 zend_ast_export_qstr(str, quote, Z_STR_P(zv)); in zend_ast_export_encaps_list()
1374 zend_ast_export_ex(str, ast, 0, indent); in zend_ast_export_encaps_list()
1376 smart_str_appendc(str, '{'); in zend_ast_export_encaps_list()
1377 zend_ast_export_ex(str, ast, 0, indent); in zend_ast_export_encaps_list()
1378 smart_str_appendc(str, '}'); in zend_ast_export_encaps_list()
1384 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
1390 smart_str_appends(str, separator); in zend_ast_export_name_list_ex()
1392 zend_ast_export_name(str, list->child[i], 0, indent); in zend_ast_export_name_list_ex()
1400 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
1406 smart_str_appends(str, ", "); in zend_ast_export_var_list()
1409 smart_str_appendc(str, '&'); in zend_ast_export_var_list()
1411 smart_str_appendc(str, '$'); in zend_ast_export_var_list()
1412 zend_ast_export_name(str, list->child[i], 20, indent); in zend_ast_export_var_list()
1417 static ZEND_COLD void zend_ast_export_stmt(smart_str *str, zend_ast *ast, int indent) in zend_ast_export_stmt() argument
1430 zend_ast_export_stmt(str, ast, indent); in zend_ast_export_stmt()
1434 zend_ast_export_indent(str, indent); in zend_ast_export_stmt()
1435 zend_ast_export_ex(str, ast, 0, indent); in zend_ast_export_stmt()
1452 smart_str_appendc(str, ';'); in zend_ast_export_stmt()
1455 smart_str_appendc(str, '\n'); in zend_ast_export_stmt()
1459 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
1471 smart_str_appends(str, "if ("); in zend_ast_export_if_stmt()
1473 zend_ast_export_indent(str, indent); in zend_ast_export_if_stmt()
1474 smart_str_appends(str, "} elseif ("); in zend_ast_export_if_stmt()
1476 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_if_stmt()
1477 smart_str_appends(str, ") {\n"); in zend_ast_export_if_stmt()
1478 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_if_stmt()
1480 zend_ast_export_indent(str, indent); in zend_ast_export_if_stmt()
1481 smart_str_appends(str, "} else "); in zend_ast_export_if_stmt()
1486 smart_str_appends(str, "{\n"); in zend_ast_export_if_stmt()
1487 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_if_stmt()
1492 zend_ast_export_indent(str, indent); in zend_ast_export_if_stmt()
1493 smart_str_appendc(str, '}'); in zend_ast_export_if_stmt()
1496 static ZEND_COLD void zend_ast_export_zval(smart_str *str, zval *zv, int priority, int indent) in zend_ast_export_zval() argument
1501 smart_str_appends(str, "null"); in zend_ast_export_zval()
1504 smart_str_appends(str, "false"); in zend_ast_export_zval()
1507 smart_str_appends(str, "true"); in zend_ast_export_zval()
1510 smart_str_append_long(str, Z_LVAL_P(zv)); in zend_ast_export_zval()
1514 str, Z_DVAL_P(zv), (int) EG(precision), /* zero_fraction */ false); in zend_ast_export_zval()
1517 smart_str_appendc(str, '\''); in zend_ast_export_zval()
1518 zend_ast_export_str(str, Z_STR_P(zv)); in zend_ast_export_zval()
1519 smart_str_appendc(str, '\''); in zend_ast_export_zval()
1526 smart_str_appendc(str, '['); in zend_ast_export_zval()
1531 smart_str_appends(str, ", "); in zend_ast_export_zval()
1534 smart_str_appendc(str, '\''); in zend_ast_export_zval()
1535 zend_ast_export_str(str, key); in zend_ast_export_zval()
1536 smart_str_appends(str, "' => "); in zend_ast_export_zval()
1538 smart_str_append_long(str, idx); in zend_ast_export_zval()
1539 smart_str_appends(str, " => "); in zend_ast_export_zval()
1541 zend_ast_export_zval(str, val, 0, indent); in zend_ast_export_zval()
1543 smart_str_appendc(str, ']'); in zend_ast_export_zval()
1547 zend_ast_export_ex(str, Z_ASTVAL_P(zv), priority, indent); in zend_ast_export_zval()
1553 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
1555 smart_str_appends(str, " extends "); in zend_ast_export_class_no_header()
1556 zend_ast_export_ns_name(str, decl->child[0], 0, indent); in zend_ast_export_class_no_header()
1559 smart_str_appends(str, " implements "); in zend_ast_export_class_no_header()
1560 zend_ast_export_ex(str, decl->child[1], 0, indent); in zend_ast_export_class_no_header()
1562 smart_str_appends(str, " {\n"); in zend_ast_export_class_no_header()
1563 zend_ast_export_stmt(str, decl->child[2], indent + 1); in zend_ast_export_class_no_header()
1564 zend_ast_export_indent(str, indent); in zend_ast_export_class_no_header()
1565 smart_str_appends(str, "}"); in zend_ast_export_class_no_header()
1568 static ZEND_COLD void zend_ast_export_attribute_group(smart_str *str, zend_ast *ast, int indent) { in zend_ast_export_attribute_group() argument
1574 smart_str_appends(str, ", "); in zend_ast_export_attribute_group()
1576 zend_ast_export_ns_name(str, attr->child[0], 0, indent); in zend_ast_export_attribute_group()
1579 smart_str_appendc(str, '('); in zend_ast_export_attribute_group()
1580 zend_ast_export_ex(str, attr->child[1], 0, indent); in zend_ast_export_attribute_group()
1581 smart_str_appendc(str, ')'); in zend_ast_export_attribute_group()
1586 static ZEND_COLD void zend_ast_export_attributes(smart_str *str, zend_ast *ast, int indent, bool ne… in zend_ast_export_attributes() argument
1591 smart_str_appends(str, "#["); in zend_ast_export_attributes()
1592 zend_ast_export_attribute_group(str, list->child[i], indent); in zend_ast_export_attributes()
1593 smart_str_appends(str, "]"); in zend_ast_export_attributes()
1596 smart_str_appendc(str, '\n'); in zend_ast_export_attributes()
1597 zend_ast_export_indent(str, indent); in zend_ast_export_attributes()
1599 smart_str_appendc(str, ' '); in zend_ast_export_attributes()
1604 static ZEND_COLD void zend_ast_export_visibility(smart_str *str, uint32_t flags) { in zend_ast_export_visibility() argument
1606 smart_str_appends(str, "public "); in zend_ast_export_visibility()
1608 smart_str_appends(str, "protected "); in zend_ast_export_visibility()
1610 smart_str_appends(str, "private "); in zend_ast_export_visibility()
1614 static ZEND_COLD void zend_ast_export_type(smart_str *str, zend_ast *ast, int indent) { in zend_ast_export_type() argument
1619 smart_str_appendc(str, '|'); in zend_ast_export_type()
1621 zend_ast_export_type(str, list->child[i], indent); in zend_ast_export_type()
1629 smart_str_appendc(str, '&'); in zend_ast_export_type()
1631 zend_ast_export_type(str, list->child[i], indent); in zend_ast_export_type()
1636 smart_str_appendc(str, '?'); in zend_ast_export_type()
1638 zend_ast_export_ns_name(str, ast, 0, indent); in zend_ast_export_type()
1683 static ZEND_COLD void zend_ast_export_ex(smart_str *str, zend_ast *ast, int priority, int indent) in zend_ast_export_ex() argument
1696 zend_ast_export_zval(str, zend_ast_get_zval(ast), priority, indent); in zend_ast_export_ex()
1700 smart_str_appendl(str, ZSTR_VAL(name), ZSTR_LEN(name)); in zend_ast_export_ex()
1704 smart_str_appendl(str, "__CLASS__", sizeof("__CLASS__")-1); in zend_ast_export_ex()
1719 zend_ast_export_attributes(str, decl->child[4], indent, newlines); in zend_ast_export_ex()
1722 zend_ast_export_visibility(str, decl->flags); in zend_ast_export_ex()
1725 smart_str_appends(str, "static "); in zend_ast_export_ex()
1728 smart_str_appends(str, "abstract "); in zend_ast_export_ex()
1731 smart_str_appends(str, "final "); in zend_ast_export_ex()
1734 smart_str_appends(str, "fn"); in zend_ast_export_ex()
1736 smart_str_appends(str, "function "); in zend_ast_export_ex()
1739 smart_str_appendc(str, '&'); in zend_ast_export_ex()
1742 smart_str_appendl(str, ZSTR_VAL(decl->name), ZSTR_LEN(decl->name)); in zend_ast_export_ex()
1744 smart_str_appendc(str, '('); in zend_ast_export_ex()
1745 zend_ast_export_ex(str, decl->child[0], 0, indent); in zend_ast_export_ex()
1746 smart_str_appendc(str, ')'); in zend_ast_export_ex()
1747 zend_ast_export_ex(str, decl->child[1], 0, indent); in zend_ast_export_ex()
1749 smart_str_appends(str, ": "); in zend_ast_export_ex()
1750 zend_ast_export_type(str, decl->child[3], indent); in zend_ast_export_ex()
1758 smart_str_appends(str, " => "); in zend_ast_export_ex()
1759 zend_ast_export_ex(str, body, 0, indent); in zend_ast_export_ex()
1763 smart_str_appends(str, " {\n"); in zend_ast_export_ex()
1764 zend_ast_export_stmt(str, decl->child[2], indent + 1); in zend_ast_export_ex()
1765 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
1766 smart_str_appendc(str, '}'); in zend_ast_export_ex()
1768 smart_str_appendc(str, '\n'); in zend_ast_export_ex()
1771 smart_str_appends(str, ";\n"); in zend_ast_export_ex()
1777 zend_ast_export_attributes(str, decl->child[3], indent, 1); in zend_ast_export_ex()
1780 smart_str_appends(str, "interface "); in zend_ast_export_ex()
1782 smart_str_appends(str, "trait "); in zend_ast_export_ex()
1784 smart_str_appends(str, "enum "); in zend_ast_export_ex()
1787 smart_str_appends(str, "abstract "); in zend_ast_export_ex()
1790 smart_str_appends(str, "final "); in zend_ast_export_ex()
1793 smart_str_appends(str, "readonly "); in zend_ast_export_ex()
1795 smart_str_appends(str, "class "); in zend_ast_export_ex()
1797 smart_str_appendl(str, ZSTR_VAL(decl->name), ZSTR_LEN(decl->name)); in zend_ast_export_ex()
1799 smart_str_appends(str, ": "); in zend_ast_export_ex()
1800 zend_ast_export_type(str, decl->child[4], indent); in zend_ast_export_ex()
1802 zend_ast_export_class_no_header(str, decl, indent); in zend_ast_export_ex()
1803 smart_str_appendc(str, '\n'); in zend_ast_export_ex()
1811 zend_ast_export_list(str, (zend_ast_list*)ast, 1, 20, indent); in zend_ast_export_ex()
1814 smart_str_appendc(str, '['); in zend_ast_export_ex()
1815 zend_ast_export_list(str, (zend_ast_list*)ast, 1, 20, indent); in zend_ast_export_ex()
1816 smart_str_appendc(str, ']'); in zend_ast_export_ex()
1819 smart_str_appendc(str, '"'); in zend_ast_export_ex()
1820 zend_ast_export_encaps_list(str, '"', (zend_ast_list*)ast, indent); in zend_ast_export_ex()
1821 smart_str_appendc(str, '"'); in zend_ast_export_ex()
1825 zend_ast_export_stmt(str, ast, indent); in zend_ast_export_ex()
1828 zend_ast_export_if_stmt(str, (zend_ast_list*)ast, indent); in zend_ast_export_ex()
1833 zend_ast_export_list(str, (zend_ast_list*)ast, 0, 0, indent); in zend_ast_export_ex()
1836 smart_str_appends(str, " use("); in zend_ast_export_ex()
1837 zend_ast_export_var_list(str, (zend_ast_list*)ast, indent); in zend_ast_export_ex()
1838 smart_str_appendc(str, ')'); in zend_ast_export_ex()
1845 zend_ast_export_attributes(str, ast->child[2], indent, 1); in zend_ast_export_ex()
1848 zend_ast_export_visibility(str, ast->attr); in zend_ast_export_ex()
1851 smart_str_appends(str, "static "); in zend_ast_export_ex()
1854 smart_str_appends(str, "readonly "); in zend_ast_export_ex()
1858 zend_ast_export_type(str, type_ast, indent); in zend_ast_export_ex()
1859 smart_str_appendc(str, ' '); in zend_ast_export_ex()
1867 smart_str_appends(str, "const "); in zend_ast_export_ex()
1871 zend_ast_export_attributes(str, ast->child[1], indent, 1); in zend_ast_export_ex()
1874 zend_ast_export_visibility(str, ast->attr); in zend_ast_export_ex()
1875 smart_str_appends(str, "const "); in zend_ast_export_ex()
1881 zend_ast_export_name_list(str, (zend_ast_list*)ast, indent); in zend_ast_export_ex()
1884 smart_str_appends(str, "use "); in zend_ast_export_ex()
1886 smart_str_appends(str, "function "); in zend_ast_export_ex()
1888 smart_str_appends(str, "const "); in zend_ast_export_ex()
1918 smart_str_appendc(str, '$'); in zend_ast_export_ex()
1919 zend_ast_export_var(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1922 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1925 smart_str_appends(str, "..."); in zend_ast_export_ex()
1949 smart_str_appendc(str, '`'); in zend_ast_export_ex()
1951 zend_ast_export_encaps_list(str, '`', (zend_ast_list*)ast->child[0], indent); in zend_ast_export_ex()
1957 zend_ast_export_qstr(str, '`', Z_STR_P(zv)); in zend_ast_export_ex()
1959 smart_str_appendc(str, '`'); in zend_ast_export_ex()
2005 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2006 smart_str_appendc(str, ':'); in zend_ast_export_ex()
2009 smart_str_appendc(str, '&'); in zend_ast_export_ex()
2019 smart_str_appends(str, "goto "); in zend_ast_export_ex()
2020 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2029 zend_ast_export_ex(str, ast->child[0], 260, indent); in zend_ast_export_ex()
2030 smart_str_appendc(str, '['); in zend_ast_export_ex()
2032 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2034 smart_str_appendc(str, ']'); in zend_ast_export_ex()
2038 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2039 smart_str_appends(str, ast->kind == ZEND_AST_NULLSAFE_PROP ? "?->" : "->"); in zend_ast_export_ex()
2040 zend_ast_export_var(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2043 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2044 smart_str_appends(str, "::$"); in zend_ast_export_ex()
2045 zend_ast_export_var(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2048 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2049 smart_str_appendc(str, '('); in zend_ast_export_ex()
2050 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2051 smart_str_appendc(str, ')'); in zend_ast_export_ex()
2054 smart_str_appends(str, "..."); in zend_ast_export_ex()
2057 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2058 smart_str_appends(str, "::"); in zend_ast_export_ex()
2059 zend_ast_export_name(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2066 smart_str_appends(str, "self"); in zend_ast_export_ex()
2069 smart_str_appends(str, "parent"); in zend_ast_export_ex()
2074 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2076 smart_str_appends(str, "::class"); in zend_ast_export_ex()
2129 zend_ast_export_ex(str, ast->child[1], 80, indent); in zend_ast_export_ex()
2130 smart_str_appends(str, " => "); in zend_ast_export_ex()
2133 smart_str_appendc(str, '&'); in zend_ast_export_ex()
2134 zend_ast_export_ex(str, ast->child[0], 80, indent); in zend_ast_export_ex()
2137 smart_str_appends(str, "new "); in zend_ast_export_ex()
2141 zend_ast_export_attributes(str, decl->child[3], indent, 0); in zend_ast_export_ex()
2143 smart_str_appends(str, "class"); in zend_ast_export_ex()
2146 smart_str_appendc(str, '('); in zend_ast_export_ex()
2147 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2148 smart_str_appendc(str, ')'); in zend_ast_export_ex()
2150 zend_ast_export_class_no_header(str, decl, indent); in zend_ast_export_ex()
2152 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2153 smart_str_appendc(str, '('); in zend_ast_export_ex()
2154 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2155 smart_str_appendc(str, ')'); in zend_ast_export_ex()
2159 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2160 smart_str_appends(str, " instanceof "); in zend_ast_export_ex()
2161 zend_ast_export_ns_name(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2164 if (priority > 70) smart_str_appendc(str, '('); in zend_ast_export_ex()
2165 smart_str_appends(str, "yield "); in zend_ast_export_ex()
2168 zend_ast_export_ex(str, ast->child[1], 70, indent); in zend_ast_export_ex()
2169 smart_str_appends(str, " => "); in zend_ast_export_ex()
2171 zend_ast_export_ex(str, ast->child[0], 70, indent); in zend_ast_export_ex()
2173 if (priority > 70) smart_str_appendc(str, ')'); in zend_ast_export_ex()
2179 smart_str_appends(str, "static $"); in zend_ast_export_ex()
2180 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2183 smart_str_appends(str, "while ("); in zend_ast_export_ex()
2184 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2185 smart_str_appends(str, ") {\n"); in zend_ast_export_ex()
2186 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_ex()
2187 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2188 smart_str_appendc(str, '}'); in zend_ast_export_ex()
2191 smart_str_appends(str, "do {\n"); in zend_ast_export_ex()
2192 zend_ast_export_stmt(str, ast->child[0], indent + 1); in zend_ast_export_ex()
2193 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2194 smart_str_appends(str, "} while ("); in zend_ast_export_ex()
2195 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2196 smart_str_appendc(str, ')'); in zend_ast_export_ex()
2201 smart_str_appends(str, "if ("); in zend_ast_export_ex()
2202 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2203 smart_str_appends(str, ") {\n"); in zend_ast_export_ex()
2204 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_ex()
2206 smart_str_appends(str, "else {\n"); in zend_ast_export_ex()
2207 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_ex()
2209 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2210 smart_str_appendc(str, '}'); in zend_ast_export_ex()
2213 smart_str_appends(str, "switch ("); in zend_ast_export_ex()
2214 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2215 smart_str_appends(str, ") {\n"); in zend_ast_export_ex()
2216 zend_ast_export_ex(str, ast->child[1], 0, indent + 1); in zend_ast_export_ex()
2217 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2218 smart_str_appendc(str, '}'); in zend_ast_export_ex()
2221 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2223 smart_str_appends(str, "case "); in zend_ast_export_ex()
2224 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2225 smart_str_appends(str, ":\n"); in zend_ast_export_ex()
2227 smart_str_appends(str, "default:\n"); in zend_ast_export_ex()
2229 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_ex()
2232 smart_str_appends(str, "match ("); in zend_ast_export_ex()
2233 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2234 smart_str_appends(str, ") {\n"); in zend_ast_export_ex()
2235 zend_ast_export_ex(str, ast->child[1], 0, indent + 1); in zend_ast_export_ex()
2236 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2237 smart_str_appendc(str, '}'); in zend_ast_export_ex()
2240 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2242 zend_ast_export_list(str, (zend_ast_list*)ast->child[0], 1, 0, indent); in zend_ast_export_ex()
2243 smart_str_appends(str, " => "); in zend_ast_export_ex()
2245 smart_str_appends(str, "default => "); in zend_ast_export_ex()
2247 zend_ast_export_ex(str, ast->child[1], 0, 0); in zend_ast_export_ex()
2248 smart_str_appends(str, ",\n"); in zend_ast_export_ex()
2251 smart_str_appends(str, "declare("); in zend_ast_export_ex()
2253 zend_ast_export_list(str, (zend_ast_list*)ast->child[0], 1, 0, indent); in zend_ast_export_ex()
2254 smart_str_appendc(str, ')'); in zend_ast_export_ex()
2256 smart_str_appends(str, " {\n"); in zend_ast_export_ex()
2257 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_ex()
2258 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2259 smart_str_appendc(str, '}'); in zend_ast_export_ex()
2261 smart_str_appendc(str, ';'); in zend_ast_export_ex()
2265 smart_str_appendc(str, '$'); in zend_ast_export_ex()
2268 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2271 smart_str_appends(str, "use "); in zend_ast_export_ex()
2272 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2274 smart_str_appends(str, " {\n"); in zend_ast_export_ex()
2275 zend_ast_export_ex(str, ast->child[1], 0, indent + 1); in zend_ast_export_ex()
2276 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2277 smart_str_appends(str, "}"); in zend_ast_export_ex()
2279 smart_str_appends(str, ";"); in zend_ast_export_ex()
2283 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2284 smart_str_appends(str, " insteadof "); in zend_ast_export_ex()
2285 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2289 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2290 smart_str_appends(str, "::"); in zend_ast_export_ex()
2292 zend_ast_export_name(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2295 smart_str_appends(str, "namespace"); in zend_ast_export_ex()
2297 smart_str_appendc(str, ' '); in zend_ast_export_ex()
2298 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2301 smart_str_appends(str, " {\n"); in zend_ast_export_ex()
2302 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_ex()
2303 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2304 smart_str_appends(str, "}\n"); in zend_ast_export_ex()
2306 smart_str_appendc(str, ';'); in zend_ast_export_ex()
2311 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2313 smart_str_appends(str, " as public"); in zend_ast_export_ex()
2315 smart_str_appends(str, " as protected"); in zend_ast_export_ex()
2317 smart_str_appends(str, " as private"); in zend_ast_export_ex()
2319 smart_str_appends(str, " as"); in zend_ast_export_ex()
2322 smart_str_appendc(str, ' '); in zend_ast_export_ex()
2323 zend_ast_export_name(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2327 smart_str_append(str, zend_ast_get_str(ast->child[0])); in zend_ast_export_ex()
2328 smart_str_appends(str, ": "); in zend_ast_export_ex()
2335 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2336 smart_str_appends(str, ast->kind == ZEND_AST_NULLSAFE_METHOD_CALL ? "?->" : "->"); in zend_ast_export_ex()
2337 zend_ast_export_var(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2338 smart_str_appendc(str, '('); in zend_ast_export_ex()
2339 zend_ast_export_ex(str, ast->child[2], 0, indent); in zend_ast_export_ex()
2340 smart_str_appendc(str, ')'); in zend_ast_export_ex()
2343 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2344 smart_str_appends(str, "::"); in zend_ast_export_ex()
2345 zend_ast_export_var(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2346 smart_str_appendc(str, '('); in zend_ast_export_ex()
2347 zend_ast_export_ex(str, ast->child[2], 0, indent); in zend_ast_export_ex()
2348 smart_str_appendc(str, ')'); in zend_ast_export_ex()
2351 if (priority > 100) smart_str_appendc(str, '('); in zend_ast_export_ex()
2352 zend_ast_export_ex(str, ast->child[0], 100, indent); in zend_ast_export_ex()
2354 smart_str_appends(str, " ? "); in zend_ast_export_ex()
2355 zend_ast_export_ex(str, ast->child[1], 101, indent); in zend_ast_export_ex()
2356 smart_str_appends(str, " : "); in zend_ast_export_ex()
2358 smart_str_appends(str, " ?: "); in zend_ast_export_ex()
2360 zend_ast_export_ex(str, ast->child[2], 101, indent); in zend_ast_export_ex()
2361 if (priority > 100) smart_str_appendc(str, ')'); in zend_ast_export_ex()
2365 smart_str_appends(str, "try {\n"); in zend_ast_export_ex()
2366 zend_ast_export_stmt(str, ast->child[0], indent + 1); in zend_ast_export_ex()
2367 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2368 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2370 smart_str_appends(str, "} finally {\n"); in zend_ast_export_ex()
2371 zend_ast_export_stmt(str, ast->child[2], indent + 1); in zend_ast_export_ex()
2372 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2374 smart_str_appendc(str, '}'); in zend_ast_export_ex()
2377 smart_str_appends(str, "} catch ("); in zend_ast_export_ex()
2378 zend_ast_export_catch_name_list(str, zend_ast_get_list(ast->child[0]), indent); in zend_ast_export_ex()
2380 smart_str_appends(str, " $"); in zend_ast_export_ex()
2381 zend_ast_export_var(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2383 smart_str_appends(str, ") {\n"); in zend_ast_export_ex()
2384 zend_ast_export_stmt(str, ast->child[2], indent + 1); in zend_ast_export_ex()
2385 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2389 zend_ast_export_attributes(str, ast->child[3], indent, 0); in zend_ast_export_ex()
2392 zend_ast_export_type(str, ast->child[0], indent); in zend_ast_export_ex()
2393 smart_str_appendc(str, ' '); in zend_ast_export_ex()
2396 smart_str_appendc(str, '&'); in zend_ast_export_ex()
2399 smart_str_appends(str, "..."); in zend_ast_export_ex()
2401 smart_str_appendc(str, '$'); in zend_ast_export_ex()
2402 zend_ast_export_name(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2406 zend_ast_export_attributes(str, ast->child[3], indent, 1); in zend_ast_export_ex()
2408 smart_str_appends(str, "case "); in zend_ast_export_ex()
2409 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2411 smart_str_appends(str, " = "); in zend_ast_export_ex()
2412 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2418 smart_str_appends(str, "for ("); in zend_ast_export_ex()
2419 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2420 smart_str_appendc(str, ';'); in zend_ast_export_ex()
2422 smart_str_appendc(str, ' '); in zend_ast_export_ex()
2423 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2425 smart_str_appendc(str, ';'); in zend_ast_export_ex()
2427 smart_str_appendc(str, ' '); in zend_ast_export_ex()
2428 zend_ast_export_ex(str, ast->child[2], 0, indent); in zend_ast_export_ex()
2430 smart_str_appends(str, ") {\n"); in zend_ast_export_ex()
2431 zend_ast_export_stmt(str, ast->child[3], indent + 1); in zend_ast_export_ex()
2432 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2433 smart_str_appendc(str, '}'); in zend_ast_export_ex()
2436 smart_str_appends(str, "foreach ("); in zend_ast_export_ex()
2437 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2438 smart_str_appends(str, " as "); in zend_ast_export_ex()
2440 zend_ast_export_ex(str, ast->child[2], 0, indent); in zend_ast_export_ex()
2441 smart_str_appends(str, " => "); in zend_ast_export_ex()
2443 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2444 smart_str_appends(str, ") {\n"); in zend_ast_export_ex()
2445 zend_ast_export_stmt(str, ast->child[3], indent + 1); in zend_ast_export_ex()
2446 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2447 smart_str_appendc(str, '}'); in zend_ast_export_ex()
2454 if (priority > p) smart_str_appendc(str, '('); in zend_ast_export_ex()
2455 zend_ast_export_ex(str, ast->child[0], pl, indent); in zend_ast_export_ex()
2456 smart_str_appends(str, op); in zend_ast_export_ex()
2457 zend_ast_export_ex(str, ast->child[1], pr, indent); in zend_ast_export_ex()
2458 if (priority > p) smart_str_appendc(str, ')'); in zend_ast_export_ex()
2462 if (priority > p) smart_str_appendc(str, '('); in zend_ast_export_ex()
2463 smart_str_appends(str, op); in zend_ast_export_ex()
2464 zend_ast_export_ex(str, ast->child[0], pl, indent); in zend_ast_export_ex()
2465 if (priority > p) smart_str_appendc(str, ')'); in zend_ast_export_ex()
2469 if (priority > p) smart_str_appendc(str, '('); in zend_ast_export_ex()
2470 zend_ast_export_ex(str, ast->child[0], pl, indent); in zend_ast_export_ex()
2471 smart_str_appends(str, op); in zend_ast_export_ex()
2472 if (priority > p) smart_str_appendc(str, ')'); in zend_ast_export_ex()
2476 smart_str_appends(str, op); in zend_ast_export_ex()
2477 smart_str_appendc(str, '('); in zend_ast_export_ex()
2478 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2479 smart_str_appendc(str, ')'); in zend_ast_export_ex()
2483 smart_str_appends(str, op); in zend_ast_export_ex()
2485 smart_str_appendc(str, ' '); in zend_ast_export_ex()
2492 smart_str_appends(str, op); in zend_ast_export_ex()
2497 smart_str_appends(str, " = "); in zend_ast_export_ex()
2506 smart_str str = {0}; in zend_ast_export() local
2508 smart_str_appends(&str, prefix); in zend_ast_export()
2509 zend_ast_export_ex(&str, ast, 0, 0); in zend_ast_export()
2510 smart_str_appends(&str, suffix); in zend_ast_export()
2511 smart_str_0(&str); in zend_ast_export()
2512 return str.s; in zend_ast_export()