Repository navigation
Name the directional status stack fields and extract X-phase helpers - #18
Merged
Merged
Conversation
- Add DirectionalStatus (level, override, isolate) for stack entries, replacing positional tuples such as stack[-1][2]. - Extract _apply_override for the override step repeated in X5a-X6a. - Extract _apply_x9 for the separate X9 pass after the X2-X8 loop. - Document in CLAUDE.md why X2-X8 stay as one loop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tidies
apply_explicit_levels(rules X1–X9) without changing behaviour or output.Changes
DirectionalStatusnamed tuple (level,override,isolate) for directional status stack entries, replacing positional tuples such asstack[-1][2]._apply_override(ci, override)replaces the override step that was repeated in the RLI, LRI, FSI, PDI and X6 branches._apply_x9(chars)holds the X9 pass that runs after the X2–X8 loop.is_validnames the push test repeated in X2–X5c, using the spec's term ("this RLE is valid").else(it is the only rule defined by exclusion) and that BN also reaches it, which is harmless because X9 resets BN afterwards.Testing
tests/run_bidi_tests.py: 91707 / 91707 passedtests/run_bidi_type_tests.py: 770241 / 770241 passed