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

Side by Side Diff: pkg/analyzer/example/resolver_driver.dart

Issue 52573002: Remove uses of Options from pkg, samples, tests, and third_party directories. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Edit comment Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer/example/parser_driver.dart ('k') | pkg/analyzer/example/scanner_driver.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 #!/usr/bin/env dart 1 #!/usr/bin/env dart
2 2
3 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 3 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
4 // for details. All rights reserved. Use of this source code is governed by a 4 // for details. All rights reserved. Use of this source code is governed by a
5 // BSD-style license that can be found in the LICENSE file. 5 // BSD-style license that can be found in the LICENSE file.
6 6
7 import 'package:analyzer/src/generated/java_io.dart'; 7 import 'package:analyzer/src/generated/java_io.dart';
8 import 'package:analyzer/src/generated/source_io.dart'; 8 import 'package:analyzer/src/generated/source_io.dart';
9 import 'package:analyzer/src/generated/ast.dart'; 9 import 'package:analyzer/src/generated/ast.dart';
10 import 'package:analyzer/src/generated/sdk.dart' show DartSdk; 10 import 'package:analyzer/src/generated/sdk.dart' show DartSdk;
11 import 'package:analyzer/src/generated/sdk_io.dart' show DirectoryBasedDartSdk; 11 import 'package:analyzer/src/generated/sdk_io.dart' show DirectoryBasedDartSdk;
12 import 'package:analyzer/src/generated/element.dart'; 12 import 'package:analyzer/src/generated/element.dart';
13 import 'package:analyzer/src/generated/engine.dart'; 13 import 'package:analyzer/src/generated/engine.dart';
14 14
15 import 'dart:io'; 15 import 'dart:io';
16 16
17 main() { 17 main(List<String> args) {
18 print('working dir ${new File('.').resolveSymbolicLinksSync()}'); 18 print('working dir ${new File('.').resolveSymbolicLinksSync()}');
19 19
20 var args = new Options().arguments;
21 if (args.length != 2) { 20 if (args.length != 2) {
22 print('Usage: resolve_driver [path_to_sdk] [file_to_resolve]'); 21 print('Usage: resolve_driver [path_to_sdk] [file_to_resolve]');
23 exit(0); 22 exit(0);
24 } 23 }
25 24
26 JavaSystemIO.setProperty("com.google.dart.sdk", args[0]); 25 JavaSystemIO.setProperty("com.google.dart.sdk", args[0]);
27 DartSdk sdk = DirectoryBasedDartSdk.defaultSdk; 26 DartSdk sdk = DirectoryBasedDartSdk.defaultSdk;
28 27
29 AnalysisContext context = AnalysisEngine.instance.createAnalysisContext(); 28 AnalysisContext context = AnalysisEngine.instance.createAnalysisContext();
30 context.sourceFactory = new SourceFactory.con2([new DartUriResolver(sdk), new FileUriResolver()]); 29 context.sourceFactory = new SourceFactory.con2([new DartUriResolver(sdk), new FileUriResolver()]);
(...skipping 21 matching lines...) Expand all
52 if (library != null) { 51 if (library != null) {
53 text += " from ${element.library.definingCompilationUnit.source.fullNa me}"; 52 text += " from ${element.library.definingCompilationUnit.source.fullNa me}";
54 } 53 }
55 } 54 }
56 } 55 }
57 print(text); 56 print(text);
58 return super.visitNode(node); 57 return super.visitNode(node);
59 } 58 }
60 } 59 }
61 60
OLDNEW
« no previous file with comments | « pkg/analyzer/example/parser_driver.dart ('k') | pkg/analyzer/example/scanner_driver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698