| OLD | NEW |
| 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 analyzer.src.generated.visitors; | 5 library analyzer.src.generated.visitors; |
| 6 | 6 |
| 7 import 'package:analyzer/src/generated/ast.dart'; | 7 import 'package:analyzer/dart/ast/ast.dart'; |
| 8 | 8 |
| 9 /// An [AstVisitor] that delegates calls to visit methods to all [delegates] | 9 /// An [AstVisitor] that delegates calls to visit methods to all [delegates] |
| 10 /// before calling [visitChildren]. | 10 /// before calling [visitChildren]. |
| 11 class DelegatingAstVisitor<T> implements AstVisitor<T> { | 11 class DelegatingAstVisitor<T> implements AstVisitor<T> { |
| 12 Iterable<AstVisitor<T>> _delegates; | 12 Iterable<AstVisitor<T>> _delegates; |
| 13 DelegatingAstVisitor(this._delegates); | 13 DelegatingAstVisitor(this._delegates); |
| 14 | 14 |
| 15 @override | 15 @override |
| 16 T visitAdjacentStrings(AdjacentStrings node) { | 16 T visitAdjacentStrings(AdjacentStrings node) { |
| 17 _delegates.forEach((delegate) => delegate.visitAdjacentStrings(node)); | 17 _delegates.forEach((delegate) => delegate.visitAdjacentStrings(node)); |
| (...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 778 return null; | 778 return null; |
| 779 } | 779 } |
| 780 | 780 |
| 781 @override | 781 @override |
| 782 T visitYieldStatement(YieldStatement node) { | 782 T visitYieldStatement(YieldStatement node) { |
| 783 _delegates.forEach((delegate) => delegate.visitYieldStatement(node)); | 783 _delegates.forEach((delegate) => delegate.visitYieldStatement(node)); |
| 784 node.visitChildren(this); | 784 node.visitChildren(this); |
| 785 return null; | 785 return null; |
| 786 } | 786 } |
| 787 } | 787 } |
| OLD | NEW |