From: Brendan Hansen Date: Tue, 20 Feb 2024 02:41:31 +0000 (-0600) Subject: minor fixes with new syntax X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=d96ded5a1f2c05f7cc93cba3e97ce8195084b7e3;p=onyxlang.io.git minor fixes with new syntax --- diff --git a/www/templates/pages/docs/guide_raylib.html b/www/templates/pages/docs/guide_raylib.html index c773df3..9a62b3d 100644 --- a/www/templates/pages/docs/guide_raylib.html +++ b/www/templates/pages/docs/guide_raylib.html @@ -260,7 +260,7 @@ mineGenerator :: () -> Iterator(Mine) { } // Check collision with mines - for mine: mines { + for mine in mines { if raylib.CheckCollisionCircles( .{ player.x, player.y }, player.size, .{ mine.x, mine.y }, mine.size, @@ -276,7 +276,7 @@ mineGenerator :: () -> Iterator(Mine) { raylib.ClearBackground(.{20, 20, 20, 255}); // Draw mines - for mine: mines { + for mine in mines { raylib.DrawCircle(~~mine.x, ~~mine.y, mine.size, .{100, 0, 0, 255}); } diff --git a/www/templates/pages/homepage.html b/www/templates/pages/homepage.html index 4f58598..fbbb52c 100644 --- a/www/templates/pages/homepage.html +++ b/www/templates/pages/homepage.html @@ -61,7 +61,7 @@
use core { printf, iter }
 
 main :: () {
-    for i: 1 .. 10 {
+    for i in 1 .. 10 {
         fact := factorial(i);
         printf("{}! = {}\n", i, fact);
     }