Add non-empty test programs.

This commit is contained in:
Danila Fedorin 2018-08-05 13:11:20 -07:00
parent 86ee6557cf
commit caaae87344
2 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,7 @@
fun main(): u0 {
1+2+3;
var a = 5+5;
var b = a;
var a = a + b;
var c = a - b;
}

21
programs/call.chalk Normal file
View File

@ -0,0 +1,21 @@
fun double(a): u8 {
return a + a;
}
fun quadruple(a): u8 {
return double(double(a));
}
fun reuse(): u0 {
var one = 2;
var two = 4;
var three = 6;
}
fun main(): u0 {
var a = quadruple(4);
var one = 1;
var two = 2;
var three = 3;
reuse();
}