Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 /** | 5 /** |
| 6 * Tools for generating code in analyzer and analysis server. | 6 * Tools for generating code in analyzer and analysis server. |
| 7 */ | 7 */ |
| 8 library analyzer.src.codegen.tools; | 8 library analyzer.src.codegen.tools; |
| 9 | 9 |
| 10 import 'package:analyzer/src/codegen/html.dart'; | 10 import 'package:analyzer/src/codegen/html.dart'; |
| 11 import 'package:analyzer/src/codegen/text_formatter.dart'; | 11 import 'package:analyzer/src/codegen/text_formatter.dart'; |
| 12 import 'package:html/dom.dart' as dom; | 12 import 'package:html/dom.dart' as dom; |
| 13 export 'package:front_end/src/codegen/tools.dart'; | |
|
Siggi Cherem (dart-lang)
2017/08/07 16:57:10
it seems like this file is not used anymore in pac
Paul Berry
2017/08/07 17:04:33
Maybe. I'd like to wait until we see how kernel's
| |
| 13 | 14 |
| 14 final RegExp trailingSpacesInLineRegExp = new RegExp(r' +$', multiLine: true); | 15 final RegExp trailingSpacesInLineRegExp = new RegExp(r' +$', multiLine: true); |
| 15 final RegExp trailingWhitespaceRegExp = new RegExp(r'[\n ]+$'); | 16 final RegExp trailingWhitespaceRegExp = new RegExp(r'[\n ]+$'); |
| 16 | 17 |
| 17 /** | 18 /** |
| 18 * Join the given strings using camelCase. If [doCapitalize] is true, the first | 19 * Join the given strings using camelCase. If [doCapitalize] is true, the first |
| 19 * part will be capitalized as well. | 20 * part will be capitalized as well. |
| 20 */ | 21 */ |
| 21 String camelJoin(List<String> parts, {bool doCapitalize: false}) { | 22 String camelJoin(List<String> parts, {bool doCapitalize: false}) { |
| 22 List<String> upcasedParts = <String>[]; | 23 List<String> upcasedParts = <String>[]; |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 383 if (lines.last.isEmpty) { | 384 if (lines.last.isEmpty) { |
| 384 lines.removeLast(); | 385 lines.removeLast(); |
| 385 buffer.add(new dom.Text(lines.join('\n$indent') + '\n')); | 386 buffer.add(new dom.Text(lines.join('\n$indent') + '\n')); |
| 386 indentNeeded = true; | 387 indentNeeded = true; |
| 387 } else { | 388 } else { |
| 388 buffer.add(new dom.Text(lines.join('\n$indent'))); | 389 buffer.add(new dom.Text(lines.join('\n$indent'))); |
| 389 indentNeeded = false; | 390 indentNeeded = false; |
| 390 } | 391 } |
| 391 } | 392 } |
| 392 } | 393 } |
| OLD | NEW |