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

Unified Diff: tool/patch_sdk.dart

Issue 1266483003: format with dart_style 0.2.0-rc.3 (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/testing.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tool/patch_sdk.dart
diff --git a/tool/patch_sdk.dart b/tool/patch_sdk.dart
index b4a09890ca171c94073c5efbf48eaca94e1ca96f..62c8f5a1603f9f997fead227079948cfa4c8b7f0 100755
--- a/tool/patch_sdk.dart
+++ b/tool/patch_sdk.dart
@@ -44,7 +44,8 @@ void main(List<String> argv) {
var libContents = new File(path.join(sdkLibIn, '_internal', 'libraries.dart'))
.readAsStringSync();
_writeSync(path.join(sdkOut, '_internal', 'libraries.dart'), libContents);
- _writeSync(path.join(
+ _writeSync(
+ path.join(
sdkOut, '_internal', 'sdk_library_metadata', 'lib', 'libraries.dart'),
libContents);
_writeSync(path.join(sdkOut, '..', 'version'),
@@ -167,14 +168,14 @@ class PatchApplier extends GeneralizingAstVisitor {
/// Merges directives and declarations that are not `@patch` into the library.
void _mergeUnpatched(CompilationUnit unit) {
-
// Merge imports from the patch
// TODO(jmesserly): remove duplicate imports
// To patch a library, we must have a library directive
var libDir = unit.directives.first as LibraryDirective;
- int importPos = unit.directives.lastWhere((d) => d is ImportDirective,
- orElse: () => libDir).end;
+ int importPos = unit.directives
+ .lastWhere((d) => d is ImportDirective, orElse: () => libDir)
+ .end;
for (var d in patch.unit.directives.where((d) => d is ImportDirective)) {
_merge(d, importPos);
}
« no previous file with comments | « test/testing.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698