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

Unified Diff: pkg/front_end/lib/src/fasta/bin/log_analyzer.dart

Issue 2722223006: Move all main methods to tool/. (Closed)
Patch Set: Update tools/patch_sdk.dart. Created 3 years, 10 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
Index: pkg/front_end/lib/src/fasta/bin/log_analyzer.dart
diff --git a/pkg/front_end/lib/src/fasta/bin/log_analyzer.dart b/pkg/front_end/lib/src/fasta/bin/log_analyzer.dart
deleted file mode 100644
index 029b6d27535b5fa66a7004c1cdcfd4a0911b9523..0000000000000000000000000000000000000000
--- a/pkg/front_end/lib/src/fasta/bin/log_analyzer.dart
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:convert' show JSON;
-
-import 'dart:io';
-
-import 'package:testing/src/run_tests.dart' show CommandLine;
-
-main(List<String> arguments) async {
- CommandLine cl = CommandLine.parse(arguments);
- Set<String> fields = cl.commaSeparated("--fields=");
- if (fields.isEmpty) {
- fields.addAll(["uri", "offset", "json:error"]);
- }
- for (String filename in cl.arguments) {
- String json = await new File(filename).readAsString();
- Map<String, dynamic> data = JSON.decode(json) as Map<String, dynamic>;
- StringBuffer sb = new StringBuffer();
- bool isFirst = true;
- for (String field in fields) {
- if (!isFirst) {
- sb.write(":");
- }
- if (field.startsWith("json:")) {
- field = field.substring(5);
- sb.write(JSON.encode(data[field]));
- } else {
- sb.write(data[field]);
- }
- isFirst = false;
- }
- print("$sb");
- }
-}
« no previous file with comments | « pkg/front_end/lib/src/fasta/bin/generate_dart_libraries.dart ('k') | pkg/front_end/lib/src/fasta/bin/log_collector.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698