summaryrefslogtreecommitdiffstats
path: root/Include/cpython/parser_interface.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/cpython/parser_interface.h')
-rw-r--r--Include/cpython/parser_interface.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/Include/cpython/parser_interface.h b/Include/cpython/parser_interface.h
new file mode 100644
index 0000000..1c6576d
--- /dev/null
+++ b/Include/cpython/parser_interface.h
@@ -0,0 +1,52 @@
+#ifndef Py_PEGENINTERFACE
+#define Py_PEGENINTERFACE
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "Python.h"
+
+#ifndef Py_LIMITED_API
+PyAPI_FUNC(struct _mod *) PyParser_ASTFromString(
+ const char *str,
+ const char *filename,
+ int mode,
+ PyCompilerFlags *flags,
+ PyArena *arena);
+PyAPI_FUNC(struct _mod *) PyParser_ASTFromStringObject(
+ const char *str,
+ PyObject* filename,
+ int mode,
+ PyCompilerFlags *flags,
+ PyArena *arena);
+PyAPI_FUNC(struct _mod *) PyParser_ASTFromFile(
+ FILE *fp,
+ const char *filename,
+ const char* enc,
+ int mode,
+ const char *ps1,
+ const char *ps2,
+ PyCompilerFlags *flags,
+ int *errcode,
+ PyArena *arena);
+PyAPI_FUNC(struct _mod *) PyParser_ASTFromFileObject(
+ FILE *fp,
+ PyObject *filename_ob,
+ const char *enc,
+ int mode,
+ const char *ps1,
+ const char *ps2,
+ PyCompilerFlags *flags,
+ int *errcode,
+ PyArena *arena);
+PyAPI_FUNC(struct _mod *) PyParser_ASTFromFilename(
+ const char *filename,
+ int mode,
+ PyCompilerFlags *flags,
+ PyArena *arena);
+#endif /* !Py_LIMITED_API */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_PEGENINTERFACE */