refu-lang / refu

Refu language
21 stars 4 forks source link

Implement backend code generation for variable ranges #29

Closed LefterisJP closed 7 years ago

LefterisJP commented 7 years ago

Iterable ranges used in for expressions can also have variables as the start, step or end value. That works fine until the typechecking stage but there is no code for it in the intermediate representation or the backend code generation.

Implement the intermediate format and backend code generation for constructs like the following:

fn (start_index:u32, end_index:u32) {
    for a in start_index:2:end_index {
        print("foo")
    }
}