Add notes on things to assert

This commit is contained in:
Jordan Eldredge 2020-07-03 20:15:42 -07:00
parent 4f0578d402
commit 65592a5d2a

View file

@ -219,6 +219,7 @@ function readConstants({ makiFile, variables }) {
while (count--) {
const i = makiFile.readUInt32LE();
const variable = variables[i];
// TODO: Assert this is of type string.
const value = makiFile.readString();
// TODO: Don't mutate
variable.setValue(value);
@ -316,6 +317,8 @@ function parse(data) {
const bindings = readBindings(makiFile);
const commands = decodeCode({ makiFile });
// TODO: Assert that we are at the end of the maki file
// Map binary offsets to command indexes.
// Some bindings/functions ask us to jump to a place in the binary data and
// start executing. However, we want to do all the parsing up front, and just