Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(368)

Side by Side Diff: pkg/analyzer/lib/src/generated/element_resolver.dart

Issue 1901923002: Add UNDEFINED_HIDDEN_NAME, UNDEFINED_SHOWN_NAME (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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.element_resolver; 5 library analyzer.src.generated.element_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/token.dart'; 10 import 'package:analyzer/dart/ast/token.dart';
(...skipping 2070 matching lines...) Expand 10 before | Expand all | Expand 10 after
2081 names = combinator.hiddenNames; 2081 names = combinator.hiddenNames;
2082 } else { 2082 } else {
2083 names = (combinator as ShowCombinator).shownNames; 2083 names = (combinator as ShowCombinator).shownNames;
2084 } 2084 }
2085 for (SimpleIdentifier name in names) { 2085 for (SimpleIdentifier name in names) {
2086 String nameStr = name.name; 2086 String nameStr = name.name;
2087 Element element = namespace.get(nameStr); 2087 Element element = namespace.get(nameStr);
2088 if (element == null) { 2088 if (element == null) {
2089 element = namespace.get("$nameStr="); 2089 element = namespace.get("$nameStr=");
2090 } 2090 }
2091 if (element != null) { 2091 if (element == null) {
2092 ErrorCode hintCode;
Brian Wilkerson 2016/04/19 14:07:32 I would prefer to have the hint generation moved t
Brian Wilkerson 2016/04/20 18:09:57 To follow up: turns out I couldn't remember becaus
srawlins 2016/04/20 20:34:01 Done.
2093 if (combinator is HideCombinator) {
2094 hintCode = HintCode.UNDEFINED_HIDDEN_NAME;
2095 } else {
2096 hintCode = HintCode.UNDEFINED_SHOWN_NAME;
2097 }
2098 _recordUndefinedNode(null /*declaringElement*/, hintCode, name, [nameS tr]);
2099 } else {
2092 // Ensure that the name always resolves to a top-level variable 2100 // Ensure that the name always resolves to a top-level variable
2093 // rather than a getter or setter 2101 // rather than a getter or setter
2094 if (element is PropertyAccessorElement) { 2102 if (element is PropertyAccessorElement) {
2095 element = (element as PropertyAccessorElement).variable; 2103 element = (element as PropertyAccessorElement).variable;
2096 } 2104 }
2097 name.staticElement = element; 2105 name.staticElement = element;
2098 } 2106 }
2099 } 2107 }
2100 } 2108 }
2101 } 2109 }
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
2585 2593
2586 @override 2594 @override
2587 Element get staticElement => null; 2595 Element get staticElement => null;
2588 2596
2589 @override 2597 @override
2590 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => null; 2598 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => null;
2591 2599
2592 @override 2600 @override
2593 void visitChildren(AstVisitor visitor) {} 2601 void visitChildren(AstVisitor visitor) {}
2594 } 2602 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/error.dart » ('j') | pkg/analyzer/lib/src/generated/error.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698