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

Side by Side Diff: lib/src/closure/closure_annotation.dart

Issue 1322673004: Reformat (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | lib/src/closure/closure_annotator.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) 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 library dev_compiler.src.closure.closure_annotation; 5 library dev_compiler.src.closure.closure_annotation;
6 6
7 import 'closure_type.dart'; 7 import 'closure_type.dart';
8 8
9 /// Set of closure annotations that can be [toString]ed to a single JsDoc commen t. 9 /// Set of closure annotations that can be [toString]ed to a single JsDoc commen t.
10 /// See https://developers.google.com/closure/compiler/docs/js-for-compiler 10 /// See https://developers.google.com/closure/compiler/docs/js-for-compiler
(...skipping 13 matching lines...) Expand all
24 final ClosureType lendsToType; 24 final ClosureType lendsToType;
25 final ClosureType returnType; 25 final ClosureType returnType;
26 final ClosureType superType; 26 final ClosureType superType;
27 final ClosureType thisType; 27 final ClosureType thisType;
28 final ClosureType throwsType; 28 final ClosureType throwsType;
29 final ClosureType type; 29 final ClosureType type;
30 final List<ClosureType> interfaces; 30 final List<ClosureType> interfaces;
31 final List<String> templates; 31 final List<String> templates;
32 final Map<String, ClosureType> paramTypes; 32 final Map<String, ClosureType> paramTypes;
33 33
34 ClosureAnnotation({this.interfaces: const [], this.isConst: false, 34 ClosureAnnotation(
35 this.isConstructor: false, this.isFinal: false, this.isNoCollapse: false, 35 {this.interfaces: const [],
36 this.isNoSideEffects: false, this.isOverride: false, 36 this.isConst: false,
37 this.isPrivate: false, this.isProtected: false, this.isStruct: false, 37 this.isConstructor: false,
38 this.isTypedef: false, this.lendsToType, this.paramTypes: const {}, 38 this.isFinal: false,
39 this.returnType, this.superType, this.templates: const [], this.thisType, 39 this.isNoCollapse: false,
40 this.throwsType, this.type}); 40 this.isNoSideEffects: false,
41 this.isOverride: false,
42 this.isPrivate: false,
43 this.isProtected: false,
44 this.isStruct: false,
45 this.isTypedef: false,
46 this.lendsToType,
47 this.paramTypes: const {},
48 this.returnType,
49 this.superType,
50 this.templates: const [],
51 this.thisType,
52 this.throwsType,
53 this.type});
41 54
42 @override 55 @override
43 int get hashCode => _cachedString.hashCode; 56 int get hashCode => _cachedString.hashCode;
44 57
45 @override 58 @override
46 bool operator ==(other) => 59 bool operator ==(other) =>
47 other is ClosureAnnotation && _cachedString == other._cachedString; 60 other is ClosureAnnotation && _cachedString == other._cachedString;
48 61
49 @override 62 @override
50 String toString([String indent = '']) => 63 String toString([String indent = '']) =>
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 if (isNonWildcard(returnType)) lines.add('@return {$returnType}'); 115 if (isNonWildcard(returnType)) lines.add('@return {$returnType}');
103 if (isNonWildcard(throwsType)) lines.add('@throws {$throwsType}'); 116 if (isNonWildcard(throwsType)) lines.add('@throws {$throwsType}');
104 117
105 if (lines.length == 0) return ''; 118 if (lines.length == 0) return '';
106 if (lines.length == 1) return '/** ${lines.single} */'; 119 if (lines.length == 1) return '/** ${lines.single} */';
107 __cachedString = '/**\n' + lines.map((l) => ' * $l').join('\n') + '\n */'; 120 __cachedString = '/**\n' + lines.map((l) => ' * $l').join('\n') + '\n */';
108 } 121 }
109 return __cachedString; 122 return __cachedString;
110 } 123 }
111 } 124 }
OLDNEW
« no previous file with comments | « no previous file | lib/src/closure/closure_annotator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698