u/Economy_Season_72

I actually added a basic interpreter in my Console Explorer app.
▲ 17 r/csharp

I actually added a basic interpreter in my Console Explorer app.

So i added a interpreter that executes upon line by line evaluation, and it actually supports variable expansion in its output. this took me the entire day. but its worth it.

basically the interpreter first finds the files and stores every line in a list of strings, I know its bad long term but its a start, then those lines get tokenized by my tokenizer in Utility.cs, after tokenization, is where the evaluation and execution starts. for the input i used Async and await so the whole app waits for me to press enter in the textbox to lock in my input then passes the said input to the variable I want to change the value of. And All Variables are stored inside a Dictionary of string objects. i basically just passed my list of variable names and dictionary of variables to make the variable expansion work in my output. This is an update to my previous post.

Previous Post: Post

Repository: Github

u/Economy_Season_72 — 21 hours ago