| 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 /** | 5 /** |
| 6 * A script to assist in documenting the difference between the dart:html API | 6 * A script to assist in documenting the difference between the dart:html API |
| 7 * and the old DOM API. | 7 * and the old DOM API. |
| 8 */ | 8 */ |
| 9 library html_diff; | 9 library html_diff; |
| 10 | 10 |
| 11 import 'dart:coreimpl'; | |
| 12 import 'dart:io'; | 11 import 'dart:io'; |
| 13 | 12 |
| 14 // TODO(rnystrom): Use "package:" URL (#4968). | 13 // TODO(rnystrom): Use "package:" URL (#4968). |
| 15 import '../../sdk/lib/_internal/dartdoc/lib/dartdoc.dart'; | 14 import '../../sdk/lib/_internal/dartdoc/lib/dartdoc.dart'; |
| 16 import '../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart'; | 15 import '../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart'; |
| 17 import '../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.dar
t'; | 16 import '../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.dar
t'; |
| 18 | 17 |
| 19 // TODO(amouravski): There is currently magic that looks at dart:* libraries | 18 // TODO(amouravski): There is currently magic that looks at dart:* libraries |
| 20 // rather than the declared library names. This changed due to recent syntax | 19 // rather than the declared library names. This changed due to recent syntax |
| 21 // changes. We should only need to look at the library 'html'. | 20 // changes. We should only need to look at the library 'html'. |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 Map<String, String> _getTags(String comment) { | 234 Map<String, String> _getTags(String comment) { |
| 236 if (comment == null) return const <String, String>{}; | 235 if (comment == null) return const <String, String>{}; |
| 237 final re = new RegExp("@([a-zA-Z]+) ([^;]+)(?:;|\$)"); | 236 final re = new RegExp("@([a-zA-Z]+) ([^;]+)(?:;|\$)"); |
| 238 final tags = <String, String>{}; | 237 final tags = <String, String>{}; |
| 239 for (var m in re.allMatches(comment.trim())) { | 238 for (var m in re.allMatches(comment.trim())) { |
| 240 tags[m[1]] = m[2]; | 239 tags[m[1]] = m[2]; |
| 241 } | 240 } |
| 242 return tags; | 241 return tags; |
| 243 } | 242 } |
| 244 } | 243 } |
| OLD | NEW |