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

Unified Diff: pkg/analyzer_experimental/lib/src/services/formatter_impl.dart

Issue 23080005: New analysis_experimental snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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: pkg/analyzer_experimental/lib/src/services/formatter_impl.dart
diff --git a/pkg/analyzer_experimental/lib/src/services/formatter_impl.dart b/pkg/analyzer_experimental/lib/src/services/formatter_impl.dart
index 22e0d2ac3e3759ca074a33426a4f0fbbaa17e068..a8e31c34c0d6ba58acd8999d584e778974e0e058 100644
--- a/pkg/analyzer_experimental/lib/src/services/formatter_impl.dart
+++ b/pkg/analyzer_experimental/lib/src/services/formatter_impl.dart
@@ -213,7 +213,7 @@ class SourceVisitor implements ASTVisitor {
unindent();
newline();
print('}');
-//TODO(pquitslund): make this work
+//TODO(pquitslund): make this work
// emitToken(node.rightBracket);
previousToken = node.rightBracket;
}
@@ -403,7 +403,7 @@ class SourceVisitor implements ASTVisitor {
}
visitFieldDeclaration(FieldDeclaration node) {
- emitToken(node.keyword, suffix: ' ');
+ emitToken(node.staticKeyword, suffix: ' ');
visit(node.fields);
emitToken(node.semicolon);
}
@@ -600,8 +600,8 @@ class SourceVisitor implements ASTVisitor {
}
visitListLiteral(ListLiteral node) {
- if (node.modifier != null) {
- print(node.modifier.lexeme);
+ if (node.constKeyword != null) {
+ print(node.constKeyword.lexeme);
print(' ');
}
visit(node.typeArguments);
@@ -611,8 +611,8 @@ class SourceVisitor implements ASTVisitor {
}
visitMapLiteral(MapLiteral node) {
- if (node.modifier != null) {
- print(node.modifier.lexeme);
+ if (node.constKeyword != null) {
+ print(node.constKeyword.lexeme);
print(' ');
}
visitSuffixed(node.typeArguments, ' ');
@@ -823,7 +823,7 @@ class SourceVisitor implements ASTVisitor {
emitToken(node.tryKeyword, suffix: ' ');
visit(node.body);
visitPrefixedList(' ', node.catchClauses, ' ');
- visitPrefixed(' finally ', node.finallyClause);
+ visitPrefixed(' finally ', node.finallyBlock);
}
visitTypeArgumentList(TypeArgumentList node) {
@@ -957,10 +957,10 @@ class SourceVisitor implements ASTVisitor {
}
- /// Emit the given [token], if it's non-null, preceded by any detected
- /// newlines or a minimum as specified by [minNewlines], printing a [prefix]
+ /// Emit the given [token], if it's non-null, preceded by any detected
+ /// newlines or a minimum as specified by [minNewlines], printing a [prefix]
/// before and a [suffix] after.
- emitToken(Token token, {String prefix, String suffix,
+ emitToken(Token token, {String prefix, String suffix,
int minNewlines: 0}) {
if (token != null) {
print(prefix);
@@ -969,34 +969,34 @@ class SourceVisitor implements ASTVisitor {
print(suffix);
}
}
-
+
/// Print the given [string] to the source writer if it's non-null.
print(String string) {
if (string != null) {
writer.print(string);
}
}
-
+
/// Emit a newline.
newline() {
writer.newline();
}
-
+
/// Emit [n] newlines.
newlines(n) {
writer.newlines(n);
}
-
+
/// Indent.
indent() {
writer.indent();
}
-
+
/// Unindent
unindent() {
writer.unindent();
}
-
+
/// Emit any detected newlines or a minimum as specified by [minNewlines].
emitPrecedingNewlines(Token token, {min: 0}) {
var comment = token.precedingComments;
@@ -1037,5 +1037,5 @@ class SourceVisitor implements ASTVisitor {
}
String toString() => writer.toString();
-
+
}
« no previous file with comments | « pkg/analyzer_experimental/lib/src/generated/source.dart ('k') | pkg/analyzer_experimental/test/generated/element_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698