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

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

Issue 2667073004: 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 5682 matching lines...) Expand 10 before | Expand all | Expand 10 after
5693 * The type parameters for the function type, or `null` if the function type 5693 * The type parameters for the function type, or `null` if the function type
5694 * does not have any type parameters. 5694 * does not have any type parameters.
5695 */ 5695 */
5696 TypeParameterList _typeParameters; 5696 TypeParameterList _typeParameters;
5697 5697
5698 /** 5698 /**
5699 * The parameters associated with the function type. 5699 * The parameters associated with the function type.
5700 */ 5700 */
5701 FormalParameterList _parameters; 5701 FormalParameterList _parameters;
5702 5702
5703 @override
5704 DartType type;
5705
5703 /** 5706 /**
5704 * Initialize a newly created generic function type. 5707 * Initialize a newly created generic function type.
5705 */ 5708 */
5706 GenericFunctionTypeImpl( 5709 GenericFunctionTypeImpl(
5707 TypeAnnotationImpl returnType, 5710 TypeAnnotationImpl returnType,
5708 this.functionKeyword, 5711 this.functionKeyword,
5709 TypeParameterListImpl typeParameters, 5712 TypeParameterListImpl typeParameters,
5710 FormalParameterListImpl parameters) { 5713 FormalParameterListImpl parameters) {
5711 _returnType = _becomeParentOf(returnType); 5714 _returnType = _becomeParentOf(returnType);
5712 _typeParameters = _becomeParentOf(typeParameters); 5715 _typeParameters = _becomeParentOf(typeParameters);
(...skipping 23 matching lines...) Expand all
5736 } 5739 }
5737 5740
5738 @override 5741 @override
5739 TypeAnnotation get returnType => _returnType; 5742 TypeAnnotation get returnType => _returnType;
5740 5743
5741 @override 5744 @override
5742 void set returnType(TypeAnnotation type) { 5745 void set returnType(TypeAnnotation type) {
5743 _returnType = _becomeParentOf(type as AstNodeImpl); 5746 _returnType = _becomeParentOf(type as AstNodeImpl);
5744 } 5747 }
5745 5748
5746 @override
5747 DartType get type => null;
5748
5749 /** 5749 /**
5750 * Return the type parameters for the function type, or `null` if the function 5750 * Return the type parameters for the function type, or `null` if the function
5751 * type does not have any type parameters. 5751 * type does not have any type parameters.
5752 */ 5752 */
5753 TypeParameterList get typeParameters => _typeParameters; 5753 TypeParameterList get typeParameters => _typeParameters;
5754 5754
5755 /** 5755 /**
5756 * Set the type parameters for the function type to the given list of 5756 * Set the type parameters for the function type to the given list of
5757 * [typeParameters]. 5757 * [typeParameters].
5758 */ 5758 */
(...skipping 5709 matching lines...) Expand 10 before | Expand all | Expand 10 after
11468 11468
11469 @override 11469 @override
11470 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) => 11470 dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
11471 visitor.visitYieldStatement(this); 11471 visitor.visitYieldStatement(this);
11472 11472
11473 @override 11473 @override
11474 void visitChildren(AstVisitor visitor) { 11474 void visitChildren(AstVisitor visitor) {
11475 _expression?.accept(visitor); 11475 _expression?.accept(visitor);
11476 } 11476 }
11477 } 11477 }
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