-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
I am parsing following source:
var obj = {
get latest() {
return undefined;
}
}
I am processing the AST tree created by the parser. The AST tree is mostly fine, but there is one irregularity. The node AST_Accessor (containing the getter body) shows me token properties start and end as undefined.
The Uglify code responsible for this is:
if (name == "get") {
a.push(new AST_ObjectGetter({
start : start,
key : as_atom_node(),
value : function_(AST_Accessor),
end : prev()
}));
continue;
}
Another places using function_ are:
function_(AST_Function) - start and end handled.
function_(AST_Defun) - seems also to miss start and end handling, I amunsure how to fix it there, as I am unsure where to get end from.
When I have adapted the code to match what is handling function_(AST_Function), it seems to fix the issue. I will submit a PR.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels