Skip to content

Commit

Permalink
Copy over build scripts for hermes-parser package
Browse files Browse the repository at this point in the history
Reviewed By: dannysu

Differential Revision: D69432808

fbshipit-source-id: 2b628e39ccabcf5103c77573e284fd1dcf04cfcb
  • Loading branch information
neildhar authored and facebook-github-bot committed Feb 14, 2025
1 parent b4f27d3 commit c0c3e8e
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,9 @@ function deserializeProperty() {
shorthand: this.deserializeBoolean(),
};
}
function deserializeClassLikeFirst() {
throw new Error('ClassLike' + ' should not appear in program buffer');
}
function deserializeClassDeclaration() {
return {
type: 'ClassDeclaration',
Expand Down Expand Up @@ -629,6 +632,9 @@ function deserializeClassExpression() {
};
}

function deserializeClassLikeLast() {
throw new Error('ClassLike' + ' should not appear in program buffer');
}
function deserializeClassBody() {
return {
type: 'ClassBody',
Expand All @@ -648,6 +654,7 @@ function deserializeClassProperty() {
optional: this.deserializeBoolean(),
variance: this.deserializeNode(),
typeAnnotation: this.deserializeNode(),
tsModifiers: this.deserializeNode(),
};
}

Expand All @@ -662,6 +669,7 @@ function deserializeClassPrivateProperty() {
optional: this.deserializeBoolean(),
variance: this.deserializeNode(),
typeAnnotation: this.deserializeNode(),
tsModifiers: this.deserializeNode(),
};
}

Expand Down Expand Up @@ -2084,6 +2092,16 @@ function deserializeCoverTypedIdentifier() {
function deserializeCoverLast() {
throw new Error('Cover' + ' should not appear in program buffer');
}
function deserializeSHBuiltin() {
return {type: 'SHBuiltin', loc: this.addEmptyLoc()};
}
function deserializeImplicitCheckedCast() {
return {
type: 'ImplicitCheckedCast',
loc: this.addEmptyLoc(),
argument: this.deserializeNode(),
};
}
module.exports = [
deserializeEmpty,
deserializeMetadata,
Expand Down Expand Up @@ -2171,10 +2189,12 @@ module.exports = [
deserializeTaggedTemplateExpression,
deserializeTemplateElement,
deserializeProperty,
deserializeClassLikeFirst,
deserializeClassDeclaration,

deserializeClassExpression,

deserializeClassLikeLast,
deserializeClassBody,
deserializeClassProperty,

Expand Down Expand Up @@ -2381,4 +2401,6 @@ module.exports = [
deserializeCoverRestElement,
deserializeCoverTypedIdentifier,
deserializeCoverLast,
deserializeSHBuiltin,
deserializeImplicitCheckedCast,
];

0 comments on commit c0c3e8e

Please sign in to comment.