diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2021-06-24 15:09:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-24 15:09:57 (GMT) |
commit | 0acc258fe6f0ec200ca2f6f9294adbf52a244802 (patch) | |
tree | cf584ea88a0cbe1c7518fe7436ad3521335b7554 /Parser/pegen.c | |
parent | b19f45533942e4ad7ddf9d2d94f8b87c6f746bce (diff) | |
download | cpython-0acc258fe6f0ec200ca2f6f9294adbf52a244802.zip cpython-0acc258fe6f0ec200ca2f6f9294adbf52a244802.tar.gz cpython-0acc258fe6f0ec200ca2f6f9294adbf52a244802.tar.bz2 |
bpo-44456: Improve the syntax error when mixing keyword and positional patterns (GH-26793)
Diffstat (limited to 'Parser/pegen.c')
-rw-r--r-- | Parser/pegen.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Parser/pegen.c b/Parser/pegen.c index 615047c..3472d48 100644 --- a/Parser/pegen.c +++ b/Parser/pegen.c @@ -1557,6 +1557,13 @@ _PyPegen_seq_last_item(asdl_seq *seq) return asdl_seq_GET_UNTYPED(seq, len - 1); } +void * +_PyPegen_seq_first_item(asdl_seq *seq) +{ + return asdl_seq_GET_UNTYPED(seq, 0); +} + + /* Creates a new name of the form <first_name>.<second_name> */ expr_ty _PyPegen_join_names_with_dot(Parser *p, expr_ty first_name, expr_ty second_name) |