slige/compiler/example-no-types.slg

29 lines
300 B
Plaintext
Raw Normal View History

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