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 engine.resolver; | 5 library engine.resolver; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 import "dart:math" as math; | 8 import "dart:math" as math; |
9 | 9 |
10 import 'package:analyzer/src/generated/utilities_collection.dart'; | 10 import 'package:analyzer/src/generated/utilities_collection.dart'; |
(...skipping 11819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
11830 /** | 11830 /** |
11831 * Return the listener that is to be informed when an error is encountered. | 11831 * Return the listener that is to be informed when an error is encountered. |
11832 * | 11832 * |
11833 * @return the listener that is to be informed when an error is encountered | 11833 * @return the listener that is to be informed when an error is encountered |
11834 */ | 11834 */ |
11835 AnalysisErrorListener get errorListener; | 11835 AnalysisErrorListener get errorListener; |
11836 | 11836 |
11837 /** | 11837 /** |
11838 * Add the given element to this scope. If there is already an element with th e given name defined | 11838 * Add the given element to this scope. If there is already an element with th e given name defined |
11839 * in this scope, then an error will be generated and the original element wil l continue to be | 11839 * in this scope, then an error will be generated and the original element wil l continue to be |
11840 * mapped to the name. If there is an element with the given name in an enclos ing scope, then a | 11840 * mapped to the name. |
Brian Wilkerson
2015/06/08 22:09:01
Given that the code hasn't changed, do we want to
| |
11841 * warning will be generated but the given element will hide the inherited ele ment. | |
11842 * | 11841 * |
11843 * @param element the element to be added to this scope | 11842 * @param element the element to be added to this scope |
11844 */ | 11843 */ |
11845 void define(Element element) { | 11844 void define(Element element) { |
11846 String name = _getName(element); | 11845 String name = _getName(element); |
11847 if (name != null && !name.isEmpty) { | 11846 if (name != null && !name.isEmpty) { |
11848 if (_definedNames.containsKey(name)) { | 11847 if (_definedNames.containsKey(name)) { |
11849 errorListener | 11848 errorListener |
11850 .onError(getErrorForDuplicate(_definedNames[name], element)); | 11849 .onError(getErrorForDuplicate(_definedNames[name], element)); |
11851 } else { | 11850 } else { |
(...skipping 3636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
15488 nonFields.add(node); | 15487 nonFields.add(node); |
15489 return null; | 15488 return null; |
15490 } | 15489 } |
15491 | 15490 |
15492 @override | 15491 @override |
15493 Object visitNode(AstNode node) => node.accept(TypeResolverVisitor_this); | 15492 Object visitNode(AstNode node) => node.accept(TypeResolverVisitor_this); |
15494 | 15493 |
15495 @override | 15494 @override |
15496 Object visitWithClause(WithClause node) => null; | 15495 Object visitWithClause(WithClause node) => null; |
15497 } | 15496 } |
OLD | NEW |