aboutsummaryrefslogtreecommitdiff
path: root/tests/main.amal
blob: f778a14012afd13c4219ae9b688deeb5395330ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
const io = @import("io.amal");

const User = struct {
    name: str;
    age: i32;
}

const main = fn {
    var hello = fn {

    }
    const value = "hello";
    // fn {} // error, function declaration can't be by itself. Needs left-hand side
    print(value, "world", 356, 13.37);
    var num1: i64;
    const num2 = 23232;
    const num3 = num1 + num2 * 30;
    //const num4 = (num1 + num2) * num3 * ((34 + 32) / 234.345);
    const num4 = (num1 + num2) * num3 * ((34 + 32) / 2);
    // pub cost num34 = 45; // error, only declarations in global scope can be public
    //const num4 = 23; // error, variable redeclaration
    /*
    episfjpseifipesf
    */
    io.puts("lole");
}

const print = fn {

}