| 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 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 Loading... |
| 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 } |
| OLD | NEW |