File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -286,7 +286,7 @@ export class Parser {
286286 alias ?: string ;
287287 useContextVariables = false ;
288288
289- constructor ( ) { }
289+ constructor ( ) { }
290290
291291 static start ( ) {
292292 return new Parser ( ) ;
@@ -706,7 +706,7 @@ export class Parser {
706706 }
707707
708708 pointer ( varName : string , options : ParserOptions ) : this {
709- if ( ! options . offset ) {
709+ if ( options . offset == null ) {
710710 throw new Error ( "offset is required for pointer." ) ;
711711 }
712712
@@ -1118,8 +1118,7 @@ export class Parser {
11181118 if ( rem ) {
11191119 const mask = - 1 >>> ( 32 - rem ) ;
11201120 ctx . pushCode (
1121- `${ parser . varName } = (${ val } & 0x${ mask . toString ( 16 ) } ) << ${
1122- length - rem
1121+ `${ parser . varName } = (${ val } & 0x${ mask . toString ( 16 ) } ) << ${ length - rem
11231122 } ;`,
11241123 ) ;
11251124 length -= rem ;
@@ -1131,8 +1130,7 @@ export class Parser {
11311130 const mask = - 1 >>> ( 32 - length ) ;
11321131
11331132 ctx . pushCode (
1134- `${ parser . varName } ${
1135- length < ( parser . options . length as number ) ? "|=" : "="
1133+ `${ parser . varName } ${ length < ( parser . options . length as number ) ? "|=" : "="
11361134 } ${ val } >> ${ offset } & 0x${ mask . toString ( 16 ) } ;`,
11371135 ) ;
11381136
You can’t perform that action at this time.
0 commit comments