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

Unified Diff: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/formatter/CodeFormatterVisitor.java

Issue 10516006: Issue 3268. Support for replacing 'assert' statement with 'assert' function (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Changes for review comments Created 8 years, 6 months 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
Index: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/formatter/CodeFormatterVisitor.java
diff --git a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/formatter/CodeFormatterVisitor.java b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/formatter/CodeFormatterVisitor.java
index d43ae67042b1f3d0a8c407f3c107fe665b273b72..4bae8a2ade79b9d8438c8d5c3c2cfdef9e21efb7 100644
--- a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/formatter/CodeFormatterVisitor.java
+++ b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/formatter/CodeFormatterVisitor.java
@@ -16,7 +16,6 @@ package com.google.dart.tools.core.internal.formatter;
import com.google.dart.compiler.ast.ASTVisitor;
import com.google.dart.compiler.ast.DartArrayAccess;
import com.google.dart.compiler.ast.DartArrayLiteral;
-import com.google.dart.compiler.ast.DartAssertion;
import com.google.dart.compiler.ast.DartBinaryExpression;
import com.google.dart.compiler.ast.DartBlock;
import com.google.dart.compiler.ast.DartBooleanLiteral;
@@ -466,22 +465,6 @@ public class CodeFormatterVisitor extends ASTVisitor<DartNode> {
}
@Override
- public DartNode visitAssertion(DartAssertion node) {
- scribe.printNextToken(Token.IDENTIFIER);
- scribe.printNextToken(
- Token.LPAREN,
- preferences.insert_space_before_opening_bracket_in_array_reference);
- if (preferences.insert_space_after_opening_paren_in_annotation) {
- scribe.space();
- }
- node.getExpression().accept(this);
- scribe.printNextToken(Token.RPAREN, preferences.insert_space_before_closing_paren_in_annotation);
- scribe.printNextToken(Token.SEMICOLON, preferences.insert_space_before_semicolon);
- scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
- return null;
- }
-
- @Override
public DartNode visitBinaryExpression(DartBinaryExpression binaryExpression) {
final int numberOfParens = printOpenParens(binaryExpression);
BinaryExpressionFragmentBuilder builder = buildFragments(binaryExpression);

Powered by Google App Engine
This is Rietveld 408576698