From 02e4db6752d593f4212960fb0ef015bf77262ea7 Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Fri, 5 Jul 2019 07:47:10 -0700 Subject: [PATCH] Homonyms, how do they work? --- experiments/maki-interpreter/parser.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/experiments/maki-interpreter/parser.js b/experiments/maki-interpreter/parser.js index d51f4280..ee0b1d1d 100644 --- a/experiments/maki-interpreter/parser.js +++ b/experiments/maki-interpreter/parser.js @@ -22,12 +22,12 @@ class MakiFile { } readUInt32LE() { - const int = this.peakUInt32LE(); + const int = this.peekUInt32LE(); this._i += 4; return int; } - peakUInt32LE() { + peekUInt32LE() { const int = this._buffer.readUInt32LE(this._i); const arrInt = this.__readUInt32LE__arr(); if (int !== arrInt) { @@ -332,7 +332,7 @@ function parseComand({ makiFile, length, pos, localFunctions }) { if ( // Is there another UInt32 to read? length > pos + 5 + 4 && - makiFile.peakUInt32LE() >= 0xffff0000 + makiFile.peekUInt32LE() >= 0xffff0000 ) { makiFile.readUInt32LE(); }