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

Side by Side Diff: pkg/compiler/lib/src/diagnostics/spannable.dart

Issue 1859343004: dartfmt pkg/compiler (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « pkg/compiler/lib/src/diagnostics/source_span.dart ('k') | pkg/compiler/lib/src/dump_info.dart » ('j') | 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 dart2js.diagnostics.spannable; 5 library dart2js.diagnostics.spannable;
6 6
7 /** 7 /**
8 * Tagging interface for classes from which source spans can be generated. 8 * Tagging interface for classes from which source spans can be generated.
9 */ 9 */
10 // TODO(johnniwinther): Find a better name. 10 // TODO(johnniwinther): Find a better name.
(...skipping 10 matching lines...) Expand all
21 21
22 /// Sentinel spannable used to mark that diagnostics should point to the 22 /// Sentinel spannable used to mark that diagnostics should point to the
23 /// current element. Note that the diagnostic reporting will fail if the current 23 /// current element. Note that the diagnostic reporting will fail if the current
24 /// element is `null`. 24 /// element is `null`.
25 const Spannable CURRENT_ELEMENT_SPANNABLE = 25 const Spannable CURRENT_ELEMENT_SPANNABLE =
26 const _SpannableSentinel("Current element"); 26 const _SpannableSentinel("Current element");
27 27
28 /// Sentinel spannable used to mark that there might be no location for the 28 /// Sentinel spannable used to mark that there might be no location for the
29 /// diagnostic. Use this only when it is not an error not to have a current 29 /// diagnostic. Use this only when it is not an error not to have a current
30 /// element. 30 /// element.
31 const Spannable NO_LOCATION_SPANNABLE = 31 const Spannable NO_LOCATION_SPANNABLE = const _SpannableSentinel("No location");
32 const _SpannableSentinel("No location");
33 32
34 class SpannableAssertionFailure { 33 class SpannableAssertionFailure {
35 final Spannable node; 34 final Spannable node;
36 final String message; 35 final String message;
37 SpannableAssertionFailure(this.node, this.message); 36 SpannableAssertionFailure(this.node, this.message);
38 37
39 String toString() => 'Assertion failure' 38 String toString() => 'Assertion failure'
40 '${message != null ? ': $message' : ''}'; 39 '${message != null ? ': $message' : ''}';
41 } 40 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/diagnostics/source_span.dart ('k') | pkg/compiler/lib/src/dump_info.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698