1098671e4e
There are two copies of the grammar -- the one used by Python itself as
Grammar/Grammar, and the one used by lib2to3 which has necessarily diverged at
Lib/lib2to3/Grammar.txt because it needs to support older syntax an we want it
to be reasonable stable to avoid requiring fixer rewrites.
This brings suport for syntax like `if x:= foo():` to match what the live
Python grammar does.
This should've been added at the time of the walrus operator itself, but lib2to3 being
independent is often overlooked. So we do consider this a bugfix rather than enhancement.
(cherry picked from commit
|
||
---|---|---|
.. | ||
fixes | ||
pgen2 | ||
tests | ||
Grammar.txt | ||
PatternGrammar.txt | ||
__init__.py | ||
__main__.py | ||
btm_matcher.py | ||
btm_utils.py | ||
fixer_base.py | ||
fixer_util.py | ||
main.py | ||
patcomp.py | ||
pygram.py | ||
pytree.py | ||
refactor.py |