f1aa891d6a
Change-Id: I6f8ce377923756a0ac31a377c75632216bcec0c5 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/365867 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Samuel Rawlins <srawlins@google.com> Reviewed-by: Phil Quitslund <pquitslund@google.com>
49 lines
1.1 KiB
Dart
49 lines
1.1 KiB
Dart
// Copyright (c) 2017, 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:io';
|
|
|
|
import 'package:analyzer/src/summary/idl.dart';
|
|
import 'package:args/args.dart';
|
|
|
|
void main(List<String> args) {
|
|
ArgParser argParser = ArgParser()..addFlag('raw');
|
|
ArgResults argResults = argParser.parse(args);
|
|
if (argResults.rest.length != 1) {
|
|
print(argParser.usage);
|
|
exitCode = 1;
|
|
return;
|
|
}
|
|
|
|
String path = argResults.rest[0];
|
|
List<int> bytes = File(path).readAsBytesSync();
|
|
AnalysisDriverExceptionContext context =
|
|
AnalysisDriverExceptionContext.fromBuffer(bytes);
|
|
|
|
print(context.path);
|
|
print('');
|
|
print('');
|
|
print('');
|
|
|
|
print(context.exception);
|
|
print('');
|
|
print('');
|
|
print('');
|
|
|
|
print(context.stackTrace);
|
|
print('');
|
|
print('');
|
|
print('');
|
|
|
|
for (var file in context.files) {
|
|
print("=" * 40);
|
|
print(file.path);
|
|
print("-" * 40);
|
|
print(file.content);
|
|
print('');
|
|
print('');
|
|
print('');
|
|
}
|
|
}
|