summaryrefslogtreecommitdiffstats
path: root/Modules
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 /Modules
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 'Modules')
-rw-r--r--Modules/_peg_parser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/_peg_parser.c b/Modules/_peg_parser.c
index cb5f9aa..e1ec36e 100644
--- a/Modules/_peg_parser.c
+++ b/Modules/_peg_parser.c
@@ -28,9 +28,10 @@ _Py_parse_file(PyObject *self, PyObject *args, PyObject *kwds)
return NULL;
}
+ PyCompilerFlags flags = _PyCompilerFlags_INIT;
PyObject *result = NULL;
- mod_ty res = PyPegen_ASTFromFile(filename, mode, arena);
+ mod_ty res = PyPegen_ASTFromFile(filename, mode, &flags, arena);
if (res == NULL) {
goto error;
}