munificent / craftinginterpreters

Repository for the book "Crafting Interpreters"
http://www.craftinginterpreters.com/
Other
8.75k stars 1.03k forks source link

Redundant use of TokenType #980

Open pohara60 opened 3 years ago

pohara60 commented 3 years ago

There is a redundant use of TokenType is this line, introduced in Chapter 9:

https://github.com/munificent/craftinginterpreters/blob/b98b8a1a0d1d3c852853461badb5d583eb8af860/java/com/craftinginterpreters/lox/Interpreter.java#L394

Chamberlain91 commented 2 years ago

How so? Isn't that there to distinguish itself from TokenType.AND?

pohara60 commented 2 years ago

How so? Isn't that there to distinguish itself from TokenType.AND?

I was referring to the redundant text "TokenType.", the text "OR" suffices. (The author avoids using this text everywhere else, so it is inconsistent.)