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

Side by Side Diff: pkg/analyzer/example/scanner_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
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 'dart:io'; 7 import 'dart:io';
8 8
9 import 'package:analyzer/src/generated/scanner.dart'; 9 import 'package:analyzer/src/generated/scanner.dart';
10 import 'package:analyzer/src/generated/java_core.dart' show CharSequence; 10 import 'package:analyzer/src/generated/java_core.dart' show CharSequence;
11 11
12 main() { 12 main(List<String> args) {
13 13
14 print('working dir ${new File('.').resolveSymbolicLinksSync()}'); 14 print('working dir ${new File('.').resolveSymbolicLinksSync()}');
15 15
16 var args = new Options().arguments;
17 if (args.length == 0) { 16 if (args.length == 0) {
18 print('Usage: scanner_driver [files_to_scan]'); 17 print('Usage: scanner_driver [files_to_scan]');
19 exit(0); 18 exit(0);
20 } 19 }
21 20
22 for (var arg in args) { 21 for (var arg in args) {
23 _scan(new File(arg)); 22 _scan(new File(arg));
24 } 23 }
25 24
26 } 25 }
27 26
28 _scan(File file) { 27 _scan(File file) {
29 var src = file.readAsStringSync(); 28 var src = file.readAsStringSync();
30 var reader = new CharSequenceReader(new CharSequence(src)); 29 var reader = new CharSequenceReader(new CharSequence(src));
31 var scanner = new Scanner(null, reader, null); 30 var scanner = new Scanner(null, reader, null);
32 var token = scanner.tokenize(); 31 var token = scanner.tokenize();
33 while (token.type != TokenType.EOF) { 32 while (token.type != TokenType.EOF) {
34 print(token); 33 print(token);
35 token = token.next; 34 token = token.next;
36 } 35 }
37 } 36 }
OLDNEW
« no previous file with comments | « pkg/analyzer/example/resolver_driver.dart ('k') | pkg/analyzer/lib/src/services/runtime/coverage/coverage_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698