Not all of the cases are implemented yet but the most common stuff is there, and it shows the general structure of how we're implementing this. The idea I have in mind is: there are two action types that the compiler can send to the dispatch, "output" and "programDone". Output's payload is simply a string, programDone has a null payload, just meant to notify when the program is no longer running. All of the other processing of output will be done by the Compiler class (I may consider abstracting the processing of output into a separate class). The output sent to the dispatch function will be the final data that should be printed directly to the console.
Not all of the cases are implemented yet but the most common stuff is there, and it shows the general structure of how we're implementing this. The idea I have in mind is: there are two action types that the compiler can send to the dispatch, "output" and "programDone". Output's payload is simply a string, programDone has a null payload, just meant to notify when the program is no longer running. All of the other processing of output will be done by the Compiler class (I may consider abstracting the processing of output into a separate class). The output sent to the dispatch function will be the final data that should be printed directly to the console.