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

Side by Side Diff: lib/src/summary.dart

Issue 1235503010: fixes #219, able to compile multiple entry points (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// Summary of error messages produced by a `SummaryReporter`. 5 /// Summary of error messages produced by a `SummaryReporter`.
6 library dev_compiler.src.summary; 6 library dev_compiler.src.summary;
7 7
8 import 'dart:collection' show HashSet; 8 import 'dart:collection' show HashSet;
9 import 'package:analyzer/src/generated/engine.dart' show AnalysisContext; 9 import 'package:analyzer/src/generated/engine.dart' show AnalysisContext;
10 import 'package:analyzer/src/generated/source.dart' show Source; 10 import 'package:analyzer/src/generated/source.dart' show Source;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 /// All messages collected for the library. 97 /// All messages collected for the library.
98 final List<MessageSummary> messages; 98 final List<MessageSummary> messages;
99 99
100 /// All parts of this library. Only used for computing _lines. 100 /// All parts of this library. Only used for computing _lines.
101 final _uris = new HashSet<Uri>(); 101 final _uris = new HashSet<Uri>();
102 102
103 int _lines; 103 int _lines;
104 104
105 LibrarySummary(this.name, {List<MessageSummary> messages, lines}) 105 LibrarySummary(this.name, {List<MessageSummary> messages, lines})
106 : messages = messages == null ? <MessageSummary>[] : messages, 106 : messages = messages == null ? <MessageSummary>[] : messages,
107 _lines = lines == null ? lines : 0; 107 _lines = lines != null ? lines : 0;
vsm 2015/07/16 23:56:39 oops!
108 108
109 void clear() { 109 void clear() {
110 _uris.clear(); 110 _uris.clear();
111 _lines = 0; 111 _lines = 0;
112 messages.clear(); 112 messages.clear();
113 } 113 }
114 114
115 /// Total lines of code (including all parts of the library). 115 /// Total lines of code (including all parts of the library).
116 int get lines => _lines; 116 int get lines => _lines;
117 117
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 } 241 }
242 } 242 }
243 243
244 void visitHtml(HtmlSummary html) { 244 void visitHtml(HtmlSummary html) {
245 for (var msg in html.messages) { 245 for (var msg in html.messages) {
246 msg.accept(this); 246 msg.accept(this);
247 } 247 }
248 } 248 }
249 void visitMessage(MessageSummary message) {} 249 void visitMessage(MessageSummary message) {}
250 } 250 }
OLDNEW
« lib/src/compiler.dart ('K') | « lib/src/server/server.dart ('k') | lib/src/testing.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698