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

Side by Side Diff: utils/apidoc/html_diff.dart

Issue 10780030: Dartdoc and apidoc updated to use Path. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments Created 8 years, 5 months 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 | « utils/apidoc/apidoc.gyp ('k') | utils/apidoc/html_diff_dump.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 /** 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('dart:io');
12 13
13 #import('../../lib/dartdoc/dartdoc.dart'); 14 #import('../../lib/dartdoc/dartdoc.dart');
14 #import('../../lib/dartdoc/mirrors/mirrors.dart'); 15 #import('../../lib/dartdoc/mirrors/mirrors.dart');
15 #import('../../lib/dartdoc/mirrors/mirrors_util.dart'); 16 #import('../../lib/dartdoc/mirrors/mirrors_util.dart');
16 17
17 /** 18 /**
18 * A class for computing a many-to-many mapping between the types and 19 * A class for computing a many-to-many mapping between the types and
19 * members in `dart:dom_deprecated` and `dart:html`. This mapping is 20 * members in `dart:dom_deprecated` and `dart:html`. This mapping is
20 * based on two indicators: 21 * based on two indicators:
21 * 22 *
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 final bool _printWarnings; 70 final bool _printWarnings;
70 71
71 static Compilation _compilation; 72 static Compilation _compilation;
72 static MirrorSystem _mirrors; 73 static MirrorSystem _mirrors;
73 static LibraryMirror dom; 74 static LibraryMirror dom;
74 75
75 /** 76 /**
76 * Perform static initialization of [world]. This should be run before 77 * Perform static initialization of [world]. This should be run before
77 * calling [HtmlDiff.run]. 78 * calling [HtmlDiff.run].
78 */ 79 */
79 static void initialize(String libDir) { 80 static void initialize(Path libDir) {
80 _compilation = new Compilation.library( 81 _compilation = new Compilation.library(
81 const <String>['dart:dom_deprecated', 'dart:html'], libDir); 82 const <Path>[
83 const Path('dart:dom_deprecated'),
84 const Path('dart:html')
85 ], libDir);
82 _mirrors = _compilation.mirrors(); 86 _mirrors = _compilation.mirrors();
83 87
84 // Find 'dart:dom_deprecated' by its library tag 'dom'. 88 // Find 'dart:dom_deprecated' by its library tag 'dom'.
85 dom = findMirror(_mirrors.libraries(), 'dom'); 89 dom = findMirror(_mirrors.libraries(), 'dom');
86 } 90 }
87 91
88 HtmlDiff([bool printWarnings = false]) : 92 HtmlDiff([bool printWarnings = false]) :
89 _printWarnings = printWarnings, 93 _printWarnings = printWarnings,
90 domToHtml = new Map<MemberMirror, Set<MemberMirror>>(), 94 domToHtml = new Map<MemberMirror, Set<MemberMirror>>(),
91 htmlToDom = new Map<MemberMirror, Set<MemberMirror>>(), 95 htmlToDom = new Map<MemberMirror, Set<MemberMirror>>(),
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 Map<String, String> _getTags(String comment) { 272 Map<String, String> _getTags(String comment) {
269 if (comment == null) return const <String>{}; 273 if (comment == null) return const <String>{};
270 final re = const RegExp("@([a-zA-Z]+) ([^;]+)(?:;|\$)"); 274 final re = const RegExp("@([a-zA-Z]+) ([^;]+)(?:;|\$)");
271 final tags = <String>{}; 275 final tags = <String>{};
272 for (var m in re.allMatches(comment.trim())) { 276 for (var m in re.allMatches(comment.trim())) {
273 tags[m[1]] = m[2]; 277 tags[m[1]] = m[2];
274 } 278 }
275 return tags; 279 return tags;
276 } 280 }
277 } 281 }
OLDNEW
« no previous file with comments | « utils/apidoc/apidoc.gyp ('k') | utils/apidoc/html_diff_dump.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698