| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 analyzer.src.task.dart; | 5 library analyzer.src.task.dart; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/token.dart'; | 10 import 'package:analyzer/dart/ast/token.dart'; |
| (...skipping 3151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3162 */ | 3162 */ |
| 3163 static IgnoreInfo calculateIgnores(String content, LineInfo info) { | 3163 static IgnoreInfo calculateIgnores(String content, LineInfo info) { |
| 3164 Iterable<Match> matches = _IGNORE_MATCHER.allMatches(content); | 3164 Iterable<Match> matches = _IGNORE_MATCHER.allMatches(content); |
| 3165 if (matches.isEmpty) { | 3165 if (matches.isEmpty) { |
| 3166 return _EMPTY_INFO; | 3166 return _EMPTY_INFO; |
| 3167 } | 3167 } |
| 3168 | 3168 |
| 3169 IgnoreInfo ignoreInfo = new IgnoreInfo(); | 3169 IgnoreInfo ignoreInfo = new IgnoreInfo(); |
| 3170 for (Match match in matches) { | 3170 for (Match match in matches) { |
| 3171 // See _IGNORE_MATCHER for format --- note the possibility of error lists. | 3171 // See _IGNORE_MATCHER for format --- note the possibility of error lists. |
| 3172 Iterable<String> codes = | 3172 Iterable<String> codes = match |
| 3173 match.group(1).split(',').map((String code) => code.trim()); | 3173 .group(1) |
| 3174 .split(',') |
| 3175 .map((String code) => code.trim().toLowerCase()); |
| 3174 ignoreInfo.addAll(info.getLocation(match.start).lineNumber, codes); | 3176 ignoreInfo.addAll(info.getLocation(match.start).lineNumber, codes); |
| 3175 } | 3177 } |
| 3176 return ignoreInfo; | 3178 return ignoreInfo; |
| 3177 } | 3179 } |
| 3178 } | 3180 } |
| 3179 | 3181 |
| 3180 /** | 3182 /** |
| 3181 * A task that ensures that all of the inferable instance members in a | 3183 * A task that ensures that all of the inferable instance members in a |
| 3182 * compilation unit have had their type inferred. | 3184 * compilation unit have had their type inferred. |
| 3183 */ | 3185 */ |
| (...skipping 2951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6135 | 6137 |
| 6136 @override | 6138 @override |
| 6137 bool moveNext() { | 6139 bool moveNext() { |
| 6138 if (_newSources.isEmpty) { | 6140 if (_newSources.isEmpty) { |
| 6139 return false; | 6141 return false; |
| 6140 } | 6142 } |
| 6141 currentTarget = _newSources.removeLast(); | 6143 currentTarget = _newSources.removeLast(); |
| 6142 return true; | 6144 return true; |
| 6143 } | 6145 } |
| 6144 } | 6146 } |
| OLD | NEW |