#include "Python.h"
#include "pycore_ast.h"
#include "pycore_pystate.h"
#include "pycore_runtime.h"
#include <float.h>
#include <stdbool.h>
_Py_DECLARE_STR(dbl_open_br, "{{");
_Py_DECLARE_STR(dbl_close_br, "}}");
#define _str_replace_inf(interp) …
static PyObject *
expr_as_unicode(expr_ty e, int level);
static int
append_ast_expr(_PyUnicodeWriter *writer, expr_ty e, int level);
static int
append_joinedstr(_PyUnicodeWriter *writer, expr_ty e, bool is_format_spec);
static int
append_formattedvalue(_PyUnicodeWriter *writer, expr_ty e);
static int
append_ast_slice(_PyUnicodeWriter *writer, expr_ty e);
static int
append_charp(_PyUnicodeWriter *writer, const char *charp)
{ … }
#define APPEND_STR_FINISH(str) …
#define APPEND_STR(str) …
#define APPEND_STR_IF(cond, str) …
#define APPEND_STR_IF_NOT_FIRST(str) …
#define APPEND_EXPR(expr, pr) …
#define APPEND(type, value) …
static int
append_repr(_PyUnicodeWriter *writer, PyObject *obj)
{ … }
enum { … };
static int
append_ast_boolop(_PyUnicodeWriter *writer, expr_ty e, int level)
{ … }
static int
append_ast_binop(_PyUnicodeWriter *writer, expr_ty e, int level)
{ … }
static int
append_ast_unaryop(_PyUnicodeWriter *writer, expr_ty e, int level)
{ … }
static int
append_ast_arg(_PyUnicodeWriter *writer, arg_ty arg)
{ … }
static int
append_ast_args(_PyUnicodeWriter *writer, arguments_ty args)
{ … }
static int
append_ast_lambda(_PyUnicodeWriter *writer, expr_ty e, int level)
{ … }
static int
append_ast_ifexp(_PyUnicodeWriter *writer, expr_ty e, int level)
{ … }
static int
append_ast_dict(_PyUnicodeWriter *writer, expr_ty e)
{ … }
static int
append_ast_set(_PyUnicodeWriter *writer, expr_ty e)
{ … }
static int
append_ast_list(_PyUnicodeWriter *writer, expr_ty e)
{ … }
static int
append_ast_tuple(_PyUnicodeWriter *writer, expr_ty e, int level)
{ … }
static int
append_ast_comprehension(_PyUnicodeWriter *writer, comprehension_ty gen)
{ … }
static int
append_ast_comprehensions(_PyUnicodeWriter *writer, asdl_comprehension_seq *comprehensions)
{ … }
static int
append_ast_genexp(_PyUnicodeWriter *writer, expr_ty e)
{ … }
static int
append_ast_listcomp(_PyUnicodeWriter *writer, expr_ty e)
{ … }
static int
append_ast_setcomp(_PyUnicodeWriter *writer, expr_ty e)
{ … }
static int
append_ast_dictcomp(_PyUnicodeWriter *writer, expr_ty e)
{ … }
static int
append_ast_compare(_PyUnicodeWriter *writer, expr_ty e, int level)
{ … }
static int
append_ast_keyword(_PyUnicodeWriter *writer, keyword_ty kw)
{ … }
static int
append_ast_call(_PyUnicodeWriter *writer, expr_ty e)
{ … }
static PyObject *
escape_braces(PyObject *orig)
{ … }
static int
append_fstring_unicode(_PyUnicodeWriter *writer, PyObject *unicode)
{ … }
static int
append_fstring_element(_PyUnicodeWriter *writer, expr_ty e, bool is_format_spec)
{ … }
static PyObject *
build_fstring_body(asdl_expr_seq *values, bool is_format_spec)
{ … }
static int
append_joinedstr(_PyUnicodeWriter *writer, expr_ty e, bool is_format_spec)
{ … }
static int
append_formattedvalue(_PyUnicodeWriter *writer, expr_ty e)
{ … }
static int
append_ast_constant(_PyUnicodeWriter *writer, PyObject *constant)
{ … }
static int
append_ast_attribute(_PyUnicodeWriter *writer, expr_ty e)
{ … }
static int
append_ast_slice(_PyUnicodeWriter *writer, expr_ty e)
{ … }
static int
append_ast_subscript(_PyUnicodeWriter *writer, expr_ty e)
{ … }
static int
append_ast_starred(_PyUnicodeWriter *writer, expr_ty e)
{ … }
static int
append_ast_yield(_PyUnicodeWriter *writer, expr_ty e)
{ … }
static int
append_ast_yield_from(_PyUnicodeWriter *writer, expr_ty e)
{ … }
static int
append_ast_await(_PyUnicodeWriter *writer, expr_ty e, int level)
{ … }
static int
append_named_expr(_PyUnicodeWriter *writer, expr_ty e, int level)
{ … }
static int
append_ast_expr(_PyUnicodeWriter *writer, expr_ty e, int level)
{ … }
static int
maybe_init_static_strings(void)
{ … }
static PyObject *
expr_as_unicode(expr_ty e, int level)
{ … }
PyObject *
_PyAST_ExprAsUnicode(expr_ty e)
{ … }