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

Side by Side Diff: pkg/analyzer/lib/src/fasta/ast_builder.dart

Issue 2994973002: Implement type variables on local function declarations and expressions. (Closed)
Patch Set: Update expectation files after adding copyright. Created 3 years, 4 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/summary/resynthesize_kernel_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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 fasta.analyzer.ast_builder; 5 library fasta.analyzer.ast_builder;
6 6
7 import 'package:analyzer/analyzer.dart'; 7 import 'package:analyzer/analyzer.dart';
8 import 'package:analyzer/dart/ast/ast_factory.dart' show AstFactory; 8 import 'package:analyzer/dart/ast/ast_factory.dart' show AstFactory;
9 import 'package:analyzer/dart/ast/standard_ast_factory.dart' as standard; 9 import 'package:analyzer/dart/ast/standard_ast_factory.dart' as standard;
10 import 'package:analyzer/dart/ast/token.dart' show Token, TokenType; 10 import 'package:analyzer/dart/ast/token.dart' show Token, TokenType;
(...skipping 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after
1523 1523
1524 @override 1524 @override
1525 void endNamedFunctionExpression(Token endToken) { 1525 void endNamedFunctionExpression(Token endToken) {
1526 logEvent("NamedFunctionExpression"); 1526 logEvent("NamedFunctionExpression");
1527 } 1527 }
1528 1528
1529 @override 1529 @override
1530 void endLocalFunctionDeclaration(Token token) { 1530 void endLocalFunctionDeclaration(Token token) {
1531 debugEvent("LocalFunctionDeclaration"); 1531 debugEvent("LocalFunctionDeclaration");
1532 FunctionBody body = pop(); 1532 FunctionBody body = pop();
1533 pop(); // constructor initializers 1533 if (isFullAst) {
1534 pop(); // separator before constructor initializers 1534 pop(); // constructor initializers
1535 pop(); // separator before constructor initializers
1536 }
1535 FormalParameterList parameters = pop(); 1537 FormalParameterList parameters = pop();
1536 SimpleIdentifier name = pop(); 1538 SimpleIdentifier name = pop();
1537 TypeAnnotation returnType = pop(); 1539 TypeAnnotation returnType = pop();
1538 pop(); // modifiers 1540 pop(); // modifiers
1539 TypeParameterList typeParameters = pop(); 1541 TypeParameterList typeParameters = pop();
1540 FunctionExpression functionExpression = 1542 FunctionExpression functionExpression =
1541 ast.functionExpression(typeParameters, parameters, body); 1543 ast.functionExpression(typeParameters, parameters, body);
1542 push(ast.functionDeclarationStatement(ast.functionDeclaration( 1544 push(ast.functionDeclarationStatement(ast.functionDeclaration(
1543 null, null, null, returnType, null, name, functionExpression))); 1545 null, null, null, returnType, null, name, functionExpression)));
1544 } 1546 }
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
2002 } else if (identical('var', s)) { 2004 } else if (identical('var', s)) {
2003 finalConstOrVarKeyword = token; 2005 finalConstOrVarKeyword = token;
2004 } else if (identical('covariant', s)) { 2006 } else if (identical('covariant', s)) {
2005 covariantKeyword = token; 2007 covariantKeyword = token;
2006 } else { 2008 } else {
2007 unhandled("$s", "modifier", token.charOffset, null); 2009 unhandled("$s", "modifier", token.charOffset, null);
2008 } 2010 }
2009 } 2011 }
2010 } 2012 }
2011 } 2013 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/resynthesize_kernel_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698