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

Unified Diff: packages/dart_style/lib/src/debug.dart

Issue 2990843002: Removed fixed dependencies (Closed)
Patch Set: Created 3 years, 5 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 | « packages/dart_style/lib/src/dart_formatter.dart ('k') | packages/dart_style/lib/src/formatter_options.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/dart_style/lib/src/debug.dart
diff --git a/packages/dart_style/lib/src/debug.dart b/packages/dart_style/lib/src/debug.dart
index 5d0eb2b7142c5c3ad7557138cca7551552eb3682..b3ca65fc13aa6c6132c4e91e1145c61dd5867f86 100644
--- a/packages/dart_style/lib/src/debug.dart
+++ b/packages/dart_style/lib/src/debug.dart
@@ -71,10 +71,10 @@ void dumpChunks(int start, List<Chunk> chunks) {
// Show the spans as vertical bands over their range (unless there are too
// many).
- var spans = new Set();
- addSpans(chunks) {
+ var spanSet = new Set<Span>();
+ addSpans(List<Chunk> chunks) {
for (var chunk in chunks) {
- spans.addAll(chunk.spans);
+ spanSet.addAll(chunk.spans);
if (chunk.isBlock) addSpans(chunk.block.chunks);
}
@@ -82,15 +82,14 @@ void dumpChunks(int start, List<Chunk> chunks) {
addSpans(chunks);
- spans = spans.toList();
-
+ var spans = spanSet.toList();
var rules =
chunks.map((chunk) => chunk.rule).where((rule) => rule != null).toSet();
- var rows = [];
+ var rows = <List<String>>[];
addChunk(List<Chunk> chunks, String prefix, int index) {
- var row = [];
+ var row = <String>[];
row.add("$prefix$index:");
var chunk = chunks[index];
« no previous file with comments | « packages/dart_style/lib/src/dart_formatter.dart ('k') | packages/dart_style/lib/src/formatter_options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698