slige/compiler/example-no-types.slg

29 lines
300 B
Plaintext
Raw Normal View History

2024-11-18 10:21:30 +01:00
2024-11-20 15:41:20 +01:00
fn sum(a, b) {
+ a b;
}
add(2,3); // -> 5
let a = "Hello";
let b = "world";
2024-11-18 10:21:30 +01:00
2024-11-20 15:41:20 +01:00
//println(+ (+ a " ") (+ b "!")); // -> "Hello world!"
if == a b {
println("whaaaat");
}
else {
println(":o");
2024-11-18 10:21:30 +01:00
}
2024-11-20 15:41:20 +01:00
loop {
// let i = 0;
//
// if >= i 10 {
// break;
// }
//
// i = i + 1;
}