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

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

Issue 1970053002: Update ResolutionCopier to copy TypeArgumentList of invocations. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | pkg/analyzer/test/src/dart/ast/utilities_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.dart.ast.utilities; 5 library analyzer.src.dart.ast.utilities;
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 5593 matching lines...) Expand 10 before | Expand all | Expand 10 after
5604 toNode.staticType = node.staticType; 5604 toNode.staticType = node.staticType;
5605 return true; 5605 return true;
5606 } 5606 }
5607 return false; 5607 return false;
5608 } 5608 }
5609 5609
5610 @override 5610 @override
5611 bool visitFunctionExpressionInvocation(FunctionExpressionInvocation node) { 5611 bool visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
5612 FunctionExpressionInvocation toNode = 5612 FunctionExpressionInvocation toNode =
5613 this._toNode as FunctionExpressionInvocation; 5613 this._toNode as FunctionExpressionInvocation;
5614 if (_and(_isEqualNodes(node.function, toNode.function), 5614 if (_and(
5615 _isEqualNodes(node.function, toNode.function),
5616 _isEqualNodes(node.typeArguments, toNode.typeArguments),
5615 _isEqualNodes(node.argumentList, toNode.argumentList))) { 5617 _isEqualNodes(node.argumentList, toNode.argumentList))) {
5616 toNode.propagatedElement = node.propagatedElement; 5618 toNode.propagatedElement = node.propagatedElement;
5617 toNode.propagatedInvokeType = node.propagatedInvokeType; 5619 toNode.propagatedInvokeType = node.propagatedInvokeType;
5618 toNode.propagatedType = node.propagatedType; 5620 toNode.propagatedType = node.propagatedType;
5619 toNode.staticInvokeType = node.staticInvokeType; 5621 toNode.staticInvokeType = node.staticInvokeType;
5620 toNode.staticElement = node.staticElement; 5622 toNode.staticElement = node.staticElement;
5621 toNode.staticType = node.staticType; 5623 toNode.staticType = node.staticType;
5622 return true; 5624 return true;
5623 } 5625 }
5624 return false; 5626 return false;
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
5869 _isEqualNodes(node.parameters, toNode.parameters), 5871 _isEqualNodes(node.parameters, toNode.parameters),
5870 _isEqualNodes(node.body, toNode.body)); 5872 _isEqualNodes(node.body, toNode.body));
5871 } 5873 }
5872 5874
5873 @override 5875 @override
5874 bool visitMethodInvocation(MethodInvocation node) { 5876 bool visitMethodInvocation(MethodInvocation node) {
5875 MethodInvocation toNode = this._toNode as MethodInvocation; 5877 MethodInvocation toNode = this._toNode as MethodInvocation;
5876 if (_and( 5878 if (_and(
5877 _isEqualNodes(node.target, toNode.target), 5879 _isEqualNodes(node.target, toNode.target),
5878 _isEqualTokens(node.operator, toNode.operator), 5880 _isEqualTokens(node.operator, toNode.operator),
5881 _isEqualNodes(node.typeArguments, toNode.typeArguments),
5879 _isEqualNodes(node.methodName, toNode.methodName), 5882 _isEqualNodes(node.methodName, toNode.methodName),
5880 _isEqualNodes(node.argumentList, toNode.argumentList))) { 5883 _isEqualNodes(node.argumentList, toNode.argumentList))) {
5881 toNode.propagatedInvokeType = node.propagatedInvokeType; 5884 toNode.propagatedInvokeType = node.propagatedInvokeType;
5882 toNode.propagatedType = node.propagatedType; 5885 toNode.propagatedType = node.propagatedType;
5883 toNode.staticInvokeType = node.staticInvokeType; 5886 toNode.staticInvokeType = node.staticInvokeType;
5884 toNode.staticType = node.staticType; 5887 toNode.staticType = node.staticType;
5885 return true; 5888 return true;
5886 } 5889 }
5887 return false; 5890 return false;
5888 } 5891 }
(...skipping 1894 matching lines...) Expand 10 before | Expand all | Expand 10 after
7783 * Safely visit the given [token], printing the [suffix] after the token if it 7786 * Safely visit the given [token], printing the [suffix] after the token if it
7784 * is non-`null`. 7787 * is non-`null`.
7785 */ 7788 */
7786 void _visitTokenWithSuffix(Token token, String suffix) { 7789 void _visitTokenWithSuffix(Token token, String suffix) {
7787 if (token != null) { 7790 if (token != null) {
7788 _writer.print(token.lexeme); 7791 _writer.print(token.lexeme);
7789 _writer.print(suffix); 7792 _writer.print(suffix);
7790 } 7793 }
7791 } 7794 }
7792 } 7795 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/src/dart/ast/utilities_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698