diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2020-04-27 17:02:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-27 17:02:07 (GMT) |
commit | 2b74c835a7280840a853e3a9aaeb83758b13a458 (patch) | |
tree | a8f64047d5872571e12d6c256bbc54a9551f8bb6 /Parser/pegen/parse_string.c | |
parent | 9adccc1384568f4d46e37f698cb3e3a4f6ca0252 (diff) | |
download | cpython-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 'Parser/pegen/parse_string.c')
-rw-r--r-- | Parser/pegen/parse_string.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Parser/pegen/parse_string.c b/Parser/pegen/parse_string.c index 41485a9..9a78a28 100644 --- a/Parser/pegen/parse_string.c +++ b/Parser/pegen/parse_string.c @@ -586,7 +586,7 @@ fstring_compile_expr(Parser *p, const char *expr_start, const char *expr_end, return NULL; } - Parser *p2 = _PyPegen_Parser_New(tok, Py_fstring_input, NULL, p->arena); + Parser *p2 = _PyPegen_Parser_New(tok, Py_fstring_input, p->flags, NULL, p->arena); p2->starting_lineno = p->starting_lineno + p->tok->first_lineno - 1; p2->starting_col_offset = p->tok->first_lineno == p->tok->lineno ? p->starting_col_offset + t->col_offset : 0; |