| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 services.completion.computer.dart.local.Declaration.visitor; | 5 library services.completion.computer.dart.local.Declaration.visitor; |
| 6 | 6 |
| 7 import 'package:analysis_server/src/services/completion/suggestion_builder.dart'
; | 7 import 'package:analysis_server/src/services/completion/suggestion_builder.dart'
; |
| 8 import 'package:analyzer/src/generated/ast.dart'; | 8 import 'package:analyzer/src/generated/ast.dart'; |
| 9 import 'package:analyzer/src/generated/scanner.dart'; | 9 import 'package:analyzer/src/generated/scanner.dart'; |
| 10 | 10 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 } | 137 } |
| 138 } else if (declaration is ClassTypeAlias) { | 138 } else if (declaration is ClassTypeAlias) { |
| 139 declaredClassTypeAlias(declaration); | 139 declaredClassTypeAlias(declaration); |
| 140 } else if (declaration is FunctionTypeAlias) { | 140 } else if (declaration is FunctionTypeAlias) { |
| 141 declaredFunctionTypeAlias(declaration); | 141 declaredFunctionTypeAlias(declaration); |
| 142 } | 142 } |
| 143 }); | 143 }); |
| 144 } | 144 } |
| 145 | 145 |
| 146 @override | 146 @override |
| 147 visitConstructorDeclaration(ConstructorDeclaration node) { |
| 148 _visitParamList(node.parameters); |
| 149 visitNode(node); |
| 150 } |
| 151 |
| 152 @override |
| 147 void visitForEachStatement(ForEachStatement node) { | 153 void visitForEachStatement(ForEachStatement node) { |
| 148 SimpleIdentifier id; | 154 SimpleIdentifier id; |
| 149 TypeName type; | 155 TypeName type; |
| 150 DeclaredIdentifier loopVar = node.loopVariable; | 156 DeclaredIdentifier loopVar = node.loopVariable; |
| 151 if (loopVar != null) { | 157 if (loopVar != null) { |
| 152 id = loopVar.identifier; | 158 id = loopVar.identifier; |
| 153 type = loopVar.type; | 159 type = loopVar.type; |
| 154 } else { | 160 } else { |
| 155 id = node.identifier; | 161 id = node.identifier; |
| 156 type = null; | 162 type = null; |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 }); | 261 }); |
| 256 } | 262 } |
| 257 } | 263 } |
| 258 } | 264 } |
| 259 | 265 |
| 260 /** | 266 /** |
| 261 * Internal exception used to indicate that [LocalDeclarationVisitor] | 267 * Internal exception used to indicate that [LocalDeclarationVisitor] |
| 262 * should stop visiting. | 268 * should stop visiting. |
| 263 */ | 269 */ |
| 264 class _LocalDeclarationVisitorFinished {} | 270 class _LocalDeclarationVisitorFinished {} |
| OLD | NEW |