migrate to the new for-loop syntax
Drop the ':' before captures (for xs (x) / for 0..n (i)); the index capture becomes the trailing open range (for xs, 0.. (x, i)). 136 headers across 26 files, mechanical. Five headless tests (banner_layout, hit_test, swipe_commit, swipe_intent, swipe_reshuffle) also gain a direct #import "modules/ui/types.sx" — they named Point/Frame through a transitive import, which bare visibility no longer permits. Gates: sx build --target ios-sim main.sx links; tools/run_tests.sh 23/23.
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
// second `Frame` struct that collides with the UI `Frame`. Failure is signalled
|
||||
// via a non-zero exit code (the runner checks exit code AND stdout).
|
||||
#import "modules/std.sx";
|
||||
#import "modules/ui/types.sx";
|
||||
#import "board.sx";
|
||||
#import "board_layout.sx";
|
||||
|
||||
@@ -26,8 +27,8 @@ main :: () -> s32 {
|
||||
|
||||
// Every cell center must map back to its own cell.
|
||||
hits : s64 = 0;
|
||||
for 0..BOARD_ROWS: (row) {
|
||||
for 0..BOARD_COLS: (col) {
|
||||
for 0..BOARD_ROWS (row) {
|
||||
for 0..BOARD_COLS (col) {
|
||||
cf := lay.cell_frame(col, row);
|
||||
center := Point.{ x = cf.mid_x(), y = cf.mid_y() };
|
||||
if h := lay.point_to_cell(center) {
|
||||
|
||||
Reference in New Issue
Block a user