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

Side by Side Diff: pkg/analyzer/tool/summary/inspect.dart

Issue 1914073003: Add a "raw" mode to the summary inspector (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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/summary/inspect.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) 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 import 'dart:io'; 5 import 'dart:io';
6 6
7 import 'package:analyzer/src/summary/idl.dart'; 7 import 'package:analyzer/src/summary/idl.dart';
8 import 'package:analyzer/src/summary/inspect.dart'; 8 import 'package:analyzer/src/summary/inspect.dart';
9 import 'package:args/args.dart';
9 10
10 main(List<String> args) { 11 main(List<String> args) {
11 if (args.length != 1) { 12 ArgParser argParser = new ArgParser()..addFlag('raw');
12 print('Usage: inspect PATH'); 13 ArgResults argResults = argParser.parse(args);
14 if (argResults.rest.length != 1) {
15 print(argParser.usage);
13 exitCode = 1; 16 exitCode = 1;
14 return; 17 return;
15 } 18 }
16 String path = args[0]; 19 String path = argResults.rest[0];
17 List<int> bytes = new File(path).readAsBytesSync(); 20 List<int> bytes = new File(path).readAsBytesSync();
18 PackageBundle bundle = new PackageBundle.fromBuffer(bytes); 21 PackageBundle bundle = new PackageBundle.fromBuffer(bytes);
19 SummaryInspector inspector = new SummaryInspector(); 22 SummaryInspector inspector = new SummaryInspector(argResults['raw']);
20 print(inspector.dumpPackageBundle(bundle).join('\n')); 23 print(inspector.dumpPackageBundle(bundle).join('\n'));
21 } 24 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/inspect.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698