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

Side by Side Diff: packages/dart_style/lib/src/whitespace.dart

Issue 1521693002: Roll Observatory deps (charted -> ^0.3.0) (Closed) Base URL: https://chromium.googlesource.com/external/github.com/dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years 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 | « packages/dart_style/lib/src/source_visitor.dart ('k') | packages/dart_style/pubspec.yaml » ('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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 dart_style.src.whitespace; 5 library dart_style.src.whitespace;
6 6
7 /// Constants for the number of spaces for various kinds of indentation. 7 /// Constants for the number of spaces for various kinds of indentation.
8 class Indent { 8 class Indent {
9 /// The number of spaces in a block or collection body. 9 /// The number of spaces in a block or collection body.
10 static const block = 2; 10 static const block = 2;
11 11
12 /// How much wrapped cascade sections indent. 12 /// How much wrapped cascade sections indent.
13 static const cascade = 2; 13 static const cascade = 2;
14 14
15 /// The number of spaces in a single level of expression nesting. 15 /// The number of spaces in a single level of expression nesting.
16 static const expression = 4; 16 static const expression = 4;
17 17
18 /// The ":" on a wrapped constructor initialization list. 18 /// The ":" on a wrapped constructor initialization list.
19 static const constructorInitializer = 4; 19 static const constructorInitializer = 4;
20
21 /// The indentation for subsequent variables when a for loop defines multiple
22 /// variables that wrap, like:
23 ///
24 /// for (var a = initializer,
25 /// b = another,
26 /// c = third;
27 /// a + b + c < 100;
28 /// a++) {
29 /// ...
30 /// }
31 static const loopVariable = 8;
32 } 20 }
33 21
34 /// The kind of pending whitespace that has been "written", but not actually 22 /// The kind of pending whitespace that has been "written", but not actually
35 /// physically output yet. 23 /// physically output yet.
36 /// 24 ///
37 /// We defer actually writing whitespace until a non-whitespace token is 25 /// We defer actually writing whitespace until a non-whitespace token is
38 /// encountered to avoid trailing whitespace. 26 /// encountered to avoid trailing whitespace.
39 class Whitespace { 27 class Whitespace {
40 /// No whitespace. 28 /// No whitespace.
41 static const none = const Whitespace._("none"); 29 static const none = const Whitespace._("none");
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 84
97 default: 85 default:
98 return 0; 86 return 0;
99 } 87 }
100 } 88 }
101 89
102 const Whitespace._(this.name); 90 const Whitespace._(this.name);
103 91
104 String toString() => name; 92 String toString() => name;
105 } 93 }
OLDNEW
« no previous file with comments | « packages/dart_style/lib/src/source_visitor.dart ('k') | packages/dart_style/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698