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

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

Issue 125103003: Formatter workaround for missing abstract keyword in ClassTypeAliases (dartbug.com/15912). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 11 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
« no previous file with comments | « no previous file | pkg/analyzer/test/services/data/cu_tests.data » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/services/formatter_impl.dart
===================================================================
--- pkg/analyzer/lib/src/services/formatter_impl.dart (revision 31483)
+++ pkg/analyzer/lib/src/services/formatter_impl.dart (working copy)
@@ -516,6 +516,15 @@
}
visitClassTypeAlias(ClassTypeAlias node) {
+ preserveLeadingNewlines();
+ //TODO(pquitslund): the following _should_ work (dartbug.com/15912)
+ //modifier(node.abstractKeyword);
+ // ... in the meantime we use this workaround
+ var prev = node.keyword.previous;
+ if (prev.keyword == Keyword.ABSTRACT) {
+ token(prev);
+ space();
+ }
token(node.keyword);
space();
visit(node.name);
@@ -523,10 +532,6 @@
space();
token(node.equals);
space();
- if (node.abstractKeyword != null) {
- token(node.abstractKeyword);
- space();
- }
visit(node.superclass);
visitNode(node.withClause, precededBy: space);
visitNode(node.implementsClause, precededBy: space);
« no previous file with comments | « no previous file | pkg/analyzer/test/services/data/cu_tests.data » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698