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

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

Issue 2654653003: First step toward resolving generic function types (Closed)
Patch Set: Created 3 years, 10 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/lib/src/dart/element/type.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.ast; 5 library analyzer.src.dart.ast.ast;
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/syntactic_entity.dart'; 10 import 'package:analyzer/dart/ast/syntactic_entity.dart';
(...skipping 5681 matching lines...) Expand 10 before | Expand all | Expand 10 after
5692 * The type parameters for the function type, or `null` if the function type 5692 * The type parameters for the function type, or `null` if the function type
5693 * does not have any type parameters. 5693 * does not have any type parameters.
5694 */ 5694 */
5695 TypeParameterList _typeParameters; 5695 TypeParameterList _typeParameters;
5696 5696
5697 /** 5697 /**
5698 * The parameters associated with the function type. 5698 * The parameters associated with the function type.
5699 */ 5699 */
5700 FormalParameterList _parameters; 5700 FormalParameterList _parameters;
5701 5701
5702 @override
5703 DartType type;
5704
5702 /** 5705 /**
5703 * Initialize a newly created generic function type. 5706 * Initialize a newly created generic function type.
5704 */ 5707 */
5705 GenericFunctionTypeImpl( 5708 GenericFunctionTypeImpl(
5706 TypeAnnotationImpl returnType, 5709 TypeAnnotationImpl returnType,
5707 this.functionKeyword, 5710 this.functionKeyword,
5708 TypeParameterListImpl typeParameters, 5711 TypeParameterListImpl typeParameters,
5709 FormalParameterListImpl parameters) { 5712 FormalParameterListImpl parameters) {
5710 _returnType = _becomeParentOf(returnType); 5713 _returnType = _becomeParentOf(returnType);
5711 _typeParameters = _becomeParentOf(typeParameters); 5714 _typeParameters = _becomeParentOf(typeParameters);
(...skipping 23 matching lines...) Expand all
5735 } 5738 }
5736 5739
5737 @override 5740 @override
5738 TypeAnnotation get returnType => _returnType; 5741 TypeAnnotation get returnType => _returnType;
5739 5742
5740 @override 5743 @override
5741 void set returnType(TypeAnnotation type) { 5744 void set returnType(TypeAnnotation type) {
5742 _returnType = _becomeParentOf(type as AstNodeImpl); 5745 _returnType = _becomeParentOf(type as AstNodeImpl);
5743 } 5746 }
5744 5747
5745 @override
5746 DartType get type => null;
5747
5748 /** 5748 /**
5749 * Return the type parameters for the function type, or `null` if the function 5749 * Return the type parameters for the function type, or `null` if the function
5750 * type does not have any type parameters. 5750 * type does not have any type parameters.
5751 */ 5751 */
5752 TypeParameterList get typeParameters => _typeParameters; 5752 TypeParameterList get typeParameters => _typeParameters;
5753 5753
5754 /** 5754 /**
5755 * Set the type parameters for the function type to the given list of 5755 * Set the type parameters for the function type to the given list of
5756 * [typeParameters]. 5756 * [typeParameters].
5757 */ 5757 */
(...skipping 5709 matching lines...) Expand 10 before | Expand all | Expand 10 after
11467 11467
11468 @override 11468 @override
11469 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => 11469 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
11470 visitor.visitYieldStatement(this); 11470 visitor.visitYieldStatement(this);
11471 11471
11472 @override 11472 @override
11473 void visitChildren(AstVisitor visitor) { 11473 void visitChildren(AstVisitor visitor) {
11474 _expression?.accept(visitor); 11474 _expression?.accept(visitor);
11475 } 11475 }
11476 } 11476 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/element/type.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698