jmeaster30 / ocean

A C-like programming language (get it like sea-like like an ocean lol)
GNU General Public License v3.0
0 stars 0 forks source link

Debug console command logic feels a bit bad #65

Closed jmeaster30 closed 8 months ago

jmeaster30 commented 9 months ago

I feel like the debug console code could be a lot cleaner and more easily extensible.

Need to try and figure out a better way to do it.

Maybe there should be structs for each command and the console code just takes the line, splits by whitespace and passes it to the command structs with the proper contexts.

jmeaster30 commented 8 months ago

I tried adding command structs but it made things look a little more confusing. I did refactor to use the Argument Parser that the main command line interface uses which makes the code look a lot better since all the validation is handled in the parser