Lines Matching refs:str

82 ZEND_API zend_ast * ZEND_FASTCALL zend_ast_create_zval_from_str(zend_string *str) {  in zend_ast_create_zval_from_str()  argument
84 ZVAL_STR(&zv, str); in zend_ast_create_zval_from_str()
960 static ZEND_COLD void zend_ast_export_ex(smart_str *str, zend_ast *ast, int priority, int indent);
962 static ZEND_COLD void zend_ast_export_str(smart_str *str, zend_string *s) in zend_ast_export_str() argument
969 smart_str_appendc(str, '\\'); in zend_ast_export_str()
970 smart_str_appendc(str, c); in zend_ast_export_str()
972 smart_str_appendc(str, c); in zend_ast_export_str()
977 static ZEND_COLD void zend_ast_export_qstr(smart_str *str, char quote, zend_string *s) in zend_ast_export_qstr() argument
986 smart_str_appends(str, "\\n"); in zend_ast_export_qstr()
989 smart_str_appends(str, "\\r"); in zend_ast_export_qstr()
992 smart_str_appends(str, "\\t"); in zend_ast_export_qstr()
995 smart_str_appends(str, "\\f"); in zend_ast_export_qstr()
998 smart_str_appends(str, "\\v"); in zend_ast_export_qstr()
1005 smart_str_appends(str, "\\e"); in zend_ast_export_qstr()
1008 smart_str_appends(str, "\\0"); in zend_ast_export_qstr()
1009 smart_str_appendc(str, '0' + (c / 8)); in zend_ast_export_qstr()
1010 smart_str_appendc(str, '0' + (c % 8)); in zend_ast_export_qstr()
1015 smart_str_appendc(str, '\\'); in zend_ast_export_qstr()
1017 smart_str_appendc(str, c); in zend_ast_export_qstr()
1022 static ZEND_COLD void zend_ast_export_indent(smart_str *str, int indent) in zend_ast_export_indent() argument
1025 smart_str_appends(str, " "); in zend_ast_export_indent()
1030 static ZEND_COLD void zend_ast_export_name(smart_str *str, zend_ast *ast, int priority, int indent) in zend_ast_export_name() argument
1036 smart_str_append(str, Z_STR_P(zv)); in zend_ast_export_name()
1040 zend_ast_export_ex(str, ast, priority, indent); in zend_ast_export_name()
1043 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
1050 smart_str_appendc(str, '\\'); in zend_ast_export_ns_name()
1052 smart_str_appends(str, "namespace\\"); in zend_ast_export_ns_name()
1054 smart_str_append(str, Z_STR_P(zv)); in zend_ast_export_ns_name()
1058 zend_ast_export_ex(str, ast, priority, indent); in zend_ast_export_ns_name()
1105 static ZEND_COLD void zend_ast_export_var(smart_str *str, zend_ast *ast, int priority, int indent) in zend_ast_export_var() argument
1111 smart_str_append(str, Z_STR_P(zv)); in zend_ast_export_var()
1115 zend_ast_export_ex(str, ast, 0, indent); in zend_ast_export_var()
1118 smart_str_appendc(str, '{'); in zend_ast_export_var()
1119 zend_ast_export_name(str, ast, 0, indent); in zend_ast_export_var()
1120 smart_str_appendc(str, '}'); in zend_ast_export_var()
1123 static ZEND_COLD void zend_ast_export_list(smart_str *str, zend_ast_list *list, bool separator, int… in zend_ast_export_list() argument
1129 smart_str_appends(str, ", "); in zend_ast_export_list()
1131 zend_ast_export_ex(str, list->child[i], priority, indent); in zend_ast_export_list()
1136 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
1147 zend_ast_export_qstr(str, quote, Z_STR_P(zv)); in zend_ast_export_encaps_list()
1155 zend_ast_export_ex(str, ast, 0, indent); in zend_ast_export_encaps_list()
1157 smart_str_appendc(str, '{'); in zend_ast_export_encaps_list()
1158 zend_ast_export_ex(str, ast, 0, indent); in zend_ast_export_encaps_list()
1159 smart_str_appendc(str, '}'); in zend_ast_export_encaps_list()
1165 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
1171 smart_str_appends(str, separator); in zend_ast_export_name_list_ex()
1173 zend_ast_export_name(str, list->child[i], 0, indent); in zend_ast_export_name_list_ex()
1181 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
1187 smart_str_appends(str, ", "); in zend_ast_export_var_list()
1190 smart_str_appendc(str, '&'); in zend_ast_export_var_list()
1192 smart_str_appendc(str, '$'); in zend_ast_export_var_list()
1193 zend_ast_export_name(str, list->child[i], 20, indent); in zend_ast_export_var_list()
1198 static ZEND_COLD void zend_ast_export_stmt(smart_str *str, zend_ast *ast, int indent) in zend_ast_export_stmt() argument
1211 zend_ast_export_stmt(str, ast, indent); in zend_ast_export_stmt()
1215 zend_ast_export_indent(str, indent); in zend_ast_export_stmt()
1216 zend_ast_export_ex(str, ast, 0, indent); in zend_ast_export_stmt()
1233 smart_str_appendc(str, ';'); in zend_ast_export_stmt()
1236 smart_str_appendc(str, '\n'); in zend_ast_export_stmt()
1240 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
1252 smart_str_appends(str, "if ("); in zend_ast_export_if_stmt()
1254 zend_ast_export_indent(str, indent); in zend_ast_export_if_stmt()
1255 smart_str_appends(str, "} elseif ("); in zend_ast_export_if_stmt()
1257 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_if_stmt()
1258 smart_str_appends(str, ") {\n"); in zend_ast_export_if_stmt()
1259 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_if_stmt()
1261 zend_ast_export_indent(str, indent); in zend_ast_export_if_stmt()
1262 smart_str_appends(str, "} else "); in zend_ast_export_if_stmt()
1267 smart_str_appends(str, "{\n"); in zend_ast_export_if_stmt()
1268 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_if_stmt()
1273 zend_ast_export_indent(str, indent); in zend_ast_export_if_stmt()
1274 smart_str_appendc(str, '}'); in zend_ast_export_if_stmt()
1277 static ZEND_COLD void zend_ast_export_zval(smart_str *str, zval *zv, int priority, int indent) in zend_ast_export_zval() argument
1287 smart_str_appends(str, "null"); in zend_ast_export_zval()
1290 smart_str_appends(str, "false"); in zend_ast_export_zval()
1293 smart_str_appends(str, "true"); in zend_ast_export_zval()
1296 smart_str_append_long(str, Z_LVAL_P(zv)); in zend_ast_export_zval()
1300 smart_str_appendl(str, ZSTR_VAL(key), ZSTR_LEN(key)); in zend_ast_export_zval()
1304 smart_str_appendc(str, '\''); in zend_ast_export_zval()
1305 zend_ast_export_str(str, Z_STR_P(zv)); in zend_ast_export_zval()
1306 smart_str_appendc(str, '\''); in zend_ast_export_zval()
1309 smart_str_appendc(str, '['); in zend_ast_export_zval()
1315 smart_str_appends(str, ", "); in zend_ast_export_zval()
1318 smart_str_appendc(str, '\''); in zend_ast_export_zval()
1319 zend_ast_export_str(str, key); in zend_ast_export_zval()
1320 smart_str_appends(str, "' => "); in zend_ast_export_zval()
1322 smart_str_append_long(str, idx); in zend_ast_export_zval()
1323 smart_str_appends(str, " => "); in zend_ast_export_zval()
1325 zend_ast_export_zval(str, val, 0, indent); in zend_ast_export_zval()
1327 smart_str_appendc(str, ']'); in zend_ast_export_zval()
1330 zend_ast_export_ex(str, Z_ASTVAL_P(zv), priority, indent); in zend_ast_export_zval()
1336 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
1338 smart_str_appends(str, " extends "); in zend_ast_export_class_no_header()
1339 zend_ast_export_ns_name(str, decl->child[0], 0, indent); in zend_ast_export_class_no_header()
1342 smart_str_appends(str, " implements "); in zend_ast_export_class_no_header()
1343 zend_ast_export_ex(str, decl->child[1], 0, indent); in zend_ast_export_class_no_header()
1345 smart_str_appends(str, " {\n"); in zend_ast_export_class_no_header()
1346 zend_ast_export_stmt(str, decl->child[2], indent + 1); in zend_ast_export_class_no_header()
1347 zend_ast_export_indent(str, indent); in zend_ast_export_class_no_header()
1348 smart_str_appends(str, "}"); in zend_ast_export_class_no_header()
1351 static ZEND_COLD void zend_ast_export_attribute_group(smart_str *str, zend_ast *ast, int indent) { in zend_ast_export_attribute_group() argument
1359 smart_str_appends(str, ", "); in zend_ast_export_attribute_group()
1361 zend_ast_export_ns_name(str, attr->child[0], 0, indent); in zend_ast_export_attribute_group()
1366 smart_str_appendc(str, '('); in zend_ast_export_attribute_group()
1369 smart_str_appends(str, ", "); in zend_ast_export_attribute_group()
1371 zend_ast_export_ex(str, args->child[j], 0, indent); in zend_ast_export_attribute_group()
1373 smart_str_appendc(str, ')'); in zend_ast_export_attribute_group()
1378 static ZEND_COLD void zend_ast_export_attributes(smart_str *str, zend_ast *ast, int indent, zend_bo… in zend_ast_export_attributes() argument
1383 smart_str_appends(str, "#["); in zend_ast_export_attributes()
1384 zend_ast_export_attribute_group(str, list->child[i], indent); in zend_ast_export_attributes()
1385 smart_str_appends(str, "]"); in zend_ast_export_attributes()
1388 smart_str_appendc(str, '\n'); in zend_ast_export_attributes()
1389 zend_ast_export_indent(str, indent); in zend_ast_export_attributes()
1391 smart_str_appendc(str, ' '); in zend_ast_export_attributes()
1396 static ZEND_COLD void zend_ast_export_visibility(smart_str *str, uint32_t flags) { in zend_ast_export_visibility() argument
1398 smart_str_appends(str, "public "); in zend_ast_export_visibility()
1400 smart_str_appends(str, "protected "); in zend_ast_export_visibility()
1402 smart_str_appends(str, "private "); in zend_ast_export_visibility()
1406 static ZEND_COLD void zend_ast_export_type(smart_str *str, zend_ast *ast, int indent) { in zend_ast_export_type() argument
1411 smart_str_appendc(str, '|'); in zend_ast_export_type()
1413 zend_ast_export_type(str, list->child[i], indent); in zend_ast_export_type()
1418 smart_str_appendc(str, '?'); in zend_ast_export_type()
1420 zend_ast_export_ns_name(str, ast, 0, indent); in zend_ast_export_type()
1465 static ZEND_COLD void zend_ast_export_ex(smart_str *str, zend_ast *ast, int priority, int indent) in zend_ast_export_ex() argument
1478 zend_ast_export_zval(str, zend_ast_get_zval(ast), priority, indent); in zend_ast_export_ex()
1482 smart_str_appendl(str, ZSTR_VAL(name), ZSTR_LEN(name)); in zend_ast_export_ex()
1486 smart_str_appendl(str, "__CLASS__", sizeof("__CLASS__")-1); in zend_ast_export_ex()
1501 zend_ast_export_attributes(str, decl->child[4], indent, newlines); in zend_ast_export_ex()
1504 zend_ast_export_visibility(str, decl->flags); in zend_ast_export_ex()
1507 smart_str_appends(str, "static "); in zend_ast_export_ex()
1510 smart_str_appends(str, "abstract "); in zend_ast_export_ex()
1513 smart_str_appends(str, "final "); in zend_ast_export_ex()
1516 smart_str_appends(str, "fn"); in zend_ast_export_ex()
1518 smart_str_appends(str, "function "); in zend_ast_export_ex()
1521 smart_str_appendc(str, '&'); in zend_ast_export_ex()
1524 smart_str_appendl(str, ZSTR_VAL(decl->name), ZSTR_LEN(decl->name)); in zend_ast_export_ex()
1526 smart_str_appendc(str, '('); in zend_ast_export_ex()
1527 zend_ast_export_ex(str, decl->child[0], 0, indent); in zend_ast_export_ex()
1528 smart_str_appendc(str, ')'); in zend_ast_export_ex()
1529 zend_ast_export_ex(str, decl->child[1], 0, indent); in zend_ast_export_ex()
1531 smart_str_appends(str, ": "); in zend_ast_export_ex()
1532 zend_ast_export_type(str, decl->child[3], indent); in zend_ast_export_ex()
1537 smart_str_appends(str, " => "); in zend_ast_export_ex()
1538 zend_ast_export_ex(str, decl->child[2]->child[0], 0, indent); in zend_ast_export_ex()
1542 smart_str_appends(str, " {\n"); in zend_ast_export_ex()
1543 zend_ast_export_stmt(str, decl->child[2], indent + 1); in zend_ast_export_ex()
1544 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
1545 smart_str_appendc(str, '}'); in zend_ast_export_ex()
1547 smart_str_appendc(str, '\n'); in zend_ast_export_ex()
1550 smart_str_appends(str, ";\n"); in zend_ast_export_ex()
1556 zend_ast_export_attributes(str, decl->child[3], indent, 1); in zend_ast_export_ex()
1559 smart_str_appends(str, "interface "); in zend_ast_export_ex()
1561 smart_str_appends(str, "trait "); in zend_ast_export_ex()
1564 smart_str_appends(str, "abstract "); in zend_ast_export_ex()
1567 smart_str_appends(str, "final "); in zend_ast_export_ex()
1569 smart_str_appends(str, "class "); in zend_ast_export_ex()
1571 smart_str_appendl(str, ZSTR_VAL(decl->name), ZSTR_LEN(decl->name)); in zend_ast_export_ex()
1572 zend_ast_export_class_no_header(str, decl, indent); in zend_ast_export_ex()
1573 smart_str_appendc(str, '\n'); in zend_ast_export_ex()
1581 zend_ast_export_list(str, (zend_ast_list*)ast, 1, 20, indent); in zend_ast_export_ex()
1584 smart_str_appendc(str, '['); in zend_ast_export_ex()
1585 zend_ast_export_list(str, (zend_ast_list*)ast, 1, 20, indent); in zend_ast_export_ex()
1586 smart_str_appendc(str, ']'); in zend_ast_export_ex()
1589 smart_str_appendc(str, '"'); in zend_ast_export_ex()
1590 zend_ast_export_encaps_list(str, '"', (zend_ast_list*)ast, indent); in zend_ast_export_ex()
1591 smart_str_appendc(str, '"'); in zend_ast_export_ex()
1595 zend_ast_export_stmt(str, ast, indent); in zend_ast_export_ex()
1598 zend_ast_export_if_stmt(str, (zend_ast_list*)ast, indent); in zend_ast_export_ex()
1603 zend_ast_export_list(str, (zend_ast_list*)ast, 0, 0, indent); in zend_ast_export_ex()
1606 smart_str_appends(str, " use("); in zend_ast_export_ex()
1607 zend_ast_export_var_list(str, (zend_ast_list*)ast, indent); in zend_ast_export_ex()
1608 smart_str_appendc(str, ')'); in zend_ast_export_ex()
1615 zend_ast_export_attributes(str, ast->child[2], indent, 1); in zend_ast_export_ex()
1618 zend_ast_export_visibility(str, ast->attr); in zend_ast_export_ex()
1621 smart_str_appends(str, "static "); in zend_ast_export_ex()
1625 zend_ast_export_type(str, type_ast, indent); in zend_ast_export_ex()
1626 smart_str_appendc(str, ' '); in zend_ast_export_ex()
1634 smart_str_appends(str, "const "); in zend_ast_export_ex()
1638 zend_ast_export_attributes(str, ast->child[1], indent, 1); in zend_ast_export_ex()
1641 zend_ast_export_visibility(str, ast->attr); in zend_ast_export_ex()
1642 smart_str_appends(str, "const "); in zend_ast_export_ex()
1648 zend_ast_export_name_list(str, (zend_ast_list*)ast, indent); in zend_ast_export_ex()
1651 smart_str_appends(str, "use "); in zend_ast_export_ex()
1653 smart_str_appends(str, "function "); in zend_ast_export_ex()
1655 smart_str_appends(str, "const "); in zend_ast_export_ex()
1685 smart_str_appendc(str, '$'); in zend_ast_export_ex()
1686 zend_ast_export_var(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1689 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1692 smart_str_appends(str, "..."); in zend_ast_export_ex()
1716 smart_str_appendc(str, '`'); in zend_ast_export_ex()
1718 zend_ast_export_encaps_list(str, '`', (zend_ast_list*)ast->child[0], indent); in zend_ast_export_ex()
1724 zend_ast_export_qstr(str, '`', Z_STR_P(zv)); in zend_ast_export_ex()
1726 smart_str_appendc(str, '`'); in zend_ast_export_ex()
1772 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1773 smart_str_appendc(str, ':'); in zend_ast_export_ex()
1776 smart_str_appendc(str, '&'); in zend_ast_export_ex()
1786 smart_str_appends(str, "goto "); in zend_ast_export_ex()
1787 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1796 zend_ast_export_ex(str, ast->child[0], 260, indent); in zend_ast_export_ex()
1797 smart_str_appendc(str, '['); in zend_ast_export_ex()
1799 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
1801 smart_str_appendc(str, ']'); in zend_ast_export_ex()
1805 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1806 smart_str_appends(str, ast->kind == ZEND_AST_NULLSAFE_PROP ? "?->" : "->"); in zend_ast_export_ex()
1807 zend_ast_export_var(str, ast->child[1], 0, indent); in zend_ast_export_ex()
1810 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1811 smart_str_appends(str, "::$"); in zend_ast_export_ex()
1812 zend_ast_export_var(str, ast->child[1], 0, indent); in zend_ast_export_ex()
1815 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1816 smart_str_appendc(str, '('); in zend_ast_export_ex()
1817 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
1818 smart_str_appendc(str, ')'); in zend_ast_export_ex()
1821 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1822 smart_str_appends(str, "::"); in zend_ast_export_ex()
1823 zend_ast_export_name(str, ast->child[1], 0, indent); in zend_ast_export_ex()
1826 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1827 smart_str_appends(str, "::class"); in zend_ast_export_ex()
1880 zend_ast_export_ex(str, ast->child[1], 80, indent); in zend_ast_export_ex()
1881 smart_str_appends(str, " => "); in zend_ast_export_ex()
1884 smart_str_appendc(str, '&'); in zend_ast_export_ex()
1885 zend_ast_export_ex(str, ast->child[0], 80, indent); in zend_ast_export_ex()
1888 smart_str_appends(str, "new "); in zend_ast_export_ex()
1892 zend_ast_export_attributes(str, decl->child[3], indent, 0); in zend_ast_export_ex()
1894 smart_str_appends(str, "class"); in zend_ast_export_ex()
1896 smart_str_appendc(str, '('); in zend_ast_export_ex()
1897 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
1898 smart_str_appendc(str, ')'); in zend_ast_export_ex()
1900 zend_ast_export_class_no_header(str, decl, indent); in zend_ast_export_ex()
1902 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1903 smart_str_appendc(str, '('); in zend_ast_export_ex()
1904 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
1905 smart_str_appendc(str, ')'); in zend_ast_export_ex()
1909 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1910 smart_str_appends(str, " instanceof "); in zend_ast_export_ex()
1911 zend_ast_export_ns_name(str, ast->child[1], 0, indent); in zend_ast_export_ex()
1914 if (priority > 70) smart_str_appendc(str, '('); in zend_ast_export_ex()
1915 smart_str_appends(str, "yield "); in zend_ast_export_ex()
1918 zend_ast_export_ex(str, ast->child[1], 70, indent); in zend_ast_export_ex()
1919 smart_str_appends(str, " => "); in zend_ast_export_ex()
1921 zend_ast_export_ex(str, ast->child[0], 70, indent); in zend_ast_export_ex()
1923 if (priority > 70) smart_str_appendc(str, ')'); in zend_ast_export_ex()
1929 smart_str_appends(str, "static $"); in zend_ast_export_ex()
1930 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1933 smart_str_appends(str, "while ("); in zend_ast_export_ex()
1934 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1935 smart_str_appends(str, ") {\n"); in zend_ast_export_ex()
1936 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_ex()
1937 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
1938 smart_str_appendc(str, '}'); in zend_ast_export_ex()
1941 smart_str_appends(str, "do {\n"); in zend_ast_export_ex()
1942 zend_ast_export_stmt(str, ast->child[0], indent + 1); in zend_ast_export_ex()
1943 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
1944 smart_str_appends(str, "} while ("); in zend_ast_export_ex()
1945 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
1946 smart_str_appendc(str, ')'); in zend_ast_export_ex()
1951 smart_str_appends(str, "if ("); in zend_ast_export_ex()
1952 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1953 smart_str_appends(str, ") {\n"); in zend_ast_export_ex()
1954 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_ex()
1956 smart_str_appends(str, "else {\n"); in zend_ast_export_ex()
1957 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_ex()
1959 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
1960 smart_str_appendc(str, '}'); in zend_ast_export_ex()
1963 smart_str_appends(str, "switch ("); in zend_ast_export_ex()
1964 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1965 smart_str_appends(str, ") {\n"); in zend_ast_export_ex()
1966 zend_ast_export_ex(str, ast->child[1], 0, indent + 1); in zend_ast_export_ex()
1967 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
1968 smart_str_appendc(str, '}'); in zend_ast_export_ex()
1971 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
1973 smart_str_appends(str, "case "); in zend_ast_export_ex()
1974 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1975 smart_str_appends(str, ":\n"); in zend_ast_export_ex()
1977 smart_str_appends(str, "default:\n"); in zend_ast_export_ex()
1979 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_ex()
1982 smart_str_appends(str, "match ("); in zend_ast_export_ex()
1983 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
1984 smart_str_appends(str, ") {\n"); in zend_ast_export_ex()
1985 zend_ast_export_ex(str, ast->child[1], 0, indent + 1); in zend_ast_export_ex()
1986 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
1987 smart_str_appendc(str, '}'); in zend_ast_export_ex()
1990 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
1992 zend_ast_export_list(str, (zend_ast_list*)ast->child[0], 1, 0, indent); in zend_ast_export_ex()
1993 smart_str_appends(str, " => "); in zend_ast_export_ex()
1995 smart_str_appends(str, "default => "); in zend_ast_export_ex()
1997 zend_ast_export_ex(str, ast->child[1], 0, 0); in zend_ast_export_ex()
1998 smart_str_appends(str, ",\n"); in zend_ast_export_ex()
2001 smart_str_appends(str, "declare("); in zend_ast_export_ex()
2003 zend_ast_export_list(str, (zend_ast_list*)ast->child[0], 1, 0, indent); in zend_ast_export_ex()
2004 smart_str_appendc(str, ')'); in zend_ast_export_ex()
2006 smart_str_appends(str, " {\n"); in zend_ast_export_ex()
2007 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_ex()
2008 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2009 smart_str_appendc(str, '}'); in zend_ast_export_ex()
2011 smart_str_appendc(str, ';'); in zend_ast_export_ex()
2015 smart_str_appendc(str, '$'); in zend_ast_export_ex()
2018 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2021 smart_str_appends(str, "use "); in zend_ast_export_ex()
2022 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2024 smart_str_appends(str, " {\n"); in zend_ast_export_ex()
2025 zend_ast_export_ex(str, ast->child[1], 0, indent + 1); in zend_ast_export_ex()
2026 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2027 smart_str_appends(str, "}"); in zend_ast_export_ex()
2029 smart_str_appends(str, ";"); in zend_ast_export_ex()
2033 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2034 smart_str_appends(str, " insteadof "); in zend_ast_export_ex()
2035 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2039 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2040 smart_str_appends(str, "::"); in zend_ast_export_ex()
2042 zend_ast_export_name(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2045 smart_str_appends(str, "namespace"); in zend_ast_export_ex()
2047 smart_str_appendc(str, ' '); in zend_ast_export_ex()
2048 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2051 smart_str_appends(str, " {\n"); in zend_ast_export_ex()
2052 zend_ast_export_stmt(str, ast->child[1], indent + 1); in zend_ast_export_ex()
2053 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2054 smart_str_appends(str, "}\n"); in zend_ast_export_ex()
2056 smart_str_appendc(str, ';'); in zend_ast_export_ex()
2061 zend_ast_export_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2063 smart_str_appends(str, " as public"); in zend_ast_export_ex()
2065 smart_str_appends(str, " as protected"); in zend_ast_export_ex()
2067 smart_str_appends(str, " as private"); in zend_ast_export_ex()
2069 smart_str_appends(str, " as"); in zend_ast_export_ex()
2072 smart_str_appendc(str, ' '); in zend_ast_export_ex()
2073 zend_ast_export_name(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2077 smart_str_append(str, zend_ast_get_str(ast->child[0])); in zend_ast_export_ex()
2078 smart_str_appends(str, ": "); in zend_ast_export_ex()
2085 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2086 smart_str_appends(str, ast->kind == ZEND_AST_NULLSAFE_METHOD_CALL ? "?->" : "->"); in zend_ast_export_ex()
2087 zend_ast_export_var(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2088 smart_str_appendc(str, '('); in zend_ast_export_ex()
2089 zend_ast_export_ex(str, ast->child[2], 0, indent); in zend_ast_export_ex()
2090 smart_str_appendc(str, ')'); in zend_ast_export_ex()
2093 zend_ast_export_ns_name(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2094 smart_str_appends(str, "::"); in zend_ast_export_ex()
2095 zend_ast_export_var(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2096 smart_str_appendc(str, '('); in zend_ast_export_ex()
2097 zend_ast_export_ex(str, ast->child[2], 0, indent); in zend_ast_export_ex()
2098 smart_str_appendc(str, ')'); in zend_ast_export_ex()
2101 if (priority > 100) smart_str_appendc(str, '('); in zend_ast_export_ex()
2102 zend_ast_export_ex(str, ast->child[0], 100, indent); in zend_ast_export_ex()
2104 smart_str_appends(str, " ? "); in zend_ast_export_ex()
2105 zend_ast_export_ex(str, ast->child[1], 101, indent); in zend_ast_export_ex()
2106 smart_str_appends(str, " : "); in zend_ast_export_ex()
2108 smart_str_appends(str, " ?: "); in zend_ast_export_ex()
2110 zend_ast_export_ex(str, ast->child[2], 101, indent); in zend_ast_export_ex()
2111 if (priority > 100) smart_str_appendc(str, ')'); in zend_ast_export_ex()
2115 smart_str_appends(str, "try {\n"); in zend_ast_export_ex()
2116 zend_ast_export_stmt(str, ast->child[0], indent + 1); in zend_ast_export_ex()
2117 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2118 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2120 smart_str_appends(str, "} finally {\n"); in zend_ast_export_ex()
2121 zend_ast_export_stmt(str, ast->child[2], indent + 1); in zend_ast_export_ex()
2122 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2124 smart_str_appendc(str, '}'); in zend_ast_export_ex()
2127 smart_str_appends(str, "} catch ("); in zend_ast_export_ex()
2128 zend_ast_export_catch_name_list(str, zend_ast_get_list(ast->child[0]), indent); in zend_ast_export_ex()
2130 smart_str_appends(str, " $"); in zend_ast_export_ex()
2131 zend_ast_export_var(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2133 smart_str_appends(str, ") {\n"); in zend_ast_export_ex()
2134 zend_ast_export_stmt(str, ast->child[2], indent + 1); in zend_ast_export_ex()
2135 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2139 zend_ast_export_attributes(str, ast->child[3], indent, 0); in zend_ast_export_ex()
2142 zend_ast_export_type(str, ast->child[0], indent); in zend_ast_export_ex()
2143 smart_str_appendc(str, ' '); in zend_ast_export_ex()
2146 smart_str_appendc(str, '&'); in zend_ast_export_ex()
2149 smart_str_appends(str, "..."); in zend_ast_export_ex()
2151 smart_str_appendc(str, '$'); in zend_ast_export_ex()
2152 zend_ast_export_name(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2157 smart_str_appends(str, "for ("); in zend_ast_export_ex()
2158 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2159 smart_str_appendc(str, ';'); in zend_ast_export_ex()
2161 smart_str_appendc(str, ' '); in zend_ast_export_ex()
2162 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2164 smart_str_appendc(str, ';'); in zend_ast_export_ex()
2166 smart_str_appendc(str, ' '); in zend_ast_export_ex()
2167 zend_ast_export_ex(str, ast->child[2], 0, indent); in zend_ast_export_ex()
2169 smart_str_appends(str, ") {\n"); in zend_ast_export_ex()
2170 zend_ast_export_stmt(str, ast->child[3], indent + 1); in zend_ast_export_ex()
2171 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2172 smart_str_appendc(str, '}'); in zend_ast_export_ex()
2175 smart_str_appends(str, "foreach ("); in zend_ast_export_ex()
2176 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2177 smart_str_appends(str, " as "); in zend_ast_export_ex()
2179 zend_ast_export_ex(str, ast->child[2], 0, indent); in zend_ast_export_ex()
2180 smart_str_appends(str, " => "); in zend_ast_export_ex()
2182 zend_ast_export_ex(str, ast->child[1], 0, indent); in zend_ast_export_ex()
2183 smart_str_appends(str, ") {\n"); in zend_ast_export_ex()
2184 zend_ast_export_stmt(str, ast->child[3], indent + 1); in zend_ast_export_ex()
2185 zend_ast_export_indent(str, indent); in zend_ast_export_ex()
2186 smart_str_appendc(str, '}'); in zend_ast_export_ex()
2193 if (priority > p) smart_str_appendc(str, '('); in zend_ast_export_ex()
2194 zend_ast_export_ex(str, ast->child[0], pl, indent); in zend_ast_export_ex()
2195 smart_str_appends(str, op); in zend_ast_export_ex()
2196 zend_ast_export_ex(str, ast->child[1], pr, indent); in zend_ast_export_ex()
2197 if (priority > p) smart_str_appendc(str, ')'); in zend_ast_export_ex()
2201 if (priority > p) smart_str_appendc(str, '('); in zend_ast_export_ex()
2202 smart_str_appends(str, op); in zend_ast_export_ex()
2203 zend_ast_export_ex(str, ast->child[0], pl, indent); in zend_ast_export_ex()
2204 if (priority > p) smart_str_appendc(str, ')'); in zend_ast_export_ex()
2208 if (priority > p) smart_str_appendc(str, '('); in zend_ast_export_ex()
2209 zend_ast_export_ex(str, ast->child[0], pl, indent); in zend_ast_export_ex()
2210 smart_str_appends(str, op); in zend_ast_export_ex()
2211 if (priority > p) smart_str_appendc(str, ')'); in zend_ast_export_ex()
2215 smart_str_appends(str, op); in zend_ast_export_ex()
2216 smart_str_appendc(str, '('); in zend_ast_export_ex()
2217 zend_ast_export_ex(str, ast->child[0], 0, indent); in zend_ast_export_ex()
2218 smart_str_appendc(str, ')'); in zend_ast_export_ex()
2222 smart_str_appends(str, op); in zend_ast_export_ex()
2224 smart_str_appendc(str, ' '); in zend_ast_export_ex()
2231 smart_str_appends(str, op); in zend_ast_export_ex()
2236 smart_str_appends(str, " = "); in zend_ast_export_ex()
2245 smart_str str = {0}; in zend_ast_export() local
2247 smart_str_appends(&str, prefix); in zend_ast_export()
2248 zend_ast_export_ex(&str, ast, 0, 0); in zend_ast_export()
2249 smart_str_appends(&str, suffix); in zend_ast_export()
2250 smart_str_0(&str); in zend_ast_export()
2251 return str.s; in zend_ast_export()