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

Side by Side Diff: pkg/kernel/lib/kernel.dart

Issue 2614663007: Revert "Non-format-changing kernel offset changes" (Closed)
Patch Set: Created 3 years, 11 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/kernel/lib/frontend/accessors.dart ('k') | pkg/kernel/lib/text/ast_to_text.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 /// Conventions for paths: 5 /// Conventions for paths:
6 /// 6 ///
7 /// - Use the [Uri] class for paths that may have the `file`, `dart` or 7 /// - Use the [Uri] class for paths that may have the `file`, `dart` or
8 /// `package` scheme. Never use [Uri] for relative paths. 8 /// `package` scheme. Never use [Uri] for relative paths.
9 /// - Use [String]s for all filenames and paths that have no scheme prefix. 9 /// - Use [String]s for all filenames and paths that have no scheme prefix.
10 /// - Never translate a `dart:` or `package:` URI into a `file:` URI, instead 10 /// - Never translate a `dart:` or `package:` URI into a `file:` URI, instead
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 StringBuffer buffer = new StringBuffer(); 44 StringBuffer buffer = new StringBuffer();
45 new Printer(buffer).writeLibraryFile(library); 45 new Printer(buffer).writeLibraryFile(library);
46 if (path == null) { 46 if (path == null) {
47 print(buffer); 47 print(buffer);
48 } else { 48 } else {
49 new File(path).writeAsStringSync('$buffer'); 49 new File(path).writeAsStringSync('$buffer');
50 } 50 }
51 } 51 }
52 52
53 void writeProgramToText(Program program, 53 void writeProgramToText(Program program,
54 {String path, bool showExternal: false, bool showOffsets: false}) { 54 {String path, bool showExternal: false}) {
55 StringBuffer buffer = new StringBuffer(); 55 StringBuffer buffer = new StringBuffer();
56 new Printer(buffer, showExternal: showExternal, showOffsets: showOffsets) 56 new Printer(buffer, showExternal: showExternal).writeProgramFile(program);
57 .writeProgramFile(program);
58 if (path == null) { 57 if (path == null) {
59 print(buffer); 58 print(buffer);
60 } else { 59 } else {
61 new File(path).writeAsStringSync('$buffer'); 60 new File(path).writeAsStringSync('$buffer');
62 } 61 }
63 } 62 }
OLDNEW
« no previous file with comments | « pkg/kernel/lib/frontend/accessors.dart ('k') | pkg/kernel/lib/text/ast_to_text.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698