|
@@ -132,8 +132,8 @@ public class StatementFormatter implements StatementVisitor<Void> {
|
132
|
132
|
public Void visitExpression(ExpressionStatement statement) {
|
133
|
133
|
WhitespaceInfo whitespace = statement.getTag(WhitespaceInfo.class);
|
134
|
134
|
beginSingleLine(whitespace);
|
135
|
|
- output.append(statement.expression.accept(expressionFormatter).value)
|
136
|
|
- .append(";");
|
|
135
|
+ String value = statement.expression.accept(expressionFormatter).value;
|
|
136
|
+ output.append(value).append(";");
|
137
|
137
|
endSingleLine(whitespace);
|
138
|
138
|
return null;
|
139
|
139
|
}
|
|
@@ -278,7 +278,8 @@ public class StatementFormatter implements StatementVisitor<Void> {
|
278
|
278
|
}
|
279
|
279
|
if (statement.initializer != null) {
|
280
|
280
|
output.append(" = ");
|
281
|
|
- output.append(statement.initializer.accept(expressionFormatter).value);
|
|
281
|
+ String value = statement.initializer.accept(expressionFormatter).value;
|
|
282
|
+ output.append(value);
|
282
|
283
|
}
|
283
|
284
|
output.append(";");
|
284
|
285
|
endSingleLine(whitespace);
|