Add muscle-memory aliases: post, upper, lower, capitalize - #589
Closed
danieljohnmorris wants to merge 1 commit into
Closed
Add muscle-memory aliases: post, upper, lower, capitalize#589danieljohnmorris wants to merge 1 commit into
danieljohnmorris wants to merge 1 commit into
Conversation
Closes ILO-78, ILO-79, ILO-81. Mirrors the rand/rnd alias pattern. - `post` → `pst` (pre-0.12.0 muscle memory) - `upper`/`lower` → `upr`/`lwr` (Python/JS/Go/Rust naming) - `capitalize` → `cap` (Python/Ruby naming) Updated skills/ilo/ilo-builtins.md to use `pst` as canonical. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
2 tasks
Collaborator
Author
|
Closed on main. Cherry-picked to |
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.
Summary
post→pstalias (pre-0.12.0 muscle memory)upper→uprandlower→lwraliases (Python/JS/Go/Rust naming)capitalize→capalias (Python/Ruby naming)All aliases follow the existing pattern established by
rand/random→rndandrng→range: parse-time rewrite to canonical short form, one-shot hint on first use, ILO-P011 rejection if used as binding/function name.Changes
src/ast/mod.rs: 5 new entries inBUILTIN_ALIASESwith explanatory commentstests/regression_post_alias.rs: 4 tests pinning alias-table, ILO-P011, and hint datatests/regression_upper_lower_alias.rs: 9 tests covering alias-table, cross-engine dispatch, ILO-P011, and hintstests/regression_capitalize_alias.rs: 6 tests covering alias-table, cross-engine dispatch, ILO-P011, and hintsexamples/string-aliases.ilo: runnable example demonstrating the new string-case aliasesNote:
feature/rand-aliashad already merged into main (PR #581 → merged as part of #582), so this PR bases onmaindirectly.Test plan
cargo buildpassesinterpret_braceless_guard_fibonaccistack overflow is unrelated (also fails onmainbefore these changes)🤖 Generated with Claude Code