Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions crates/oxc_ast/src/serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -570,11 +570,7 @@ impl ESTree for ClassImplements<'_, '_> {
ts_type = "JSXIdentifier",
raw_deser = "
const ident = DESER[Box<IdentifierReference>](POS);
ident.type = 'JSXIdentifier';
delete ident.decorators;
delete ident.optional;
delete ident.typeAnnotation;
ident
{type: 'JSXIdentifier', start: ident.start, end: ident.end, name: ident.name}
"
)]
pub struct JSXElementIdentifierReference<'a, 'b>(pub &'b IdentifierReference<'a>);
Expand Down
12 changes: 2 additions & 10 deletions napi/parser/deserialize-js.js
Original file line number Diff line number Diff line change
Expand Up @@ -3361,11 +3361,7 @@ function deserializeJSXElementName(pos) {
return deserializeBoxJSXIdentifier(pos + 8);
case 1:
const ident = deserializeBoxIdentifierReference(pos + 8);
ident.type = 'JSXIdentifier';
delete ident.decorators;
delete ident.optional;
delete ident.typeAnnotation;
return ident;
return { type: 'JSXIdentifier', start: ident.start, end: ident.end, name: ident.name };
case 2:
return deserializeBoxJSXNamespacedName(pos + 8);
case 3:
Expand All @@ -3382,11 +3378,7 @@ function deserializeJSXMemberExpressionObject(pos) {
switch (uint8[pos]) {
case 0:
const ident = deserializeBoxIdentifierReference(pos + 8);
ident.type = 'JSXIdentifier';
delete ident.decorators;
delete ident.optional;
delete ident.typeAnnotation;
return ident;
return { type: 'JSXIdentifier', start: ident.start, end: ident.end, name: ident.name };
case 1:
return deserializeBoxJSXMemberExpression(pos + 8);
case 2:
Expand Down
12 changes: 2 additions & 10 deletions napi/parser/deserialize-ts.js
Original file line number Diff line number Diff line change
Expand Up @@ -3422,11 +3422,7 @@ function deserializeJSXElementName(pos) {
return deserializeBoxJSXIdentifier(pos + 8);
case 1:
const ident = deserializeBoxIdentifierReference(pos + 8);
ident.type = 'JSXIdentifier';
delete ident.decorators;
delete ident.optional;
delete ident.typeAnnotation;
return ident;
return { type: 'JSXIdentifier', start: ident.start, end: ident.end, name: ident.name };
case 2:
return deserializeBoxJSXNamespacedName(pos + 8);
case 3:
Expand All @@ -3443,11 +3439,7 @@ function deserializeJSXMemberExpressionObject(pos) {
switch (uint8[pos]) {
case 0:
const ident = deserializeBoxIdentifierReference(pos + 8);
ident.type = 'JSXIdentifier';
delete ident.decorators;
delete ident.optional;
delete ident.typeAnnotation;
return ident;
return { type: 'JSXIdentifier', start: ident.start, end: ident.end, name: ident.name };
case 1:
return deserializeBoxJSXMemberExpression(pos + 8);
case 2:
Expand Down
Loading