| Index: third_party/pkg/angular/lib/tools/html_extractor.dart
|
| ===================================================================
|
| --- third_party/pkg/angular/lib/tools/html_extractor.dart (revision 33054)
|
| +++ third_party/pkg/angular/lib/tools/html_extractor.dart (working copy)
|
| @@ -14,26 +14,27 @@
|
|
|
| class HtmlExpressionExtractor {
|
| List<DirectiveInfo> directiveInfos;
|
| + IoService ioService;
|
|
|
| - HtmlExpressionExtractor(this.directiveInfos) {
|
| - for (DirectiveInfo directiveInfo in directiveInfos) {
|
| - expressions.addAll(directiveInfo.expressions);
|
| - if (directiveInfo.template != null) {
|
| - parseHtml(directiveInfo.template);
|
| - }
|
| - }
|
| - }
|
| + HtmlExpressionExtractor(this.directiveInfos, this.ioService);
|
|
|
| Set<String> expressions = new Set<String>();
|
|
|
| - void crawl(String root, IoService ioService) {
|
| + void crawl(root) {
|
| ioService.visitFs(root, (String file) {
|
| if (!file.endsWith('.html')) return;
|
| - parseHtml(ioService.readAsStringSync(file));
|
| +
|
| + _parseHtml(ioService.readAsStringSync(file));
|
| });
|
| + for (DirectiveInfo directiveInfo in directiveInfos) {
|
| + expressions.addAll(directiveInfo.expressions);
|
| + if (directiveInfo.template != null) {
|
| + _parseHtml(directiveInfo.template);
|
| + }
|
| + }
|
| }
|
|
|
| - void parseHtml(String html) {
|
| + void _parseHtml(String html) {
|
| var document = parse(html);
|
| visitNodes([document], (Node node) {
|
| if (matchesNode(node, r'[*=/{{.*}}/]')) {
|
|
|