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

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

Issue 1411153007: Begin moving code generation tools from analysis_server to analyzer. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | « pkg/analyzer/lib/src/codegen/text_formatter.dart ('k') | no next file » | 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 code generation. 6 * Tools for generating code in analyzer and analysis server.
7 */ 7 */
8 library codegen.tools; 8 library analyzer.src.codegen.tools;
9 9
10 import 'dart:io'; 10 import 'dart:io';
11 11
12 import 'package:html/dom.dart' as dom; 12 import 'package:html/dom.dart' as dom;
13 import 'package:path/path.dart'; 13 import 'package:path/path.dart';
14 14
15 import 'html_tools.dart'; 15 import 'html.dart';
16 import 'text_formatter.dart'; 16 import 'text_formatter.dart';
17 17
18 final RegExp trailingWhitespaceRegExp = new RegExp(r'[\n ]+$'); 18 final RegExp trailingWhitespaceRegExp = new RegExp(r'[\n ]+$');
19 final RegExp trailingSpacesInLineRegExp = new RegExp(r' +$', multiLine: true); 19 final RegExp trailingSpacesInLineRegExp = new RegExp(r' +$', multiLine: true);
20 20
21 /** 21 /**
22 * Join the given strings using camelCase. If [doCapitalize] is true, the first 22 * Join the given strings using camelCase. If [doCapitalize] is true, the first
23 * part will be capitalized as well. 23 * part will be capitalized as well.
24 */ 24 */
25 String camelJoin(List<String> parts, {bool doCapitalize: false}) { 25 String camelJoin(List<String> parts, {bool doCapitalize: false}) {
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 if (lines.last.isEmpty) { 548 if (lines.last.isEmpty) {
549 lines.removeLast(); 549 lines.removeLast();
550 buffer.add(new dom.Text(lines.join('\n$indent') + '\n')); 550 buffer.add(new dom.Text(lines.join('\n$indent') + '\n'));
551 indentNeeded = true; 551 indentNeeded = true;
552 } else { 552 } else {
553 buffer.add(new dom.Text(lines.join('\n$indent'))); 553 buffer.add(new dom.Text(lines.join('\n$indent')));
554 indentNeeded = false; 554 indentNeeded = false;
555 } 555 }
556 } 556 }
557 } 557 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/codegen/text_formatter.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698