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

Side by Side Diff: dart/sdk/lib/_internal/compiler/implementation/source_file_provider.dart

Issue 17940002: Fix typo that caused orphaned info to be emitted. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 library source_file_provider; 5 library source_file_provider;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 import 'dart:utf'; 9 import 'dart:utf';
10 10
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 bool fatal = (kind.ordinal & FATAL) != 0; 87 bool fatal = (kind.ordinal & FATAL) != 0;
88 bool isInfo = (kind.ordinal & INFO) != 0; 88 bool isInfo = (kind.ordinal & INFO) != 0;
89 if (isInfo && uri == null && kind != api.Diagnostic.INFO) { 89 if (isInfo && uri == null && kind != api.Diagnostic.INFO) {
90 info(message, kind); 90 info(message, kind);
91 return; 91 return;
92 } 92 }
93 // [previousKind]/[lastKind] records the previous non-INFO kind we saw. 93 // [previousKind]/[lastKind] records the previous non-INFO kind we saw.
94 // This is used to suppress info about a warning when warnings are 94 // This is used to suppress info about a warning when warnings are
95 // suppressed, and similar for hints. 95 // suppressed, and similar for hints.
96 var previousKind = lastKind; 96 var previousKind = lastKind;
97 if (previousKind != api.Diagnostic.INFO) { 97 if (kind != api.Diagnostic.INFO) {
98 lastKind = kind; 98 lastKind = kind;
99 } 99 }
100 var color; 100 var color;
101 if (kind == api.Diagnostic.ERROR) { 101 if (kind == api.Diagnostic.ERROR) {
102 color = colors.red; 102 color = colors.red;
103 } else if (kind == api.Diagnostic.WARNING) { 103 } else if (kind == api.Diagnostic.WARNING) {
104 if (!showWarnings) return; 104 if (!showWarnings) return;
105 color = colors.magenta; 105 color = colors.magenta;
106 } else if (kind == api.Diagnostic.HINT) { 106 } else if (kind == api.Diagnostic.HINT) {
107 if (!showHints) return; 107 if (!showHints) return;
(...skipping 23 matching lines...) Expand all
131 if (fatal && throwOnError) { 131 if (fatal && throwOnError) {
132 isAborting = true; 132 isAborting = true;
133 throw new AbortLeg(message); 133 throw new AbortLeg(message);
134 } 134 }
135 } 135 }
136 136
137 void call(Uri uri, int begin, int end, String message, api.Diagnostic kind) { 137 void call(Uri uri, int begin, int end, String message, api.Diagnostic kind) {
138 return diagnosticHandler(uri, begin, end, message, kind); 138 return diagnosticHandler(uri, begin, end, message, kind);
139 } 139 }
140 } 140 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698