[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);
|
||||
|
||||
if (thenStmt instanceof JsBlock) {
|
||||
lineBreakAfterBlock = false;
|
||||
}
|
||||
|
||||
sourceLocationConsumer.pushSourceInfo(null);
|
||||
accept(thenStmt);
|
||||
sourceLocationConsumer.popSourceInfo();
|
||||
@@ -984,6 +988,7 @@ public class JsToStringGenerationVisitor extends JsVisitor {
|
||||
public void visitTry(@NotNull JsTry x) {
|
||||
p.print(CHARS_TRY);
|
||||
spaceOpt();
|
||||
lineBreakAfterBlock = false;
|
||||
accept(x.getTryBlock());
|
||||
|
||||
acceptList(x.getCatches());
|
||||
|
||||
Reference in New Issue
Block a user