X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=examples%2FcodeGen.spl;h=5b366ba3ca59b54684aa0ee0b04c132b2e2200b2;hb=a5c9b65860f9af03a7c999f7abd6ab5f12f63523;hp=658ea6e3384e6d0523b299766cb34404fa9ed433;hpb=c922c4eb59493bbc73add331a348230978d0d036;p=cc1516.git diff --git a/examples/codeGen.spl b/examples/codeGen.spl index 658ea6e..5b366ba 100644 --- a/examples/codeGen.spl +++ b/examples/codeGen.spl @@ -1,7 +1,16 @@ -f() { - return 2; +f(x, y) { + return x; } + main() { - var x = 3; - return 1 + 2 + x + f(); +// Int x1 = 3; +// Char x2 = '\n'; +// Bool x3 = True; +// (Int, Char) x4 = (4, '\n'); +// [Bool] x5 = True : False : True : True : []; +// [Int] x1 = 42 : []; + Int x1 = 1; + Int x2 = f(x1, 2); + f(x1, 2); + return x1; }