slige/compiler/example.slg
2024-11-18 10:23:48 +01:00

32 lines
315 B
Plaintext
Executable File

fn add(a: int, b: int) -> int {
a + b
}
add(2,3); // -> 5
let a: string = "Hello";
let b = "world";
println(a + " " + b + "!"); // -> "Hello world!"
if a == b {
println("whaaaat");
}
else {
println(":o");
}
oopjoipjioj
loop {
let i = 0;
if i >= 10 {
break;
}
i += 1;
}