Closed Trent325 closed 1 year ago
I think you have the right idea as to how everything should be implemented. The one thing I will say is when you define it in simple statement in the Parser, it think you just need (reserved "return" >> [expression] ) instead of (reserved "return" >> return [expression] ). I could be wrong, but I think that is how you could do it.
Looks good to me. You should probably name your expression in Syntax "ReturnExpr" just to keep the naming convention for expressions in the language. Not sure if you're allowed to have a space in the name of an expression anyway.
I also agree with Sean's comment, the return statement in the Parser should read "reserved 'return' >> Expression" you don't need the second return
I attempted to do assignment 3, it is probably wrong, so feedback is appreciated. Thank you