summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2020-04-27 18:02:07 +0100
committerGitHub <noreply@github.com>2020-04-27 18:02:07 +0100
commit2b74c835a7280840a853e3a9aaeb83758b13a458 (patch)
treea8f64047d5872571e12d6c256bbc54a9551f8bb6 /Python
parent9adccc1384568f4d46e37f698cb3e3a4f6ca0252 (diff)
downloadcpython-git-2b74c835a7280840a853e3a9aaeb83758b13a458.tar.gz
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 'Python')
-rw-r--r--Python/pythonrun.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 3a2fe966c0..79147e430a 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -241,7 +241,7 @@ PyRun_InteractiveOneObjectEx(FILE *fp, PyObject *filename,
if (use_peg) {
mod = PyPegen_ASTFromFileObject(fp, filename, Py_single_input,
- enc, ps1, ps2, &errcode, arena);
+ enc, ps1, ps2, flags, &errcode, arena);
}
else {
mod = PyParser_ASTFromFileObject(fp, filename, enc,
@@ -1073,7 +1073,7 @@ PyRun_FileExFlags(FILE *fp, const char *filename_str, int start, PyObject *globa
if (use_peg) {
mod = PyPegen_ASTFromFileObject(fp, filename, start, NULL, NULL, NULL,
- NULL, arena);
+ flags, NULL, arena);
}
else {
mod = PyParser_ASTFromFileObject(fp, filename, NULL, start, 0, 0,