parenthesized stays the compiler's, off the public tree

goodbye-acorn
Nic 2 weeks ago
parent b2d7d57b00
commit 969c6a9234

@ -140,6 +140,7 @@ function to_public_ast(source, ast, modern) {
if (modern) { if (modern) {
const clean = (/** @type {any} */ node) => { const clean = (/** @type {any} */ node) => {
delete node.metadata; delete node.metadata;
delete node.parenthesized;
}; };
ast.options?.attributes.forEach((attribute) => { ast.options?.attributes.forEach((attribute) => {

@ -47,6 +47,8 @@ export function convert(source, ast) {
_(node, { next }) { _(node, { next }) {
// @ts-ignore // @ts-ignore
delete node.metadata; delete node.metadata;
// @ts-ignore
delete node.parenthesized;
next(); next();
}, },
// @ts-ignore // @ts-ignore

@ -77,7 +77,6 @@
"column": 24 "column": 24
} }
}, },
"parenthesized": true,
"object": { "object": {
"type": "Identifier", "type": "Identifier",
"start": 36, "start": 36,
@ -188,7 +187,6 @@
"column": 24 "column": 24
} }
}, },
"parenthesized": true,
"operator": "=", "operator": "=",
"left": { "left": {
"type": "Identifier", "type": "Identifier",
@ -331,7 +329,6 @@
"column": 27 "column": 27
} }
}, },
"parenthesized": true,
"properties": [ "properties": [
{ {
"type": "Property", "type": "Property",

@ -1005,7 +1005,6 @@
"column": 60 "column": 60
} }
}, },
"parenthesized": true,
"id": null, "id": null,
"expression": false, "expression": false,
"generator": false, "generator": false,

@ -25,7 +25,6 @@
"column": 9 "column": 9
} }
}, },
"parenthesized": true,
"leadingComments": [ "leadingComments": [
{ {
"type": "Block", "type": "Block",

Loading…
Cancel
Save