fix(common.pest): prevent arrow_direction from greedily matching identifier prefixes - #434
Merged
castler merged 1 commit intoAug 20, 2026
Conversation
AAmbuj
requested review from
LittleHuba,
castler,
hoe-jo,
limdor and
ramceb
as code owners
August 20, 2026 11:18
…tifier prefixes Direction keywords (l, r, u, d, ri, do, le, up, right, left, down) were consumed as arrow_direction when arrow_middle? tried to match a component alias starting with those letters (e.g. `latst_`, `right_svc`). Replace the positive lookahead over specific successor tokens with a negative word-boundary check `!(ASCII_ALPHANUMERIC | "_")`, which is simpler and decoupled from the arrow token set. Add regression tests covering: - All four single-char directions as target alias (no_decor) - Two-char direction prefix (ri) as alias - Full keyword prefix (right_svc) as alias - Direction-prefix alias on the source (LHS) side - Interface-required context with direction-prefix alias (documentation)
AAmbuj
force-pushed
the
amsh_fix_arrow_direction_alias_ambiguity
branch
from
August 20, 2026 11:19
d313876 to
5db9976
Compare
castler
approved these changes
Aug 20, 2026
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.
…tifier prefixes
Direction keywords (l, r, u, d, ri, do, le, up, right, left, down) were consumed as arrow_direction when arrow_middle? tried to match a component alias starting with those letters (e.g.
latst_,right_svc).Replace the positive lookahead over specific successor tokens with a negative word-boundary check
!(ASCII_ALPHANUMERIC | "_"), which is simpler and decoupled from the arrow token set.Add regression tests covering: