AZHenley / teenytinycompiler

A small BASIC-to-C compiler written in Python.
MIT License
339 stars 49 forks source link

Test for first comparison op should be enforced #2

Closed edw closed 4 years ago

edw commented 4 years ago

https://github.com/AZHenley/teenytinycompiler/blob/34655ada2594b39a4d52d4615f45d4394eef4287/part2/parse.py#L172

There should be an else on the referenced if statement that aborts in the event that self.isComparisonOperator() evaluates to False.

AZHenley commented 4 years ago

Nice catch! Thank you.

edw commented 4 years ago

You’re welcome. And I want to thank you, because, inspired by your tutorials, I’m writing a Lisp compiler in C, hoping to eventually target 65C02 assembly, write a self-hosted version, and run it on my childhood Apple //c.