aboutsummaryrefslogtreecommitdiff
path: root/tests/bytecode.amal
blob: ef255cd81347dcc66966303e74b7189d04e01829 (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
extern const print_extern: fn;
extern const print_extern_num: fn(num: i32);

const print = fn {

}

const main = fn {
    var value = 23;
    value = 34;
    const value2: i64 = 54;
    const value3 = 2 + 5 - 1 * 10 / 2;
    const str_value = "hello, world";
    print();
    if value2 == 54
        const result = print_num(1337);
}

const print_num = fn(num: i32) i32 {
    print_extern();
    print_extern_num(num);
    print_extern_num(8080);
    return num;
}