[JS AST] Don't generate a new line after try and if-then blocks
This commit is contained in:
@@ -653,6 +653,10 @@ public class JsToStringGenerationVisitor extends JsVisitor {
|
|||||||
}
|
}
|
||||||
nestedPush(thenStmt);
|
nestedPush(thenStmt);
|
||||||
|
|
||||||
|
if (thenStmt instanceof JsBlock) {
|
||||||
|
lineBreakAfterBlock = false;
|
||||||
|
}
|
||||||
|
|
||||||
sourceLocationConsumer.pushSourceInfo(null);
|
sourceLocationConsumer.pushSourceInfo(null);
|
||||||
accept(thenStmt);
|
accept(thenStmt);
|
||||||
sourceLocationConsumer.popSourceInfo();
|
sourceLocationConsumer.popSourceInfo();
|
||||||
@@ -984,6 +988,7 @@ public class JsToStringGenerationVisitor extends JsVisitor {
|
|||||||
public void visitTry(@NotNull JsTry x) {
|
public void visitTry(@NotNull JsTry x) {
|
||||||
p.print(CHARS_TRY);
|
p.print(CHARS_TRY);
|
||||||
spaceOpt();
|
spaceOpt();
|
||||||
|
lineBreakAfterBlock = false;
|
||||||
accept(x.getTryBlock());
|
accept(x.getTryBlock());
|
||||||
|
|
||||||
acceptList(x.getCatches());
|
acceptList(x.getCatches());
|
||||||
|
|||||||
Reference in New Issue
Block a user