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

Side by Side Diff: utils/template/tool.dart

Issue 12473003: Remove deprecated StringBuffer.add, addAll and addCharCode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 templatetool; 5 library templatetool;
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 import 'template.dart'; 8 import 'template.dart';
9 import '../lib/file_system.dart'; 9 import '../lib/file_system.dart';
10 import '../lib/file_system_vm.dart'; 10 import '../lib/file_system_vm.dart';
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 final parsedElapsed = time(() { 86 final parsedElapsed = time(() {
87 templates = templateParseAndValidate(source); 87 templates = templateParseAndValidate(source);
88 }); 88 });
89 89
90 StringBuffer code = new StringBuffer(); 90 StringBuffer code = new StringBuffer();
91 91
92 num codegenElapsed; 92 num codegenElapsed;
93 if (world.errors == 0) { 93 if (world.errors == 0) {
94 // Generate the Dart class(es) for all template(s). 94 // Generate the Dart class(es) for all template(s).
95 codegenElapsed = time(() { 95 codegenElapsed = time(() {
96 code.add(Codegen.generate(templates, outFilename)); 96 code.write(Codegen.generate(templates, outFilename));
97 }); 97 });
98 } 98 }
99 99
100 printStats("Parsed", parsedElapsed, sourceFullFn); 100 printStats("Parsed", parsedElapsed, sourceFullFn);
101 printStats("Codegen", codegenElapsed, sourceFullFn); 101 printStats("Codegen", codegenElapsed, sourceFullFn);
102 102
103 final outputElapsed = time(() { 103 final outputElapsed = time(() {
104 files.writeString(outputFullFn, code.toString()); 104 files.writeString(outputFullFn, code.toString());
105 }); 105 });
106 106
107 printStats("Wrote file", codegenElapsed, outputFullFn); 107 printStats("Wrote file", codegenElapsed, outputFullFn);
108 } 108 }
109 } 109 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698