| OLD | NEW |
| 1 // Copyright (c) 2011, 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'); | 11 #import('dart:coreimpl'); |
| 12 #import('../../frog/lang.dart'); | 12 #import('../../frog/lang.dart'); |
| 13 #import('../../frog/file_system_vm.dart'); | 13 #import('../../frog/file_system_vm.dart'); |
| 14 #import('../../frog/file_system.dart'); | 14 #import('../../frog/file_system.dart'); |
| 15 #import('../dartdoc/dartdoc.dart'); | 15 #import('../../lib/dartdoc/dartdoc.dart'); |
| 16 | 16 |
| 17 /** | 17 /** |
| 18 * A class for computing a many-to-many mapping between the types and members in | 18 * A class for computing a many-to-many mapping between the types and members in |
| 19 * `dart:dom` and `dart:html`. This mapping is based on two indicators: | 19 * `dart:dom` and `dart:html`. This mapping is based on two indicators: |
| 20 * | 20 * |
| 21 * 1. Auto-detected wrappers. Most `dart:html` types correspond | 21 * 1. Auto-detected wrappers. Most `dart:html` types correspond |
| 22 * straightforwardly to a single `dart:dom` type, and have the same name. | 22 * straightforwardly to a single `dart:dom` type, and have the same name. |
| 23 * In addition, most `dart:htmlimpl` methods just call a single `dart:dom` | 23 * In addition, most `dart:htmlimpl` methods just call a single `dart:dom` |
| 24 * method. This class detects these simple correspondences automatically. | 24 * method. This class detects these simple correspondences automatically. |
| 25 * | 25 * |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 Map<String, String> _getTags(String comment) { | 394 Map<String, String> _getTags(String comment) { |
| 395 if (comment == null) return const <String>{}; | 395 if (comment == null) return const <String>{}; |
| 396 final re = new RegExp("@([a-zA-Z]+) ([^;]+)(?:;|\$)"); | 396 final re = new RegExp("@([a-zA-Z]+) ([^;]+)(?:;|\$)"); |
| 397 final tags = <String>{}; | 397 final tags = <String>{}; |
| 398 for (var m in re.allMatches(comment.trim())) { | 398 for (var m in re.allMatches(comment.trim())) { |
| 399 tags[m[1]] = m[2]; | 399 tags[m[1]] = m[2]; |
| 400 } | 400 } |
| 401 return tags; | 401 return tags; |
| 402 } | 402 } |
| 403 } | 403 } |
| OLD | NEW |