Closed rawhuul closed 2 years ago
Hi, not sure what could be wrong. I would suggest checking out what the expression it parses looks like in case something is wrong there.
Actually, parsed expression is correct.
Thanks for your response, it was my silly mistakes. I just fixed it. 🖤
Hey, there! I really appreciate the work you've done for
mpc
andBuild Your Own Lisp
book. Recently, I read the book and tried it out myself. Yesterday, I completed the 14th chapter of book which deals with strings, adding comments and print, error and load function as builtin types. And I tried it out and everything seems to work fine except whenever I try to evaluate a file, it doesn't output any thing at all whereas I am usingprint
function and doing same thing in interpreter does work fine. Here, I am attaching a screenshot too.As you can see in the following screenshot, in terminal while evaluating file it doesn't output anything whereas in interpreter it does.
Here is what my code looks like:-
Here my
eval_file
function callsparse
,builtin_load
andparse_clean
functions and other than those functions, everything is same as book describes.My
parser
struct:My
grammer
:parse
function:My
parse_clean
function:builtin_load
function: