SimpleGeek / jlox

0 stars 0 forks source link

Refactor redundant code in Parser #2

Open SimpleGeek opened 4 years ago

SimpleGeek commented 4 years ago

The equality and comparison methods in the Parser class are redundant; abstract that logic out to something more parameter based so that code is only written once.

SimpleGeek commented 4 years ago

Update: there are now multiple methods in the Parser class that create a new Expr.Binary instance. All of these should be able to be refactored into a single method.