aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorMathias Magnusson <mathias@magnusson.space>2025-07-03 23:00:50 +0200
committerMathias Magnusson <mathias@magnusson.space>2025-07-03 23:00:50 +0200
commit7f86e0dc92670dd5da34cd22c36aba18fa58ec6d (patch)
tree692521deb068563d650a0028874d11dea8cdda31 /src/main.zig
parent3959256af626292d50d5c05c63073ef28d760546 (diff)
downloadhuginn-7f86e0dc92670dd5da34cd22c36aba18fa58ec6d.tar.gz
implement comparisons
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main.zig b/src/main.zig
index 5eda854..367edf8 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -37,10 +37,11 @@ pub fn main() !void {
const source =
\\{
\\ let x = 10
- \\ let y = 5
- \\ while y {
+ \\ let y = 0
+ \\ print(x > y)
+ \\ while y < 3 {
\\ x = x + x
- \\ y = y - 1
+ \\ y = y + 1
\\ }
\\ if x {
\\ # let x = read_int(0)