zl90 / Cornell-CS4120

I'm taking Cornell University's "Introduction to Compilers" course
5 stars 0 forks source link

Fix broken if_else_stmt production #24

Closed zl90 closed 11 months ago

zl90 commented 11 months ago

Currently broken with the following input:

if x {
    g = 5
}
else { // not sure the else statement should be on a newline anyway. Check the language spec
    g = 2
}

Also needs to be able to have no curly braces with a single statement, like so:

if (a < b) b = b - a
else a = a - b