Skip to content

feat: implement alternate arithmetic for syntax#744

Merged
reubeno merged 1 commit into
mainfrom
alternate-arithmetic-for
Nov 8, 2025
Merged

feat: implement alternate arithmetic for syntax#744
reubeno merged 1 commit into
mainfrom
alternate-arithmetic-for

Conversation

@reubeno
Copy link
Copy Markdown
Owner

@reubeno reubeno commented Nov 8, 2025

This is for one of the parts of #743.

It's an (undocumented?) alternate form of arithmetic-for, where you can do something like:

for ((i = 0; i < 10; i++)) {
    echo $i
}

...without the usual ; do and done.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Nov 8, 2025

Test Results

    3 files     23 suites   6m 11s ⏱️
1 111 tests 1 111 ✅ 0 💤 0 ❌
3 313 runs  3 313 ✅ 0 💤 0 ❌

Results for commit 548811b.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Nov 8, 2025

Performance Benchmark Report

Benchmark name Baseline (μs) Test/PR (μs) Delta (μs) Delta %
clone_shell_object 17.73 μs 17.70 μs -0.02 μs ⚪ Unchanged
eval_arithmetic 0.14 μs 0.15 μs 0.00 μs ⚪ Unchanged
expand_one_string 1.99 μs 1.99 μs -0.01 μs ⚪ Unchanged
for_loop 22.41 μs 22.35 μs -0.07 μs ⚪ Unchanged
function_call 2.73 μs 2.60 μs -0.13 μs ⚪ Unchanged
instantiate_shell 58.01 μs 58.64 μs 0.63 μs ⚪ Unchanged
instantiate_shell_with_init_scripts 23951.85 μs 24516.61 μs 564.76 μs 🟠 +2.36%
parse_bash_completion 2065.67 μs 2014.04 μs -51.63 μs ⚪ Unchanged
parse_sample_script 2.04 μs 1.92 μs -0.11 μs 🟢 -5.50%
run_echo_builtin_command 15.91 μs 15.75 μs -0.16 μs ⚪ Unchanged
run_one_external_command 2360.15 μs 2388.22 μs 28.07 μs 🟠 +1.19%
tokenize_sample_script 3.51 μs 3.50 μs -0.01 μs ⚪ Unchanged

Code Coverage Report: Only Changed Files listed

Package Base Coverage New Coverage Difference
brush-parser/src/parser.rs 🟢 95.41% 🟢 95.43% 🟢 0.02%
Overall Coverage 🟢 71.71% 🟢 71.72% 🟢 0.01%

Minimum allowed coverage is 70%, this run produced 71.72%

Test Summary: bash-completion test suite

Outcome Count Percentage
✅ Pass 1345 63.77
❗️ Error 216 10.24
❌ Fail 179 8.49
⏩ Skip 354 16.79
❎ Expected Fail 14 0.66
✔️ Unexpected Pass 1 0.05
📊 Total 2109 100.00

@reubeno reubeno merged commit cb05ef8 into main Nov 8, 2025
42 checks passed
@reubeno reubeno deleted the alternate-arithmetic-for branch November 8, 2025 05:19
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.

1 participant