orangeduck/BuildYourOwnLisp

Doesn't properly handle a single negative number as the input in `evaluation.c`

Opened this issue · 0 comments

guacs commented

In the resulting evaluation.c of Chapter 7, the input of -5 would be evaluated to 5 instead of the expected -5. This is because the op is only evaluated within the while loop but in cases where there are no expr children, the loop is never entered.