AltoLang / Alto

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

Better way of pretty printing bound trees #40

Closed FilipToth closed 3 years ago

FilipToth commented 3 years ago

Code

for i = 0 to 15
{
    var x = i / 5 + 1
    var s = toString(x)
    print(s)
}

New bound tree output:

    let i = 0
    let upperBound = 15
    goto Label2
Label1:
    var x = i / 5 + 1
    var s = toString(x)
    print(s)
    i = i + 1
Label2:
    goto Label1 if i <= upperBound
Label3: