From d1601871e8da23fdea29b162aa2f2047672813cd Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Sat, 15 Jun 2019 17:38:36 -0700 Subject: [PATCH] Improve name of commands property --- experiments/maki-interpreter/index.js | 4 ++-- experiments/maki-interpreter/index.test.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/experiments/maki-interpreter/index.js b/experiments/maki-interpreter/index.js index b712d0d1..ab63a1fc 100644 --- a/experiments/maki-interpreter/index.js +++ b/experiments/maki-interpreter/index.js @@ -198,7 +198,7 @@ class Parser { const variables = this._readVariables(); const constants = this._readConstants(); const functions = this._readFunctions(); - const decoding = this._decodeCode({ + const commands = this._decodeCode({ types, variables, functionNames, @@ -211,7 +211,7 @@ class Parser { variables, constants, functions, - decoding + commands }; } } diff --git a/experiments/maki-interpreter/index.test.js b/experiments/maki-interpreter/index.test.js index 21e6f03d..e765239b 100644 --- a/experiments/maki-interpreter/index.test.js +++ b/experiments/maki-interpreter/index.test.js @@ -92,8 +92,8 @@ describe("standardframe.maki", () => { [33, 1] ]; - test("can read decoding", () => { - maki.decoding.forEach((command, i) => { + test("can read commands", () => { + maki.commands.forEach((command, i) => { const [expectedOpcode, expectedSize] = expectedCommands[i]; if (expectedOpcode !== command.opcode) { throw new Error( @@ -108,6 +108,6 @@ describe("standardframe.maki", () => { ); } }); - expect(maki.decoding.length).toBe(256); + expect(maki.commands.length).toBe(expectedCommands.length); }); });