Skip to content

fix(common.pest): prevent arrow_direction from greedily matching identifier prefixes - #434

Merged
castler merged 1 commit into
eclipse-score:mainfrom
AAmbuj:amsh_fix_arrow_direction_alias_ambiguity
Aug 20, 2026
Merged

fix(common.pest): prevent arrow_direction from greedily matching identifier prefixes#434
castler merged 1 commit into
eclipse-score:mainfrom
AAmbuj:amsh_fix_arrow_direction_alias_ambiguity

Conversation

@AAmbuj

@AAmbuj AAmbuj commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

…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)

…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
AAmbuj force-pushed the amsh_fix_arrow_direction_alias_ambiguity branch from d313876 to 5db9976 Compare August 20, 2026 11:19
@castler
castler merged commit 617ce5e into eclipse-score:main Aug 20, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants