Mailing List Archive

gh-118323: Document `&&` grammar syntax (#118324)
https://github.com/python/cpython/commit/51aefc5bf907ddffaaf083ded0de773adcdf08c8
commit: 51aefc5bf907ddffaaf083ded0de773adcdf08c8
branch: main
author: Nikita Sobolev <mail@sobolevn.me>
committer: pablogsal <Pablogsal@gmail.com>
date: 2024-04-27T11:36:06+01:00
summary:

gh-118323: Document `&&` grammar syntax (#118324)

files:
M Grammar/python.gram

diff --git a/Grammar/python.gram b/Grammar/python.gram
index 3943d7fec5db03..05d7837e3aa6db 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

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-leave@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: list-python-checkins@lists.gossamer-threads.com