summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2020-04-27 17:02:07 (GMT)
committerGitHub <noreply@github.com>2020-04-27 17:02:07 (GMT)
commit2b74c835a7280840a853e3a9aaeb83758b13a458 (patch)
treea8f64047d5872571e12d6c256bbc54a9551f8bb6 /Include
parent9adccc1384568f4d46e37f698cb3e3a4f6ca0252 (diff)
downloadcpython-2b74c835a7280840a853e3a9aaeb83758b13a458.zip
cpython-2b74c835a7280840a853e3a9aaeb83758b13a458.tar.gz
cpython-2b74c835a7280840a853e3a9aaeb83758b13a458.tar.bz2
bpo-40334: Support CO_FUTURE_BARRY_AS_BDFL in the new parser (GH-19721)
This commit also allows to pass flags to the new parser in all interfaces and fixes a bug in the parser generator that was causing to inline rules with actions, making them disappear.
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pegen_interface.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/Include/internal/pegen_interface.h b/Include/internal/pegen_interface.h
index d8621c1..adff731 100644
--- a/Include/internal/pegen_interface.h
+++ b/Include/internal/pegen_interface.h
@@ -11,21 +11,24 @@ extern "C" {
#include "Python.h"
#include "Python-ast.h"
-PyAPI_FUNC(mod_ty) PyPegen_ASTFromFile(const char *filename, int mode, PyArena *arena);
+PyAPI_FUNC(mod_ty) PyPegen_ASTFromFile(const char *filename, int mode, PyCompilerFlags*, PyArena *arena);
PyAPI_FUNC(mod_ty) PyPegen_ASTFromString(const char *str, 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, int *errcode, PyArena *arena);
-PyAPI_FUNC(PyCodeObject *) PyPegen_CodeObjectFromFile(const char *filename, int mode);
+ const char *ps2, PyCompilerFlags *flags,
+ int *errcode, PyArena *arena);
+PyAPI_FUNC(PyCodeObject *) PyPegen_CodeObjectFromFile(const char *filename, int mode, PyCompilerFlags *flags);
PyAPI_FUNC(PyCodeObject *) PyPegen_CodeObjectFromString(const char *str, int mode,
PyCompilerFlags *flags);
PyAPI_FUNC(PyCodeObject *) PyPegen_CodeObjectFromFileObject(FILE *, PyObject *filename_ob,
- int mode, const char *enc,
+ int mode,
const char *ps1,
const char *ps2,
+ PyCompilerFlags *flags,
+ const char *enc,
int *errcode);
#ifdef __cplusplus