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

Side by Side Diff: pkg/analyzer/lib/src/visitors.dart

Issue 853123002: Lint contribution refactoring. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 library engine.ast.visitors; 5 library engine.ast.visitors;
6 6
7 import 'package:analyzer/src/generated/ast.dart'; 7 import 'package:analyzer/src/generated/ast.dart';
8 8
9
9 /// An [AstVisitor] that delegates calls to visit methods to all [delegates] 10 /// An [AstVisitor] that delegates calls to visit methods to all [delegates]
10 /// before calling [visitChildren]. 11 /// before calling [visitChildren].
11 class DelegatingAstVisitor<T> implements AstVisitor<T> { 12 class DelegatingAstVisitor<T> implements AstVisitor<T> {
12 13
13 Iterable<AstVisitor<T>> _delegates; 14 Iterable<AstVisitor<T>> _delegates;
14 DelegatingAstVisitor(this._delegates); 15 DelegatingAstVisitor(this._delegates);
15 16
16 @override 17 @override
17 T visitAdjacentStrings(AdjacentStrings node) { 18 T visitAdjacentStrings(AdjacentStrings node) {
18 _delegates.forEach((delegate) => delegate.visitAdjacentStrings(node)); 19 _delegates.forEach((delegate) => delegate.visitAdjacentStrings(node));
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 return null; 763 return null;
763 } 764 }
764 765
765 @override 766 @override
766 T visitYieldStatement(YieldStatement node) { 767 T visitYieldStatement(YieldStatement node) {
767 _delegates.forEach((delegate) => delegate.visitYieldStatement(node)); 768 _delegates.forEach((delegate) => delegate.visitYieldStatement(node));
768 node.visitChildren(this); 769 node.visitChildren(this);
769 return null; 770 return null;
770 } 771 }
771 } 772 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698