munificent / craftinginterpreters

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

Expression result not printed after execution #1000

Closed mhmdvoid closed 2 years ago

mhmdvoid commented 2 years ago

In Repl mode, It's always better to be interactive and show how easy and fun using a programming language can be. After trying current version of Lox, figured out you need to use print statement to figure out what is the result of an expression.

By expression I mean return value of function, Initial expression of variable and direct coding like 1 / 2 .

Issue current-version :

10 + 10 ; ..

mcfriend99 commented 2 years ago

A proper PR for this should implement the same for the VM.

mhmdvoid commented 2 years ago

You mean for C as well? This PR for java implementation. And not completed PR as I am in progress for other commits

mcfriend99 commented 2 years ago

Yes

mhmdvoid commented 2 years ago

Yes , Well you can go and submit your PR for C implementation, Otherwise My focus now is to finish off Java Implementation. THANKS ♥️🙏🏻.

mcfriend99 commented 2 years ago

I think it's good to focus on one at a time. I'm just pointing it out as it can lead to differences in the C and Java implementation.

Good luck!

mhmdvoid commented 2 years ago

Definitely You are right . Thankfully I know C , Will check out C code later . Thank you.