From 65592a5d2a09598137311b8dcc24a628fc000bea Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Fri, 3 Jul 2020 20:15:42 -0700 Subject: [PATCH] Add notes on things to assert --- packages/webamp/modern/src/maki-interpreter/parser.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/webamp/modern/src/maki-interpreter/parser.js b/packages/webamp/modern/src/maki-interpreter/parser.js index 9b5e90ff..f0994c2a 100644 --- a/packages/webamp/modern/src/maki-interpreter/parser.js +++ b/packages/webamp/modern/src/maki-interpreter/parser.js @@ -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