X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=examples%2FcodeGen.spl;h=5b366ba3ca59b54684aa0ee0b04c132b2e2200b2;hb=a5c9b65860f9af03a7c999f7abd6ab5f12f63523;hp=9982b4b249e8546798b0370f5526ec8616c7e504;hpb=6758e36a62b15fea8b7505f58b829ff4ff0ba94e;p=cc1516.git diff --git a/examples/codeGen.spl b/examples/codeGen.spl index 9982b4b..5b366ba 100644 --- a/examples/codeGen.spl +++ b/examples/codeGen.spl @@ -1,6 +1,5 @@ -f(x) { - Int y = 2; - return 4; +f(x, y) { + return x; } main() { @@ -11,6 +10,7 @@ main() { // [Bool] x5 = True : False : True : True : []; // [Int] x1 = 42 : []; Int x1 = 1; - Int x2 = f(x1); + Int x2 = f(x1, 2); + f(x1, 2); return x1; }