| OLD | NEW |
| 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' as analyzer show Token; | 10 import 'package:analyzer/dart/ast/token.dart' as analyzer show Token; |
| (...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 void handleValuedFormalParameter(Token equals, Token token) { | 765 void handleValuedFormalParameter(Token equals, Token token) { |
| 766 debugEvent("ValuedFormalParameter"); | 766 debugEvent("ValuedFormalParameter"); |
| 767 Expression value = pop(); | 767 Expression value = pop(); |
| 768 push(new _ParameterDefaultValue(equals, value)); | 768 push(new _ParameterDefaultValue(equals, value)); |
| 769 } | 769 } |
| 770 | 770 |
| 771 @override | 771 @override |
| 772 void endFunctionType(Token functionToken, Token semicolon) { | 772 void endFunctionType(Token functionToken, Token semicolon) { |
| 773 debugEvent("FunctionType"); | 773 debugEvent("FunctionType"); |
| 774 FormalParameterList parameters = pop(); | 774 FormalParameterList parameters = pop(); |
| 775 TypeAnnotation returnType = pop(); |
| 775 TypeParameterList typeParameters = pop(); | 776 TypeParameterList typeParameters = pop(); |
| 776 TypeAnnotation returnType = pop(); | |
| 777 push(ast.genericFunctionType( | 777 push(ast.genericFunctionType( |
| 778 returnType, functionToken, typeParameters, parameters)); | 778 returnType, functionToken, typeParameters, parameters)); |
| 779 } | 779 } |
| 780 | 780 |
| 781 void handleFormalParameterWithoutValue(Token token) { | 781 void handleFormalParameterWithoutValue(Token token) { |
| 782 debugEvent("FormalParameterWithoutValue"); | 782 debugEvent("FormalParameterWithoutValue"); |
| 783 push(NullValue.ParameterDefaultValue); | 783 push(NullValue.ParameterDefaultValue); |
| 784 } | 784 } |
| 785 | 785 |
| 786 @override | 786 @override |
| (...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2039 } else if (identical('var', s)) { | 2039 } else if (identical('var', s)) { |
| 2040 finalConstOrVarKeyword = token; | 2040 finalConstOrVarKeyword = token; |
| 2041 } else if (identical('covariant', s)) { | 2041 } else if (identical('covariant', s)) { |
| 2042 covariantKeyword = token; | 2042 covariantKeyword = token; |
| 2043 } else { | 2043 } else { |
| 2044 internalError('Unhandled modifier: $s'); | 2044 internalError('Unhandled modifier: $s'); |
| 2045 } | 2045 } |
| 2046 } | 2046 } |
| 2047 } | 2047 } |
| 2048 } | 2048 } |
| OLD | NEW |