mirror of
https://github.com/python/cpython.git
synced 2026-07-24 19:02:12 -04:00
1034e73f69
Move the invalid_factor rule from term to factor and the invalid_arithmetic rule from shift_expr to sum, so that they are tried at all positions where the invalid construct can occur. Previously a generic "invalid syntax" error was reported for constructs like "1 << 2 + not x" or "1 * + not x". Co-authored-by: Claude Fable 5 <noreply@anthropic.com>