feat(for): implement positional params iteration in for loops#125
Merged
feat(for): implement positional params iteration in for loops#125
Conversation
When a for loop has no 'in' clause (e.g., `for x; do echo $x; done`), iterate over positional parameters ($@) from the current call frame. Also fix parser to consume optional semicolon between variable and 'do'. https://claude.ai/code/session_01DsjxPUzxwySRqnkfRroawu
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
The parser now correctly handles "done" as regular word after for loop. https://claude.ai/code/session_01DsjxPUzxwySRqnkfRroawu
- Add bracket expression matching in glob patterns for case statements - Implement character ranges (a-z), negation ([!x] and [^x]) - Update lexer to read [abc] as single word token instead of separate tokens - Add tests for bracket expressions, ranges, and negation https://claude.ai/code/session_01DsjxPUzxwySRqnkfRroawu
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
for x; do ... donesyntax to iterate over positional parameters ($@) inside functionsdokeywordTest plan
test_for_loop_positional_paramstestcargo test -p bashkit --lib --all-features- 603 tests passcargo fmt --check && cargo clippy --all-targets --all-features -- -D warningshttps://claude.ai/code/session_01DsjxPUzxwySRqnkfRroawu