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 analyzer.src.generated.resolver; | 5 library analyzer.src.generated.resolver; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/visitor.dart'; |
9 import 'package:analyzer/dart/element/element.dart'; | 11 import 'package:analyzer/dart/element/element.dart'; |
10 import 'package:analyzer/dart/element/type.dart'; | 12 import 'package:analyzer/dart/element/type.dart'; |
11 import 'package:analyzer/dart/element/visitor.dart'; | 13 import 'package:analyzer/dart/element/visitor.dart'; |
| 14 import 'package:analyzer/src/dart/ast/utilities.dart'; |
12 import 'package:analyzer/src/dart/element/element.dart'; | 15 import 'package:analyzer/src/dart/element/element.dart'; |
13 import 'package:analyzer/src/dart/element/member.dart'; | 16 import 'package:analyzer/src/dart/element/member.dart'; |
14 import 'package:analyzer/src/dart/element/type.dart'; | 17 import 'package:analyzer/src/dart/element/type.dart'; |
15 import 'package:analyzer/src/generated/ast.dart'; | |
16 import 'package:analyzer/src/generated/constant.dart'; | 18 import 'package:analyzer/src/generated/constant.dart'; |
17 import 'package:analyzer/src/generated/element_resolver.dart'; | 19 import 'package:analyzer/src/generated/element_resolver.dart'; |
18 import 'package:analyzer/src/generated/engine.dart'; | 20 import 'package:analyzer/src/generated/engine.dart'; |
19 import 'package:analyzer/src/generated/error.dart'; | 21 import 'package:analyzer/src/generated/error.dart'; |
20 import 'package:analyzer/src/generated/error_verifier.dart'; | 22 import 'package:analyzer/src/generated/error_verifier.dart'; |
21 import 'package:analyzer/src/generated/java_core.dart'; | 23 import 'package:analyzer/src/generated/java_core.dart'; |
22 import 'package:analyzer/src/generated/java_engine.dart'; | 24 import 'package:analyzer/src/generated/java_engine.dart'; |
23 import 'package:analyzer/src/generated/scanner.dart'; | 25 import 'package:analyzer/src/generated/scanner.dart'; |
24 import 'package:analyzer/src/generated/source.dart'; | 26 import 'package:analyzer/src/generated/source.dart'; |
25 import 'package:analyzer/src/generated/static_type_analyzer.dart'; | 27 import 'package:analyzer/src/generated/static_type_analyzer.dart'; |
(...skipping 9326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9352 (element is FieldElement && | 9354 (element is FieldElement && |
9353 element.isFinal && | 9355 element.isFinal && |
9354 !element.isStatic)) && | 9356 !element.isStatic)) && |
9355 node.initializer != null) { | 9357 node.initializer != null) { |
9356 (element as ConstVariableElement).constantInitializer = | 9358 (element as ConstVariableElement).constantInitializer = |
9357 new ConstantAstCloner().cloneNode(node.initializer); | 9359 new ConstantAstCloner().cloneNode(node.initializer); |
9358 } | 9360 } |
9359 return null; | 9361 return null; |
9360 } | 9362 } |
9361 | 9363 |
9362 @override visitVariableDeclarationList(VariableDeclarationList node) { | 9364 @override |
| 9365 visitVariableDeclarationList(VariableDeclarationList node) { |
9363 for (VariableDeclaration decl in node.variables) { | 9366 for (VariableDeclaration decl in node.variables) { |
9364 InferenceContext.setType(decl, node.type?.type); | 9367 InferenceContext.setType(decl, node.type?.type); |
9365 } | 9368 } |
9366 super.visitVariableDeclarationList(node); | 9369 super.visitVariableDeclarationList(node); |
9367 } | 9370 } |
9368 | 9371 |
9369 @override | 9372 @override |
9370 Object visitWhileStatement(WhileStatement node) { | 9373 Object visitWhileStatement(WhileStatement node) { |
9371 // Note: since we don't call the base class, we have to maintain | 9374 // Note: since we don't call the base class, we have to maintain |
9372 // _implicitLabelScope ourselves. | 9375 // _implicitLabelScope ourselves. |
(...skipping 4227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13600 nonFields.add(node); | 13603 nonFields.add(node); |
13601 return null; | 13604 return null; |
13602 } | 13605 } |
13603 | 13606 |
13604 @override | 13607 @override |
13605 Object visitNode(AstNode node) => node.accept(TypeResolverVisitor_this); | 13608 Object visitNode(AstNode node) => node.accept(TypeResolverVisitor_this); |
13606 | 13609 |
13607 @override | 13610 @override |
13608 Object visitWithClause(WithClause node) => null; | 13611 Object visitWithClause(WithClause node) => null; |
13609 } | 13612 } |
OLD | NEW |