OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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.declaration_resolver; | 5 library analyzer.src.generated.declaration_resolver; |
6 | 6 |
7 import 'package:analyzer/dart/ast/ast.dart'; | 7 import 'package:analyzer/dart/ast/ast.dart'; |
8 import 'package:analyzer/dart/ast/token.dart'; | 8 import 'package:analyzer/dart/ast/token.dart'; |
9 import 'package:analyzer/dart/ast/visitor.dart'; | 9 import 'package:analyzer/dart/ast/visitor.dart'; |
10 import 'package:analyzer/dart/element/element.dart'; | 10 import 'package:analyzer/dart/element/element.dart'; |
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
798 check(_enums, _enumIndex); | 798 check(_enums, _enumIndex); |
799 check(_functions, _functionIndex); | 799 check(_functions, _functionIndex); |
800 check(_parameters, _parameterIndex); | 800 check(_parameters, _parameterIndex); |
801 check(_typedefs, _typedefIndex); | 801 check(_typedefs, _typedefIndex); |
802 check(_typeParameters, _typeParameterIndex); | 802 check(_typeParameters, _typeParameterIndex); |
803 check(_variables, _variableIndex); | 803 check(_variables, _variableIndex); |
804 Element element = this.element; | 804 Element element = this.element; |
805 if (element is ExecutableElementImpl) { | 805 if (element is ExecutableElementImpl) { |
806 element.functions = _elementHolder.functions; | 806 element.functions = _elementHolder.functions; |
807 element.labels = _elementHolder.labels; | 807 element.labels = _elementHolder.labels; |
808 element.localVariables = _elementHolder.localVariables; | 808 element.encloseElements(_elementHolder.localVariables); |
809 } | 809 } |
810 } | 810 } |
811 | 811 |
812 static bool _isNotSynthetic(Element e) => !e.isSynthetic; | 812 static bool _isNotSynthetic(Element e) => !e.isSynthetic; |
813 } | 813 } |
814 | 814 |
815 class _ElementMismatchException extends AnalysisException { | 815 class _ElementMismatchException extends AnalysisException { |
816 /** | 816 /** |
817 * Creates an exception to refer to the given [compilationUnit], [element], | 817 * Creates an exception to refer to the given [compilationUnit], [element], |
818 * and [cause]. | 818 * and [cause]. |
819 */ | 819 */ |
820 _ElementMismatchException( | 820 _ElementMismatchException( |
821 CompilationUnitElement compilationUnit, Element element, | 821 CompilationUnitElement compilationUnit, Element element, |
822 [CaughtException cause = null]) | 822 [CaughtException cause = null]) |
823 : super('Element mismatch in $compilationUnit at $element', cause); | 823 : super('Element mismatch in $compilationUnit at $element', cause); |
824 } | 824 } |
OLD | NEW |