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

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

Issue 243263004: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 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 8a9111348afc153955e9d1d2274186603a962379..0b9fc8fd1e37fb505b3c960e0d699b385f297dc3 100644
--- a/pkg/analyzer/lib/src/generated/ast.dart
+++ b/pkg/analyzer/lib/src/generated/ast.dart
@@ -12724,11 +12724,7 @@ class ElementLocator_ElementMapper extends GeneralizingAstVisitor<Element> {
}
}
}
- Element element = node.bestElement;
- if (element == null) {
- element = node.staticElement;
- }
- return element;
+ return node.bestElement;
}
@override
@@ -15922,7 +15918,7 @@ class AstCloner implements AstVisitor<AstNode> {
SwitchStatement visitSwitchStatement(SwitchStatement node) => new SwitchStatement(node.keyword, node.leftParenthesis, _cloneNode(node.expression), node.rightParenthesis, node.leftBracket, _cloneNodeList(node.members), node.rightBracket);
@override
- AstNode visitSymbolLiteral(SymbolLiteral node) => new SymbolLiteral(node.poundSign, node.components);
+ SymbolLiteral visitSymbolLiteral(SymbolLiteral node) => new SymbolLiteral(node.poundSign, node.components);
@override
ThisExpression visitThisExpression(ThisExpression node) => new ThisExpression(node.keyword);
@@ -15992,7 +15988,7 @@ class AstComparator implements AstVisitor<bool> {
* @param second the second node being compared
* @return `true` if the two AST nodes are equal
*/
- static bool equalUnits(CompilationUnit first, CompilationUnit second) {
+ static bool equalNodes(AstNode first, AstNode second) {
AstComparator comparator = new AstComparator();
return comparator._isEqualNodes(first, second);
}
@@ -16682,7 +16678,7 @@ class AstComparator implements AstVisitor<bool> {
return false;
}
for (int i = 0; i < length; i++) {
- if (_isEqualTokens(first[i], second[i])) {
+ if (!_isEqualTokens(first[i], second[i])) {
return false;
}
}
@@ -16701,6 +16697,8 @@ class AstComparator implements AstVisitor<bool> {
return second == null;
} else if (second == null) {
return false;
+ } else if (identical(first, second)) {
+ return true;
}
return first.offset == second.offset && first.length == second.length && first.lexeme == second.lexeme;
}

Powered by Google App Engine
This is Rietveld 408576698