| OLD | NEW |
| 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 // Mocks of classes and interfaces that Leg cannot read directly. | 5 // Mocks of classes and interfaces that Leg cannot read directly. |
| 6 | 6 |
| 7 // TODO(ahe): Remove this file. | 7 // TODO(ahe): Remove this file. |
| 8 | 8 |
| 9 class JSSyntaxRegExp implements RegExp { | 9 class JSSyntaxRegExp implements RegExp { |
| 10 final String pattern; | 10 final String pattern; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 List<String> this._groups); | 71 List<String> this._groups); |
| 72 | 72 |
| 73 final String pattern; | 73 final String pattern; |
| 74 final String str; | 74 final String str; |
| 75 final int _start; | 75 final int _start; |
| 76 final int _end; | 76 final int _end; |
| 77 final List<String> _groups; | 77 final List<String> _groups; |
| 78 | 78 |
| 79 int start() => _start; | 79 int start() => _start; |
| 80 int end() => _end; | 80 int end() => _end; |
| 81 String group(int index) => stringify(_groups[index]); | 81 String group(int index) => _groups[index]; |
| 82 String operator [](int index) => group(index); | 82 String operator [](int index) => group(index); |
| 83 int groupCount() => _groups.length - 1; | 83 int groupCount() => _groups.length - 1; |
| 84 | 84 |
| 85 List<String> groups(List<int> groups) { | 85 List<String> groups(List<int> groups) { |
| 86 List<String> out = []; | 86 List<String> out = []; |
| 87 for (int i in groups) { | 87 for (int i in groups) { |
| 88 out.add(group(i)); | 88 out.add(group(i)); |
| 89 } | 89 } |
| 90 return out; | 90 return out; |
| 91 } | 91 } |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 } | 449 } |
| 450 String twoDigitMinutes = | 450 String twoDigitMinutes = |
| 451 twoDigits(inMinutes.remainder(Duration.MINUTES_PER_HOUR)); | 451 twoDigits(inMinutes.remainder(Duration.MINUTES_PER_HOUR)); |
| 452 String twoDigitSeconds = | 452 String twoDigitSeconds = |
| 453 twoDigits(inSeconds.remainder(Duration.SECONDS_PER_MINUTE)); | 453 twoDigits(inSeconds.remainder(Duration.SECONDS_PER_MINUTE)); |
| 454 String threeDigitMs = | 454 String threeDigitMs = |
| 455 threeDigits(inMilliseconds.remainder(Duration.MILLISECONDS_PER_SECOND)); | 455 threeDigits(inMilliseconds.remainder(Duration.MILLISECONDS_PER_SECOND)); |
| 456 return "${inHours}:${twoDigitMinutes}:${twoDigitSeconds}.${threeDigitMs}"; | 456 return "${inHours}:${twoDigitMinutes}:${twoDigitSeconds}.${threeDigitMs}"; |
| 457 } | 457 } |
| 458 } | 458 } |
| OLD | NEW |