Repository navigation
Decode escaped backslashes in raw string literals - #385
blouirts123 wants to merge 1 commit into
Conversation
|
Small companion for adjacent escapes: 20-line test-only commit, based on this branch with no implementation changes. Two useful guards: an escaped backslash beside an escaped quote, and an escaped backslash beside a preserved Both new test methods pass against this branch's complete package source on Windows/Python 3.14.4, checking lexer values and public Focused Ruff lint/format checks pass. I haven't run the full suite or version matrix, and these don't address the separate token-offset work. With the file added to this branch, the command is |
Raw strings currently retain both backslashes in an escaped backslash, so a filter looking for a Windows path segment ending in
\can match the wrong rows. Decode the two raw-string escape forms in one pass, preserving unknown escapes such as\zand\u.This follows the current specification's raw-string grammar. The existing compliance case is updated to that grammar; the older JEP-12 page uses different wording. Related to #323.
Validation: full suites on Python 3.12 and 3.14: 995 passed, 1 skipped; independent compliance/focused run: 924 passed; root focused tests: 4 passed. Existing deprecation warnings remain.
Adjacent #349 adds lexer unit coverage without implementing this decoding; #382 fixes token offsets, which this change leaves untouched.