I've updated parseDWInstruction function to be shorter, more modular, and arguably easier to read and follow. Attempted to make code dryer without veering into being too esoteric.
Per contribution guidelines I've done manual string input output testing using a variety of valid and invalid syntax arguments and correct behavior observed where wrong number of tokens, invalid operations, and malformed expressions are appropriately identified and rejected.
Per the complex method citation here:
https://www.codefactor.io/repository/github/simon987/much-assembly-required/issues/master
I've updated parseDWInstruction function to be shorter, more modular, and arguably easier to read and follow. Attempted to make code dryer without veering into being too esoteric.
Per contribution guidelines I've done manual string input output testing using a variety of valid and invalid syntax arguments and correct behavior observed where wrong number of tokens, invalid operations, and malformed expressions are appropriately identified and rejected.