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

Unified Diff: pkg/analyzer/lib/src/generated/ast.dart

Issue 189043003: Improved 'has' properties translation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/lib/src/generated/ast.dart
diff --git a/pkg/analyzer/lib/src/generated/ast.dart b/pkg/analyzer/lib/src/generated/ast.dart
index 4cfeec234dca80e2f21860cd82b081d4579c0641..bf07cccb593eee188cb96ca729021b107f2b0c48 100644
--- a/pkg/analyzer/lib/src/generated/ast.dart
+++ b/pkg/analyzer/lib/src/generated/ast.dart
@@ -2584,7 +2584,7 @@ class Comment extends AstNode {
* @param references the references embedded within the documentation comment
* @return the documentation comment that was created
*/
- static Comment createDocumentationComment2(List<Token> tokens, List<CommentReference> references) => new Comment(tokens, CommentType.DOCUMENTATION, references);
+ static Comment createDocumentationCommentWithReferences(List<Token> tokens, List<CommentReference> references) => new Comment(tokens, CommentType.DOCUMENTATION, references);
/**
* Create an end-of-line comment.
@@ -4166,10 +4166,12 @@ class ExportDirective extends NamespaceDirective {
accept(AstVisitor visitor) => visitor.visitExportDirective(this);
+ ExportElement get element => super.element as ExportElement;
+
LibraryElement get uriElement {
- Element element = this.element;
- if (element is ExportElement) {
- return element.exportedLibrary;
+ ExportElement exportElement = element;
+ if (exportElement != null) {
+ return exportElement.exportedLibrary;
}
return null;
}
@@ -12095,7 +12097,7 @@ class ElementLocator {
* @param offset the offset relative to source
* @return the associated element, or `null` if none is found
*/
- static Element locate2(AstNode node, int offset) {
+ static Element locateWithOffset(AstNode node, int offset) {
// try to get Element from node
{
Element nodeElement = locate(node);
@@ -14560,7 +14562,7 @@ class AstCloner implements AstVisitor<AstNode> {
Comment visitComment(Comment node) {
if (node.isDocumentation) {
- return Comment.createDocumentationComment2(node.tokens, cloneNodeList(node.references));
+ return Comment.createDocumentationCommentWithReferences(node.tokens, cloneNodeList(node.references));
} else if (node.isBlock) {
return Comment.createBlockComment(node.tokens);
}
@@ -14785,7 +14787,7 @@ class AstComparator implements AstVisitor<bool> {
* @param second the second node being compared
* @return `true` if the two AST nodes are equal
*/
- static bool equals4(CompilationUnit first, CompilationUnit second) {
+ static bool equalUnits(CompilationUnit first, CompilationUnit second) {
AstComparator comparator = new AstComparator();
return comparator.isEqualNodes(first, second);
}
@@ -15508,7 +15510,7 @@ class IncrementalAstCloner implements AstVisitor<AstNode> {
Comment visitComment(Comment node) {
if (node.isDocumentation) {
- return Comment.createDocumentationComment2(mapTokens(node.tokens), cloneNodeList(node.references));
+ return Comment.createDocumentationCommentWithReferences(mapTokens(node.tokens), cloneNodeList(node.references));
} else if (node.isBlock) {
return Comment.createBlockComment(mapTokens(node.tokens));
}

Powered by Google App Engine
This is Rietveld 408576698