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(); |
- |
+ |
} |