munificent / craftinginterpreters

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

simplify markValue() #909

Closed Evoniuk closed 3 years ago

Evoniuk commented 3 years ago

Certainly not a major patch, or even a fix, I just thought this would be a better way of writing this function.

munificent commented 3 years ago

Ah, good idea! I don't use a newline after single-statement ifs in the code, so I went ahead and made a separate commit for this change that puts it on one line:

https://github.com/munificent/craftinginterpreters/commit/dcc0c21cece9875d99e8723a574b9afaf3946335

Thanks for noticing this!