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

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

Issue 348673002: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.ast; 8 library engine.ast;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 5801 matching lines...) Expand 10 before | Expand all | Expand 10 after
5812 // no Element 5812 // no Element
5813 return null; 5813 return null;
5814 } 5814 }
5815 } 5815 }
5816 5816
5817 /** 5817 /**
5818 * Visitor that maps nodes to elements. 5818 * Visitor that maps nodes to elements.
5819 */ 5819 */
5820 class ElementLocator_ElementMapper extends GeneralizingAstVisitor<Element> { 5820 class ElementLocator_ElementMapper extends GeneralizingAstVisitor<Element> {
5821 @override 5821 @override
5822 Element visitAnnotation(Annotation node) => node.element;
5823
5824 @override
5822 Element visitAssignmentExpression(AssignmentExpression node) => node.bestEleme nt; 5825 Element visitAssignmentExpression(AssignmentExpression node) => node.bestEleme nt;
5823 5826
5824 @override 5827 @override
5825 Element visitBinaryExpression(BinaryExpression node) => node.bestElement; 5828 Element visitBinaryExpression(BinaryExpression node) => node.bestElement;
5826 5829
5827 @override 5830 @override
5828 Element visitClassDeclaration(ClassDeclaration node) => node.element; 5831 Element visitClassDeclaration(ClassDeclaration node) => node.element;
5829 5832
5830 @override 5833 @override
5831 Element visitCompilationUnit(CompilationUnit node) => node.element; 5834 Element visitCompilationUnit(CompilationUnit node) => node.element;
5832 5835
5833 @override 5836 @override
5834 Element visitConstructorDeclaration(ConstructorDeclaration node) => node.eleme nt; 5837 Element visitConstructorDeclaration(ConstructorDeclaration node) => node.eleme nt;
5835 5838
5836 @override 5839 @override
5837 Element visitFunctionDeclaration(FunctionDeclaration node) => node.element; 5840 Element visitFunctionDeclaration(FunctionDeclaration node) => node.element;
5838 5841
5839 @override 5842 @override
5840 Element visitIdentifier(Identifier node) { 5843 Element visitIdentifier(Identifier node) {
5841 AstNode parent = node.parent; 5844 AstNode parent = node.parent;
5845 // Type name in Annotation
5846 if (parent is Annotation) {
5847 Annotation annotation = parent;
5848 if (identical(annotation.name, node) && annotation.constructorName == null ) {
5849 return annotation.element;
5850 }
5851 }
5842 // Type name in InstanceCreationExpression 5852 // Type name in InstanceCreationExpression
5843 { 5853 {
5844 AstNode typeNameCandidate = parent; 5854 AstNode typeNameCandidate = parent;
5845 // new prefix.node[.constructorName]() 5855 // new prefix.node[.constructorName]()
5846 if (typeNameCandidate is PrefixedIdentifier) { 5856 if (typeNameCandidate is PrefixedIdentifier) {
5847 PrefixedIdentifier prefixedIdentifier = typeNameCandidate as PrefixedIde ntifier; 5857 PrefixedIdentifier prefixedIdentifier = typeNameCandidate as PrefixedIde ntifier;
5848 if (identical(prefixedIdentifier.identifier, node)) { 5858 if (identical(prefixedIdentifier.identifier, node)) {
5849 typeNameCandidate = prefixedIdentifier.parent; 5859 typeNameCandidate = prefixedIdentifier.parent;
5850 } 5860 }
5851 } 5861 }
(...skipping 9251 matching lines...) Expand 10 before | Expand all | Expand 10 after
15103 */ 15113 */
15104 SimpleFormalParameter(Comment comment, List<Annotation> metadata, this.keyword , TypeName type, SimpleIdentifier identifier) : super(comment, metadata, identif ier) { 15114 SimpleFormalParameter(Comment comment, List<Annotation> metadata, this.keyword , TypeName type, SimpleIdentifier identifier) : super(comment, metadata, identif ier) {
15105 this._type = becomeParentOf(type); 15115 this._type = becomeParentOf(type);
15106 } 15116 }
15107 15117
15108 @override 15118 @override
15109 accept(AstVisitor visitor) => visitor.visitSimpleFormalParameter(this); 15119 accept(AstVisitor visitor) => visitor.visitSimpleFormalParameter(this);
15110 15120
15111 @override 15121 @override
15112 Token get beginToken { 15122 Token get beginToken {
15113 if (keyword != null) { 15123 NodeList<Annotation> metadata = this.metadata;
15124 if (!metadata.isEmpty) {
15125 return metadata.beginToken;
15126 } else if (keyword != null) {
15114 return keyword; 15127 return keyword;
15115 } else if (_type != null) { 15128 } else if (_type != null) {
15116 return _type.beginToken; 15129 return _type.beginToken;
15117 } 15130 }
15118 return identifier.beginToken; 15131 return identifier.beginToken;
15119 } 15132 }
15120 15133
15121 @override 15134 @override
15122 Token get endToken => identifier.endToken; 15135 Token get endToken => identifier.endToken;
15123 15136
(...skipping 3824 matching lines...) Expand 10 before | Expand all | Expand 10 after
18948 _elements[index] = node; 18961 _elements[index] = node;
18949 } 18962 }
18950 void clear() { 18963 void clear() {
18951 _elements = <E> []; 18964 _elements = <E> [];
18952 } 18965 }
18953 int get length => _elements.length; 18966 int get length => _elements.length;
18954 void set length(int value) { 18967 void set length(int value) {
18955 throw new UnsupportedError("Cannot resize NodeList."); 18968 throw new UnsupportedError("Cannot resize NodeList.");
18956 } 18969 }
18957 } 18970 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/package_uri_resolver_test.dart ('k') | pkg/analyzer/lib/src/generated/element.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698