diff --git a/def/core.ts b/def/core.ts index 382dd608..06c69b5c 100644 --- a/def/core.ts +++ b/def/core.ts @@ -291,14 +291,14 @@ export default function (fork: Fork) { .field("arguments", [def("Expression")]); def("CallExpression") - .bases("Expression", "ChainElement") + .bases("Expression") .build("callee", "arguments") .field("callee", def("Expression")) // See comment for NewExpression above. .field("arguments", [def("Expression")]); def("MemberExpression") - .bases("Expression", "ChainElement") + .bases("Expression") .build("object", "property", "computed") .field("object", def("Expression")) .field("property", or(def("Identifier"), def("Expression"))) diff --git a/def/es2020.ts b/def/es2020.ts index 0bdddf06..f8eac33a 100644 --- a/def/es2020.ts +++ b/def/es2020.ts @@ -29,6 +29,12 @@ export default function (fork: Fork) { .bases("Node") .field("optional", Boolean, defaults["true"]); + def("CallExpression") + .bases("Expression", "ChainElement"); + + def("MemberExpression") + .bases("Expression", "ChainElement"); + def("ChainExpression") .bases("Expression") .build("expression")