reid-llvm/examples/reid/arithmetic.reid
2024-08-25 22:29:45 +03:00

14 lines
287 B
Plaintext

// Arithmetic, function calls and imports!
fn main() {
let test = 9;
let simpleAdd = 2 + 2;
let simpleMult = 7 * 2; // 14
let arithmetic = 3 + 2 * 5 + 1 * 2; // 15
if simpleAdd < test {
return 3;
}
return arithmetic + simpleMult * arithmetic;
}