Skip to content

Commit 18d50de

Browse files
committed
just ast
1 parent 09baebc commit 18d50de

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

apps/oxlint/src-js/generated/deserialize.js

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ function deserializeWith(buffer, sourceTextInput, sourceByteLenInput, getLocInpu
3838

3939
function deserializeProgram(pos) {
4040
let end = deserializeU32(pos + 4),
41-
ref_uint32 = uint32,
42-
ref_uint8 = uint8,
43-
ref_sourceText = sourceText,
41+
refUint32 = uint32,
42+
refUint8 = uint8,
43+
refSourceText = sourceText,
4444
localAstId = ++astId,
4545
program = parent = {
4646
__proto__: NodeProto,
@@ -52,18 +52,16 @@ function deserializeProgram(pos) {
5252
if (localAstId !== astId) {throw Error(
5353
'The AST being accessed has already been cleaned up. Please ensure that the plugin works synchronously.',
5454
);}
55-
// restore buffers
56-
uint32 = ref_uint32;
57-
uint8 = ref_uint8;
58-
sourceText = ref_sourceText;
59-
// deserialize the comments
60-
let c = deserializeVecComment(pos + 24);
61-
// drop the references
62-
ref_uint32 = void 0;
63-
ref_uint8 = void 0;
64-
ref_sourceText = void 0;
65-
Object.defineProperty(this, 'comments', { value: c });
66-
return c;
55+
// Restore buffers
56+
uint32 = refUint32;
57+
uint8 = refUint8;
58+
sourceText = refSourceText;
59+
// Deserialize the comments
60+
let comments = deserializeVecComment(pos + 24);
61+
// Drop the references
62+
refUint32 = refUint8 = refSourceText = void 0;
63+
Object.defineProperty(this, 'comments', { value: comments });
64+
return comments;
6765
},
6866
start: 0,
6967
end,

0 commit comments

Comments
 (0)