Files
sx/examples/expected/0051-basic-for-range-bounds.stdout
agra f513c11ea6 test(0051): pin expression bounds at either end of range tokens
x+2..=42 (expression start, 39 iterations summing 897),
x+2<..<x*21 (expressions both ends, 5..41), 0..x*3 (expression end).
Expression parsing stops at the range lexeme from either side, so any
expression works in either position — now pinned.
2026-06-10 22:02:34 +03:00

16 lines
271 B
Plaintext

1 2 3 4 | 0<..<5
0 1 2 3 4 5 | 0=..=5
1 2 3 4 5 | 0<..=5
0 1 2 3 4 | 0=..<5
0 1 2 3 4 | 0..<5
0 1 2 3 4 5 | 0..=5
10@3 20@4 30@5 | xs, 2<..
10@5 20@6 30@7 | xs, 5=..
inline 0<..=3 sum=6
2 3 4 | lo<..=hi
x+2..=42: n=39 sum=897
x+2<..<x*21: n2=37
0..x*3: n3=6
cmp ok
shl=6