blob: f149e9226762acc5f659d44dc24b51a6021a78b0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
/* As you see, the language supports variable scopes */
extern printf = (*i64, varargs) => i64;
let x = 18;
let foo = () => i64 {
let x = 1;
printf("%d", x);
return x;
};
let main = () => i64 {
printf("%d", x);
let x = 2;
let y = foo();
printf("%d", x);
return x + y;
};
|