Olivier Deprez | f4ef2d0 | 2021-04-20 13:36:24 +0200 | [diff] [blame] | 1 | #ifndef Py_LIMITED_API |
| 2 | #ifndef Py_AST_H |
| 3 | #define Py_AST_H |
| 4 | #ifdef __cplusplus |
| 5 | extern "C" { |
| 6 | #endif |
| 7 | |
| 8 | #include "Python-ast.h" /* mod_ty */ |
| 9 | #include "node.h" /* node */ |
| 10 | |
| 11 | PyAPI_FUNC(int) PyAST_Validate(mod_ty); |
| 12 | PyAPI_FUNC(mod_ty) PyAST_FromNode( |
| 13 | const node *n, |
| 14 | PyCompilerFlags *flags, |
| 15 | const char *filename, /* decoded from the filesystem encoding */ |
| 16 | PyArena *arena); |
| 17 | PyAPI_FUNC(mod_ty) PyAST_FromNodeObject( |
| 18 | const node *n, |
| 19 | PyCompilerFlags *flags, |
| 20 | PyObject *filename, |
| 21 | PyArena *arena); |
| 22 | |
| 23 | /* _PyAST_ExprAsUnicode is defined in ast_unparse.c */ |
| 24 | PyAPI_FUNC(PyObject *) _PyAST_ExprAsUnicode(expr_ty); |
| 25 | |
| 26 | /* Return the borrowed reference to the first literal string in the |
| 27 | sequence of statements or NULL if it doesn't start from a literal string. |
| 28 | Doesn't set exception. */ |
| 29 | PyAPI_FUNC(PyObject *) _PyAST_GetDocString(asdl_seq *); |
| 30 | |
| 31 | #ifdef __cplusplus |
| 32 | } |
| 33 | #endif |
| 34 | #endif /* !Py_AST_H */ |
| 35 | #endif /* !Py_LIMITED_API */ |