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

Unified Diff: third_party/pkg/angular/lib/tools/html_extractor.dart

Issue 180843004: Revert revision 33053 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
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'[*=/{{.*}}/]')) {

Powered by Google App Engine
This is Rietveld 408576698