| 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'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/visitor.dart'; | 10 import 'package:analyzer/dart/ast/visitor.dart'; |
| (...skipping 3451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3462 variable.setVisibleRange(enclosingBlock.offset, enclosingBlock.length); | 3462 variable.setVisibleRange(enclosingBlock.offset, enclosingBlock.length); |
| 3463 if ((node.parent as VariableDeclarationList).type == null) { | 3463 if ((node.parent as VariableDeclarationList).type == null) { |
| 3464 variable.hasImplicitType = true; | 3464 variable.hasImplicitType = true; |
| 3465 } | 3465 } |
| 3466 _currentHolder.addLocalVariable(variable); | 3466 _currentHolder.addLocalVariable(variable); |
| 3467 variableName.staticElement = element; | 3467 variableName.staticElement = element; |
| 3468 } else { | 3468 } else { |
| 3469 SimpleIdentifier variableName = node.name; | 3469 SimpleIdentifier variableName = node.name; |
| 3470 TopLevelVariableElementImpl variable; | 3470 TopLevelVariableElementImpl variable; |
| 3471 if (isConst && hasInitializer) { | 3471 if (isConst && hasInitializer) { |
| 3472 variable = new ConstTopLevelVariableElementImpl(variableName); | 3472 variable = new ConstTopLevelVariableElementImpl.forNode(variableName); |
| 3473 } else { | 3473 } else { |
| 3474 variable = new TopLevelVariableElementImpl.forNode(variableName); | 3474 variable = new TopLevelVariableElementImpl.forNode(variableName); |
| 3475 } | 3475 } |
| 3476 element = variable; | 3476 element = variable; |
| 3477 if (node.parent.parent is TopLevelVariableDeclaration) { | 3477 if (node.parent.parent is TopLevelVariableDeclaration) { |
| 3478 _setDoc(element, node.parent.parent); | 3478 _setDoc(element, node.parent.parent); |
| 3479 } | 3479 } |
| 3480 if ((node.parent as VariableDeclarationList).type == null) { | 3480 if ((node.parent as VariableDeclarationList).type == null) { |
| 3481 variable.hasImplicitType = true; | 3481 variable.hasImplicitType = true; |
| 3482 } | 3482 } |
| (...skipping 10102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13585 nonFields.add(node); | 13585 nonFields.add(node); |
| 13586 return null; | 13586 return null; |
| 13587 } | 13587 } |
| 13588 | 13588 |
| 13589 @override | 13589 @override |
| 13590 Object visitNode(AstNode node) => node.accept(TypeResolverVisitor_this); | 13590 Object visitNode(AstNode node) => node.accept(TypeResolverVisitor_this); |
| 13591 | 13591 |
| 13592 @override | 13592 @override |
| 13593 Object visitWithClause(WithClause node) => null; | 13593 Object visitWithClause(WithClause node) => null; |
| 13594 } | 13594 } |
| OLD | NEW |