Skip to content

Commit

Permalink
Correctly deserialize ReferenceFlag
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Mar 3, 2024
1 parent db85aa5 commit 780fba0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions napi/parser/generate/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ function deserializeRegExpFlags(pos) {
return text;
}

function deserializeReferenceFlag(_pos) {
return '';
function deserializeReferenceFlag(pos) {
const bits = uint8[pos],
parts = [];
if (bits & 1) parts.push('Read');
if (bits & 2) parts.push('Write');
if (bits & 4) parts.push('Type');
return parts.join(' | ');
}

0 comments on commit 780fba0

Please sign in to comment.