Chromium Code Reviews| Index: pkg/analyzer/lib/dart/ast/ast.dart |
| diff --git a/pkg/analyzer/lib/dart/ast/ast.dart b/pkg/analyzer/lib/dart/ast/ast.dart |
| index 598d6116c181de35f372ced023f6d874991cd3c9..0d07dd248f3e7332d677ac3f116617b4fa99e19c 100644 |
| --- a/pkg/analyzer/lib/dart/ast/ast.dart |
| +++ b/pkg/analyzer/lib/dart/ast/ast.dart |
| @@ -536,7 +536,7 @@ abstract class AstNode { |
| * (either AST nodes or tokens) that make up the contents of this node, |
| * including doc comments but excluding other comments. |
| */ |
| - Iterable /*<AstNode | Token>*/ get childEntities; |
| + Iterable/*<AstNode | Token>*/ get childEntities; |
| /** |
| * Return the offset of the character immediately following the last character |
| @@ -591,7 +591,7 @@ abstract class AstNode { |
| * Use the given [visitor] to visit this node. Return the value returned by |
| * the visitor as a result of visiting this node. |
| */ |
| - dynamic /* =E */ accept /*<E>*/ (AstVisitor /*<E>*/ visitor); |
| + dynamic /* =E */ accept/*<E>*/(AstVisitor/*<E>*/ visitor); |
| /** |
| * Return the most immediate ancestor of this node for which the [predicate] |
| @@ -3994,7 +3994,7 @@ abstract class FunctionExpression extends Expression { |
| * |
| * Clients may not extend, implement or mix-in this class. |
| */ |
| -abstract class FunctionExpressionInvocation extends Expression { |
| +abstract class FunctionExpressionInvocation extends InvocationExpression { |
| /** |
| * Initialize a newly created function expression invocation. |
| */ |
| @@ -4978,6 +4978,61 @@ abstract class InterpolationString extends InterpolationElement { |
| } |
| /** |
| + * Common interface for [FunctionExpressionInvocation] and [MethodInvocation]. |
| + */ |
| +abstract class InvocationExpression extends Expression { |
| + /** |
| + * The function type of the method invocation, or `null` if the AST |
| + * structure has not been resolved, or if the invoke could not be resolved. |
| + * |
| + * This will usually be a [FunctionType], but it can also be an |
| + * [InterfaceType] with a `call` method, `dynamic`, `Function`, or a `@proxy` |
| + * interface type that implements `Function`. |
| + */ |
| + DartType staticInvokeType; |
|
Leaf
2016/02/19 23:19:03
Sort fields?
Jennifer Messerly
2016/02/20 01:14:12
Hmm. I did sort, but I believe it puts fields befo
|
| + |
| + /** |
| + * Like [staticInvokeType], but reflects propagated type information. |
| + */ |
| + DartType propagatedInvokeType; |
| + |
| + /** |
| + * Return the list of arguments to the method. |
| + */ |
| + ArgumentList get argumentList; |
| + |
| + /** |
| + * Set the list of arguments to the method to the given [argumentList]. |
| + */ |
| + void set argumentList(ArgumentList argumentList); |
| + |
| + /** |
| + * The target of the invocation node. For example: |
| + * |
| + * (o.m)<TArgs>(args); // target will be `o.m` |
| + * o.m<TArgs>(args); // target will be `m` |
| + * |
| + * In either case, the [invocationTarget.staticType] will indicate the |
|
Leaf
2016/02/19 23:19:03
Not sure that "indicate" is right here? "be" or m
Jennifer Messerly
2016/02/20 01:14:12
Done.
|
| + * [staticInvokeType] before applying type arguments `TArgs`. Similarly, |
| + * [invocationTarget.propagatedType] will indicate the [propagatedInvokeType] |
| + * before applying type arguments `TArgs`. |
| + */ |
| + Expression get invocationTarget; |
| + |
| + /** |
| + * Return the type arguments to be applied to the method being invoked, or |
| + * `null` if no type arguments were provided. |
| + */ |
| + TypeArgumentList get typeArguments; |
| + |
| + /** |
| + * Set the type arguments to be applied to the method being invoked to the |
| + * given [typeArguments]. |
| + */ |
| + void set typeArguments(TypeArgumentList typeArguments); |
| +} |
| + |
| +/** |
| * An is expression. |
| * |
| * > isExpression ::= |
| @@ -5519,7 +5574,7 @@ abstract class MethodDeclaration extends ClassMember { |
| * |
| * Clients may not extend, implement or mix-in this class. |
| */ |
| -abstract class MethodInvocation extends Expression { |
| +abstract class MethodInvocation extends InvocationExpression { |
| /** |
| * Initialize a newly created method invocation. The [target] and [operator] |
| * can be `null` if there is no target. |