[JS IR] Generate 'names' entries for functions in sourcemaps
This commit is contained in:
committed by
Space Team
parent
1d0025c3cf
commit
d9681caf0c
@@ -655,7 +655,6 @@ public class JsToStringGenerationVisitor extends JsVisitor {
|
||||
|
||||
@Override
|
||||
public void visitFunction(@NotNull JsFunction x) {
|
||||
pushSourceInfo(x.getSource());
|
||||
printCommentsBeforeNode(x);
|
||||
|
||||
p.print(CHARS_FUNCTION);
|
||||
@@ -664,7 +663,6 @@ public class JsToStringGenerationVisitor extends JsVisitor {
|
||||
printFunction(x);
|
||||
|
||||
printCommentsAfterNode(x);
|
||||
popSourceInfo();
|
||||
}
|
||||
|
||||
// name(<params>) { <body> }
|
||||
@@ -673,10 +671,10 @@ public class JsToStringGenerationVisitor extends JsVisitor {
|
||||
nameOf(x);
|
||||
}
|
||||
|
||||
pushSourceInfo(x.getSource());
|
||||
leftParen();
|
||||
boolean notFirst = false;
|
||||
for (Object element : x.getParameters()) {
|
||||
JsParameter param = (JsParameter) element;
|
||||
for (JsParameter param : x.getParameters()) {
|
||||
notFirst = sepCommaOptSpace(notFirst);
|
||||
accept(param);
|
||||
}
|
||||
@@ -689,6 +687,8 @@ public class JsToStringGenerationVisitor extends JsVisitor {
|
||||
printJsBlock(x.getBody(), true, x.getBody().getSource());
|
||||
sourceLocationConsumer.popSourceInfo();
|
||||
|
||||
popSourceInfo();
|
||||
|
||||
needSemi = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user