| Index: third_party/pkg/angular/lib/tools/html_extractor.dart
|
| diff --git a/third_party/pkg/angular/lib/tools/html_extractor.dart b/third_party/pkg/angular/lib/tools/html_extractor.dart
|
| index 175e74be62db8337bbde0e5d8f6f82a7f87849df..4dc637cb478eec4e0765932b4f30634e7597b4a7 100644
|
| --- a/third_party/pkg/angular/lib/tools/html_extractor.dart
|
| +++ b/third_party/pkg/angular/lib/tools/html_extractor.dart
|
| @@ -14,27 +14,26 @@ RegExp _NG_REPEAT_SYNTAX = new RegExp(r'^\s*(.+)\s+in\s+(.*?)\s*(\s+track\s+by\s
|
|
|
| class HtmlExpressionExtractor {
|
| List<DirectiveInfo> directiveInfos;
|
| - IoService ioService;
|
|
|
| - HtmlExpressionExtractor(this.directiveInfos, this.ioService);
|
| + HtmlExpressionExtractor(this.directiveInfos) {
|
| + for (DirectiveInfo directiveInfo in directiveInfos) {
|
| + expressions.addAll(directiveInfo.expressions);
|
| + if (directiveInfo.template != null) {
|
| + parseHtml(directiveInfo.template);
|
| + }
|
| + }
|
| + }
|
|
|
| Set<String> expressions = new Set<String>();
|
|
|
| - void crawl(root) {
|
| + void crawl(String root, IoService ioService) {
|
| 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'[*=/{{.*}}/]')) {
|
|
|