aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/src/Include/internal/pegen_interface.h
blob: ee4c77ec006760cb14c34340fc3a5a5248d51735 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef Py_PEGENINTERFACE
#define Py_PEGENINTERFACE
#ifdef __cplusplus
extern "C" {
#endif

#ifndef Py_BUILD_CORE
#  error "this header requires Py_BUILD_CORE define"
#endif

#include "Python.h"
#include "Python-ast.h"

PyAPI_FUNC(mod_ty) PyPegen_ASTFromString(
    const char *str,
    const char *filename,
    int mode,
    PyCompilerFlags *flags,
    PyArena *arena);
PyAPI_FUNC(mod_ty) PyPegen_ASTFromStringObject(
    const char *str,
    PyObject* filename,
    int mode,
    PyCompilerFlags *flags,
    PyArena *arena);
PyAPI_FUNC(mod_ty) PyPegen_ASTFromFileObject(
    FILE *fp,
    PyObject *filename_ob,
    int mode,
    const char *enc,
    const char *ps1,
    const char *ps2,
    PyCompilerFlags *flags,
    int *errcode,
    PyArena *arena);
PyAPI_FUNC(mod_ty) PyPegen_ASTFromFilename(
    const char *filename,
    int mode,
    PyCompilerFlags *flags,
    PyArena *arena);


#ifdef __cplusplus
}
#endif
#endif /* !Py_PEGENINTERFACE*/