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

Side by Side Diff: pkg/analyzer/lib/src/codegen/tools.dart

Issue 1513643009: Clean up package imports and library names (Closed) Base URL: https://github.com/dart-lang/sdk.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 | « pkg/analyzer/lib/src/codegen/text_formatter.dart ('k') | pkg/analyzer/lib/src/error.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) 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 'dart:io'; 10 import 'dart:io';
11 11
12 import 'package:analyzer/src/codegen/html.dart';
13 import 'package:analyzer/src/codegen/text_formatter.dart';
12 import 'package:html/dom.dart' as dom; 14 import 'package:html/dom.dart' as dom;
13 import 'package:path/path.dart'; 15 import 'package:path/path.dart';
14 16
15 import 'html.dart';
16 import 'text_formatter.dart';
17
18 final RegExp trailingSpacesInLineRegExp = new RegExp(r' +$', multiLine: true); 17 final RegExp trailingSpacesInLineRegExp = new RegExp(r' +$', multiLine: true);
19 final RegExp trailingWhitespaceRegExp = new RegExp(r'[\n ]+$'); 18 final RegExp trailingWhitespaceRegExp = new RegExp(r'[\n ]+$');
20 19
21 /** 20 /**
22 * Join the given strings using camelCase. If [doCapitalize] is true, the first 21 * Join the given strings using camelCase. If [doCapitalize] is true, the first
23 * part will be capitalized as well. 22 * part will be capitalized as well.
24 */ 23 */
25 String camelJoin(List<String> parts, {bool doCapitalize: false}) { 24 String camelJoin(List<String> parts, {bool doCapitalize: false}) {
26 List<String> upcasedParts = <String>[]; 25 List<String> upcasedParts = <String>[];
27 for (int i = 0; i < parts.length; i++) { 26 for (int i = 0; i < parts.length; i++) {
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 if (lines.last.isEmpty) { 597 if (lines.last.isEmpty) {
599 lines.removeLast(); 598 lines.removeLast();
600 buffer.add(new dom.Text(lines.join('\n$indent') + '\n')); 599 buffer.add(new dom.Text(lines.join('\n$indent') + '\n'));
601 indentNeeded = true; 600 indentNeeded = true;
602 } else { 601 } else {
603 buffer.add(new dom.Text(lines.join('\n$indent'))); 602 buffer.add(new dom.Text(lines.join('\n$indent')));
604 indentNeeded = false; 603 indentNeeded = false;
605 } 604 }
606 } 605 }
607 } 606 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/codegen/text_formatter.dart ('k') | pkg/analyzer/lib/src/error.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698