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

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

Issue 1879373004: Implement modular compilation (Closed) Base URL: git@github.com:dart-lang/dev_compiler.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 | « lib/src/analyzer/multi_package_resolver.dart ('k') | 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 import '../js/js_ast.dart' as JS show TypeRef, JsTypeRef, ClosureTypePrinter; 5 import '../js_ast/js_ast.dart' as JS show TypeRef, ClosureTypePrinter;
6 6
7 /// Set of closure annotations that can be [toString]ed to a single JsDoc commen t. 7 /// Set of closure annotations that can be [toString]ed to a single JsDoc commen t.
8 /// See https://developers.google.com/closure/compiler/docs/js-for-compiler 8 /// See https://developers.google.com/closure/compiler/docs/js-for-compiler
9 /// 9 ///
10 /// TODO(ochafik): Support inclusion of 'normal' comments (including @param comm ents). 10 /// TODO(ochafik): Support inclusion of 'normal' comments (including @param comm ents).
11 class ClosureAnnotation { 11 class ClosureAnnotation {
12 final String comment; 12 final String comment;
13 final bool isConst; 13 final bool isConst;
14 final bool isConstructor; 14 final bool isConstructor;
15 final bool isFinal; 15 final bool isFinal;
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 if (isNonWildcard(throwsType)) 125 if (isNonWildcard(throwsType))
126 lines.add('@throws {${_print(throwsType)}}'); 126 lines.add('@throws {${_print(throwsType)}}');
127 127
128 if (lines.length == 0) return ''; 128 if (lines.length == 0) return '';
129 if (lines.length == 1) return '/** ${lines.single} */'; 129 if (lines.length == 1) return '/** ${lines.single} */';
130 __cachedString = '/**\n' + lines.map((l) => ' * $l').join('\n') + '\n */'; 130 __cachedString = '/**\n' + lines.map((l) => ' * $l').join('\n') + '\n */';
131 } 131 }
132 return __cachedString; 132 return __cachedString;
133 } 133 }
134 } 134 }
OLDNEW
« no previous file with comments | « lib/src/analyzer/multi_package_resolver.dart ('k') | lib/src/closure/closure_annotator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698