|
|
|
@ -30,12 +30,13 @@ export function parse(source, comments, typescript) {
|
|
|
|
comments.push(/** @type {AST.JSComment} */ (comment));
|
|
|
|
comments.push(/** @type {AST.JSComment} */ (comment));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// a module read on its own is one piece: its program, in its own scope
|
|
|
|
// a module read on its own is one piece: its program, in its own scope
|
|
|
|
|
|
|
|
const scopes = /** @type {teasel.Scope[]} */ (answer.scopes);
|
|
|
|
keep_tables(answer.node, {
|
|
|
|
keep_tables(answer.node, {
|
|
|
|
node: answer.node,
|
|
|
|
node: answer.node,
|
|
|
|
scope: answer.scopes[0],
|
|
|
|
scope: scopes[0],
|
|
|
|
scopes: answer.scopes.slice(1),
|
|
|
|
scopes: scopes.slice(1),
|
|
|
|
bindings: answer.bindings,
|
|
|
|
bindings: /** @type {teasel.Binding[]} */ (answer.bindings),
|
|
|
|
references: answer.references
|
|
|
|
references: /** @type {teasel.Reference[]} */ (answer.references)
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
return answer.node;
|
|
|
|
return answer.node;
|
|
|
|
|