From: Nikita Sobolev Date: Sat, 27 Apr 2024 10:36:06 +0000 (+0300) Subject: gh-118323: Document `&&` grammar syntax (#118324) X-Git-Tag: v3.13.0b1~245 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51aefc5bf907ddffaaf083ded0de773adcdf08c8;p=thirdparty%2FPython%2Fcpython.git gh-118323: Document `&&` grammar syntax (#118324) --- diff --git a/Grammar/python.gram b/Grammar/python.gram index 3943d7fec5db..05d7837e3aa6 100644 --- a/Grammar/python.gram +++ b/Grammar/python.gram @@ -78,6 +78,9 @@ _PyPegen_parse(Parser *p) # Fail if e can be parsed, without consuming any input. # ~ # Commit to the current alternative, even if it fails to parse. +# &&e +# Eager parse e. The parser will not backtrack and will immediately +# fail with SyntaxError if e cannot be parsed. # # STARTING RULES