| 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 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 /** | 86 /** |
| 87 * Computes the `@DomName` to `dart:html` mapping, and | 87 * Computes the `@DomName` to `dart:html` mapping, and |
| 88 * places it in [htmlToDom] and [htmlTypesToDom]. Before this is run, dart2js | 88 * places it in [htmlToDom] and [htmlTypesToDom]. Before this is run, dart2js |
| 89 * should be initialized (via [parseOptions] and [initializeWorld]) and | 89 * should be initialized (via [parseOptions] and [initializeWorld]) and |
| 90 * [HtmlDiff.initialize] should be called. | 90 * [HtmlDiff.initialize] should be called. |
| 91 */ | 91 */ |
| 92 Future run(Uri libraryRoot) { | 92 Future run(Uri libraryRoot) { |
| 93 var result = new Completer(); | 93 var result = new Completer(); |
| 94 var provider = new SourceFileProvider(); | 94 var provider = new SourceFileProvider(); |
| 95 var handler = new FormattingDiagnosticHandler(provider); | 95 var handler = new FormattingDiagnosticHandler(provider); |
| 96 Future<MirrorSystem> analysis = analyzeUri( | 96 Future<MirrorSystem> analysis = analyze( |
| 97 HTML_LIBRARY_URIS, libraryRoot, null, | 97 HTML_LIBRARY_URIS, libraryRoot, null, |
| 98 provider.readStringFromUri, | 98 provider.readStringFromUri, |
| 99 handler.diagnosticHandler); | 99 handler.diagnosticHandler); |
| 100 analysis.then((MirrorSystem mirrors) { | 100 analysis.then((MirrorSystem mirrors) { |
| 101 for (var libraryUri in HTML_LIBRARY_URIS) { | 101 for (var libraryUri in HTML_LIBRARY_URIS) { |
| 102 var library = mirrors.libraries[libraryUri]; | 102 var library = mirrors.libraries[libraryUri]; |
| 103 if (library == null) { | 103 if (library == null) { |
| 104 warn('Could not find $libraryUri'); | 104 warn('Could not find $libraryUri'); |
| 105 result.complete(false); | 105 result.complete(false); |
| 106 } | 106 } |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 return members; | 225 return members; |
| 226 } | 226 } |
| 227 | 227 |
| 228 if (name.split('.').length != 2) { | 228 if (name.split('.').length != 2) { |
| 229 warn('invalid member name ${name}'); | 229 warn('invalid member name ${name}'); |
| 230 return new Set(); | 230 return new Set(); |
| 231 } | 231 } |
| 232 return new Set.from([name]); | 232 return new Set.from([name]); |
| 233 } | 233 } |
| 234 } | 234 } |
| OLD | NEW |