Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(646)

Unified Diff: lib/src/source_visitor.dart

Issue 2521383002: Correctly indent the RHS of 'is' and 'as' expressions. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « CHANGELOG.md ('k') | test/splitting/mixed.stmt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/source_visitor.dart
diff --git a/lib/src/source_visitor.dart b/lib/src/source_visitor.dart
index 9c4cd2c6d3308413fbbbc772cf8fe552d46966ff..f10cdd07544b298eba08b56a86ffa36afc76006d 100644
--- a/lib/src/source_visitor.dart
+++ b/lib/src/source_visitor.dart
@@ -159,11 +159,13 @@ class SourceVisitor implements AstVisitor {
visitAsExpression(AsExpression node) {
builder.startSpan();
+ builder.nestExpression();
visit(node.expression);
soloSplit();
token(node.asOperator);
space();
visit(node.type);
+ builder.unnest();
builder.endSpan();
}
@@ -1240,12 +1242,14 @@ class SourceVisitor implements AstVisitor {
visitIsExpression(IsExpression node) {
builder.startSpan();
+ builder.nestExpression();
visit(node.expression);
soloSplit();
token(node.isOperator);
token(node.notOperator);
space();
visit(node.type);
+ builder.unnest();
builder.endSpan();
}
« no previous file with comments | « CHANGELOG.md ('k') | test/splitting/mixed.stmt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698