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

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

Issue 1039713002: Rename MethodInvocation.period to MethodInvocation.operator. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/parser.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 // 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 1414 matching lines...) Expand 10 before | Expand all | Expand 10 after
1425 MethodDeclaration visitMethodDeclaration(MethodDeclaration node) => 1425 MethodDeclaration visitMethodDeclaration(MethodDeclaration node) =>
1426 new MethodDeclaration(cloneNode(node.documentationComment), 1426 new MethodDeclaration(cloneNode(node.documentationComment),
1427 cloneNodeList(node.metadata), cloneToken(node.externalKeyword), 1427 cloneNodeList(node.metadata), cloneToken(node.externalKeyword),
1428 cloneToken(node.modifierKeyword), cloneNode(node.returnType), 1428 cloneToken(node.modifierKeyword), cloneNode(node.returnType),
1429 cloneToken(node.propertyKeyword), cloneToken(node.operatorKeyword), 1429 cloneToken(node.propertyKeyword), cloneToken(node.operatorKeyword),
1430 cloneNode(node.name), cloneNode(node.parameters), 1430 cloneNode(node.name), cloneNode(node.parameters),
1431 cloneNode(node.body)); 1431 cloneNode(node.body));
1432 1432
1433 @override 1433 @override
1434 MethodInvocation visitMethodInvocation(MethodInvocation node) => 1434 MethodInvocation visitMethodInvocation(MethodInvocation node) =>
1435 new MethodInvocation(cloneNode(node.target), cloneToken(node.period), 1435 new MethodInvocation(cloneNode(node.target), cloneToken(node.operator),
1436 cloneNode(node.methodName), cloneNode(node.argumentList)); 1436 cloneNode(node.methodName), cloneNode(node.argumentList));
1437 1437
1438 @override 1438 @override
1439 NamedExpression visitNamedExpression(NamedExpression node) => 1439 NamedExpression visitNamedExpression(NamedExpression node) =>
1440 new NamedExpression(cloneNode(node.name), cloneNode(node.expression)); 1440 new NamedExpression(cloneNode(node.name), cloneNode(node.expression));
1441 1441
1442 @override 1442 @override
1443 AstNode visitNativeClause(NativeClause node) => 1443 AstNode visitNativeClause(NativeClause node) =>
1444 new NativeClause(cloneToken(node.nativeKeyword), cloneNode(node.name)); 1444 new NativeClause(cloneToken(node.nativeKeyword), cloneNode(node.name));
1445 1445
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after
2316 isEqualTokens(node.propertyKeyword, other.propertyKeyword) && 2316 isEqualTokens(node.propertyKeyword, other.propertyKeyword) &&
2317 isEqualNodes(node.name, other.name) && 2317 isEqualNodes(node.name, other.name) &&
2318 isEqualNodes(node.parameters, other.parameters) && 2318 isEqualNodes(node.parameters, other.parameters) &&
2319 isEqualNodes(node.body, other.body); 2319 isEqualNodes(node.body, other.body);
2320 } 2320 }
2321 2321
2322 @override 2322 @override
2323 bool visitMethodInvocation(MethodInvocation node) { 2323 bool visitMethodInvocation(MethodInvocation node) {
2324 MethodInvocation other = _other as MethodInvocation; 2324 MethodInvocation other = _other as MethodInvocation;
2325 return isEqualNodes(node.target, other.target) && 2325 return isEqualNodes(node.target, other.target) &&
2326 isEqualTokens(node.period, other.period) && 2326 isEqualTokens(node.operator, other.operator) &&
2327 isEqualNodes(node.methodName, other.methodName) && 2327 isEqualNodes(node.methodName, other.methodName) &&
2328 isEqualNodes(node.argumentList, other.argumentList); 2328 isEqualNodes(node.argumentList, other.argumentList);
2329 } 2329 }
2330 2330
2331 @override 2331 @override
2332 bool visitNamedExpression(NamedExpression node) { 2332 bool visitNamedExpression(NamedExpression node) {
2333 NamedExpression other = _other as NamedExpression; 2333 NamedExpression other = _other as NamedExpression;
2334 return isEqualNodes(node.name, other.name) && 2334 return isEqualNodes(node.name, other.name) &&
2335 isEqualNodes(node.expression, other.expression); 2335 isEqualNodes(node.expression, other.expression);
2336 } 2336 }
(...skipping 7625 matching lines...) Expand 10 before | Expand all | Expand 10 after
9962 new MethodDeclaration(_cloneNode(node.documentationComment), 9962 new MethodDeclaration(_cloneNode(node.documentationComment),
9963 _cloneNodeList(node.metadata), _mapToken(node.externalKeyword), 9963 _cloneNodeList(node.metadata), _mapToken(node.externalKeyword),
9964 _mapToken(node.modifierKeyword), _cloneNode(node.returnType), 9964 _mapToken(node.modifierKeyword), _cloneNode(node.returnType),
9965 _mapToken(node.propertyKeyword), _mapToken(node.operatorKeyword), 9965 _mapToken(node.propertyKeyword), _mapToken(node.operatorKeyword),
9966 _cloneNode(node.name), _cloneNode(node.parameters), 9966 _cloneNode(node.name), _cloneNode(node.parameters),
9967 _cloneNode(node.body)); 9967 _cloneNode(node.body));
9968 9968
9969 @override 9969 @override
9970 MethodInvocation visitMethodInvocation(MethodInvocation node) { 9970 MethodInvocation visitMethodInvocation(MethodInvocation node) {
9971 MethodInvocation copy = new MethodInvocation(_cloneNode(node.target), 9971 MethodInvocation copy = new MethodInvocation(_cloneNode(node.target),
9972 _mapToken(node.period), _cloneNode(node.methodName), 9972 _mapToken(node.operator), _cloneNode(node.methodName),
9973 _cloneNode(node.argumentList)); 9973 _cloneNode(node.argumentList));
9974 copy.propagatedType = node.propagatedType; 9974 copy.propagatedType = node.propagatedType;
9975 copy.staticType = node.staticType; 9975 copy.staticType = node.staticType;
9976 return copy; 9976 return copy;
9977 } 9977 }
9978 9978
9979 @override 9979 @override
9980 NamedExpression visitNamedExpression(NamedExpression node) { 9980 NamedExpression visitNamedExpression(NamedExpression node) {
9981 NamedExpression copy = 9981 NamedExpression copy =
9982 new NamedExpression(_cloneNode(node.name), _cloneNode(node.expression)); 9982 new NamedExpression(_cloneNode(node.name), _cloneNode(node.expression));
(...skipping 1770 matching lines...) Expand 10 before | Expand all | Expand 10 after
11753 * > ([Expression] '.')? [SimpleIdentifier] [ArgumentList] 11753 * > ([Expression] '.')? [SimpleIdentifier] [ArgumentList]
11754 */ 11754 */
11755 class MethodInvocation extends Expression { 11755 class MethodInvocation extends Expression {
11756 /** 11756 /**
11757 * The expression producing the object on which the method is defined, or 11757 * The expression producing the object on which the method is defined, or
11758 * `null` if there is no target (that is, the target is implicitly `this`). 11758 * `null` if there is no target (that is, the target is implicitly `this`).
11759 */ 11759 */
11760 Expression _target; 11760 Expression _target;
11761 11761
11762 /** 11762 /**
11763 * The period that separates the target from the method name, or `null` if 11763 * The period that separates the target from the method name in an ordinary
Brian Wilkerson 2015/03/27 16:26:24 I'd prefer the following (because it will expand t
Paul Berry 2015/03/27 16:38:57 Done.
11764 * there is no target. 11764 * method invocation, or the `..` operator before the method name in a
11765 * cascade section, or `null` if there is no target.
11765 */ 11766 */
11766 Token period; 11767 Token operator;
11767 11768
11768 /** 11769 /**
11769 * The name of the method being invoked. 11770 * The name of the method being invoked.
11770 */ 11771 */
11771 SimpleIdentifier _methodName; 11772 SimpleIdentifier _methodName;
11772 11773
11773 /** 11774 /**
11774 * The list of arguments to the method. 11775 * The list of arguments to the method.
11775 */ 11776 */
11776 ArgumentList _argumentList; 11777 ArgumentList _argumentList;
11777 11778
11778 /** 11779 /**
11779 * Initialize a newly created method invocation. The [target] and [period] can 11780 * Initialize a newly created method invocation. The [target] and [operator]
11780 * be `null` if there is no target. 11781 * can be `null` if there is no target.
11781 */ 11782 */
11782 MethodInvocation(Expression target, this.period, SimpleIdentifier methodName, 11783 MethodInvocation(Expression target, this.operator,
11783 ArgumentList argumentList) { 11784 SimpleIdentifier methodName, ArgumentList argumentList) {
11784 _target = _becomeParentOf(target); 11785 _target = _becomeParentOf(target);
11785 _methodName = _becomeParentOf(methodName); 11786 _methodName = _becomeParentOf(methodName);
11786 _argumentList = _becomeParentOf(argumentList); 11787 _argumentList = _becomeParentOf(argumentList);
11787 } 11788 }
11788 11789
11789 /** 11790 /**
11790 * Return the list of arguments to the method. 11791 * Return the list of arguments to the method.
11791 */ 11792 */
11792 ArgumentList get argumentList => _argumentList; 11793 ArgumentList get argumentList => _argumentList;
11793 11794
11794 /** 11795 /**
11795 * Set the list of arguments to the method to the given [argumentList]. 11796 * Set the list of arguments to the method to the given [argumentList].
11796 */ 11797 */
11797 void set argumentList(ArgumentList argumentList) { 11798 void set argumentList(ArgumentList argumentList) {
11798 _argumentList = _becomeParentOf(argumentList); 11799 _argumentList = _becomeParentOf(argumentList);
11799 } 11800 }
11800 11801
11801 @override 11802 @override
11802 Token get beginToken { 11803 Token get beginToken {
11803 if (_target != null) { 11804 if (_target != null) {
11804 return _target.beginToken; 11805 return _target.beginToken;
11805 } else if (period != null) { 11806 } else if (operator != null) {
11806 return period; 11807 return operator;
11807 } 11808 }
11808 return _methodName.beginToken; 11809 return _methodName.beginToken;
11809 } 11810 }
11810 11811
11811 @override 11812 @override
11812 Iterable get childEntities => new ChildEntities() 11813 Iterable get childEntities => new ChildEntities()
11813 ..add(_target) 11814 ..add(_target)
11814 ..add(period) 11815 ..add(operator)
11815 ..add(_methodName) 11816 ..add(_methodName)
11816 ..add(_argumentList); 11817 ..add(_argumentList);
11817 11818
11818 @override 11819 @override
11819 Token get endToken => _argumentList.endToken; 11820 Token get endToken => _argumentList.endToken;
11820 11821
11821 /** 11822 /**
11822 * Return `true` if this expression is cascaded. If it is, then the target of 11823 * Return `true` if this expression is cascaded. If it is, then the target of
11823 * this expression is not stored locally but is stored in the nearest ancestor 11824 * this expression is not stored locally but is stored in the nearest ancestor
11824 * that is a [CascadeExpression]. 11825 * that is a [CascadeExpression].
11825 */ 11826 */
11826 bool get isCascaded => 11827 bool get isCascaded =>
11827 period != null && period.type == TokenType.PERIOD_PERIOD; 11828 operator != null && operator.type == TokenType.PERIOD_PERIOD;
11828 11829
11829 /** 11830 /**
11830 * Return the name of the method being invoked. 11831 * Return the name of the method being invoked.
11831 */ 11832 */
11832 SimpleIdentifier get methodName => _methodName; 11833 SimpleIdentifier get methodName => _methodName;
11833 11834
11834 /** 11835 /**
11835 * Set the name of the method being invoked to the given [identifier]. 11836 * Set the name of the method being invoked to the given [identifier].
11836 */ 11837 */
11837 void set methodName(SimpleIdentifier identifier) { 11838 void set methodName(SimpleIdentifier identifier) {
11838 _methodName = _becomeParentOf(identifier); 11839 _methodName = _becomeParentOf(identifier);
11839 } 11840 }
11840 11841
11842 /**
11843 * The period that separates the target from the method name in an ordinary
11844 * method invocation, or the `..` operator before the method name in a
11845 * cascade section, or `null` if there is no target.
11846 *
11847 * Deprecated: use [operator] instead.
11848 */
11849 @deprecated
11850 Token get period => operator;
11851
11852 /**
11853 * The period that separates the target from the method name in an ordinary
11854 * method invocation, or the `..` operator before the method name in a
11855 * cascade section, or `null` if there is no target.
11856 *
11857 * Deprecated: use [operator] instead.
11858 */
11859 @deprecated
11860 void set period(Token value) {
11861 operator = value;
11862 }
11863
11841 @override 11864 @override
11842 int get precedence => 15; 11865 int get precedence => 15;
11843 11866
11844 /** 11867 /**
11845 * Return the expression used to compute the receiver of the invocation. If 11868 * Return the expression used to compute the receiver of the invocation. If
11846 * this invocation is not part of a cascade expression, then this is the same 11869 * this invocation is not part of a cascade expression, then this is the same
11847 * as [target]. If this invocation is part of a cascade expression, then the 11870 * as [target]. If this invocation is part of a cascade expression, then the
11848 * target stored with the cascade expression is returned. 11871 * target stored with the cascade expression is returned.
11849 */ 11872 */
11850 Expression get realTarget { 11873 Expression get realTarget {
(...skipping 8207 matching lines...) Expand 10 before | Expand all | Expand 10 after
20058 } 20081 }
20059 20082
20060 @override 20083 @override
20061 accept(AstVisitor visitor) => visitor.visitYieldStatement(this); 20084 accept(AstVisitor visitor) => visitor.visitYieldStatement(this);
20062 20085
20063 @override 20086 @override
20064 void visitChildren(AstVisitor visitor) { 20087 void visitChildren(AstVisitor visitor) {
20065 _safelyVisitChild(_expression, visitor); 20088 _safelyVisitChild(_expression, visitor);
20066 } 20089 }
20067 } 20090 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698