AltoLang / Alto

Compiler in the works!
MIT License
3 stars 1 forks source link

Add support for `return` statements #45

Closed FilipToth closed 3 years ago

FilipToth commented 3 years ago

What this does

We finally allow for return statements in our functions!

TODO:

Syntax

function add(x : int, y : int) : int {
    return x + y
}
function hello(name : string) {
    if (name == "test")
        return

    var message = "Hi, " + name + "!"
    print(message)
}