We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d95f3d commit e1b91eaCopy full SHA for e1b91ea
lib/binary_parser.ts
@@ -916,11 +916,13 @@ export class Parser {
916
const start = ctx.generateTmpVariable();
917
const cur = ctx.generateTmpVariable();
918
919
- ctx.pushCode(`var ${start} = offset;`)
+ ctx.pushCode(`var ${start} = offset;`);
920
ctx.pushCode(`var ${cur} = 0;`);
921
ctx.pushCode(`while (offset < buffer.length) {`);
922
ctx.pushCode(`${cur} = buffer.readUInt8(offset);`);
923
- ctx.pushCode(`if (${pred}.call(this, ${cur}, buffer.slice(offset))) break;`);
+ ctx.pushCode(
924
+ `if (${pred}.call(this, ${cur}, buffer.slice(offset))) break;`
925
+ );
926
ctx.pushCode(`offset += 1;`);
927
ctx.pushCode(`}`);
928
ctx.pushCode(`${varName} = buffer.slice(${start}, offset);`);
0 commit comments