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

Side by Side Diff: lib/compiler/implementation/dart2js.dart

Issue 11266050: Rename regexp methods to getters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase and update status files with co19 issue number. Created 8 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 | « no previous file | lib/compiler/implementation/lib/coreimpl_patch.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 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 #library('dart2js'); 5 #library('dart2js');
6 6
7 #import('dart:io'); 7 #import('dart:io');
8 #import('dart:uri'); 8 #import('dart:uri');
9 #import('dart:utf'); 9 #import('dart:utf');
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 void parseCommandLine(List<OptionHandler> handlers, List<String> argv) { 48 void parseCommandLine(List<OptionHandler> handlers, List<String> argv) {
49 // TODO(ahe): Use ../../args/args.dart for parsing options instead. 49 // TODO(ahe): Use ../../args/args.dart for parsing options instead.
50 var patterns = <String>[]; 50 var patterns = <String>[];
51 for (OptionHandler handler in handlers) { 51 for (OptionHandler handler in handlers) {
52 patterns.add(handler.pattern); 52 patterns.add(handler.pattern);
53 } 53 }
54 var pattern = new RegExp('^(${Strings.join(patterns, ")\$|(")})\$'); 54 var pattern = new RegExp('^(${Strings.join(patterns, ")\$|(")})\$');
55 OUTER: for (String argument in argv) { 55 OUTER: for (String argument in argv) {
56 Match match = pattern.firstMatch(argument); 56 Match match = pattern.firstMatch(argument);
57 assert(match.groupCount() == handlers.length); 57 assert(match.groupCount == handlers.length);
58 for (int i = 0; i < handlers.length; i++) { 58 for (int i = 0; i < handlers.length; i++) {
59 if (match[i + 1] != null) { 59 if (match[i + 1] != null) {
60 handlers[i].handle(argument); 60 handlers[i].handle(argument);
61 continue OUTER; 61 continue OUTER;
62 } 62 }
63 } 63 }
64 throw 'Internal error: "$argument" did not match'; 64 throw 'Internal error: "$argument" did not match';
65 } 65 }
66 } 66 }
67 67
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 } catch (ignored) { 426 } catch (ignored) {
427 print('Internal error: error while printing exception'); 427 print('Internal error: error while printing exception');
428 } 428 }
429 try { 429 try {
430 print(trace); 430 print(trace);
431 } finally { 431 } finally {
432 exit(253); // 253 is recognized as a crash by our test scripts. 432 exit(253); // 253 is recognized as a crash by our test scripts.
433 } 433 }
434 } 434 }
435 } 435 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/lib/coreimpl_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698