| 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.outline_builder; | 5 library fasta.outline_builder; |
| 6 | 6 |
| 7 import 'package:kernel/ast.dart' show AsyncMarker, ProcedureKind; | 7 import 'package:kernel/ast.dart' show AsyncMarker, ProcedureKind; |
| 8 | 8 |
| 9 import '../fasta_codes.dart' show FastaMessage, codeExpectedBlockToSkip; | 9 import '../fasta_codes.dart' show FastaMessage, codeExpectedBlockToSkip; |
| 10 | 10 |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 @override | 503 @override |
| 504 void handleFormalParameterWithoutValue(Token token) { | 504 void handleFormalParameterWithoutValue(Token token) { |
| 505 debugEvent("FormalParameterWithoutValue"); | 505 debugEvent("FormalParameterWithoutValue"); |
| 506 // Ignored for now. | 506 // Ignored for now. |
| 507 } | 507 } |
| 508 | 508 |
| 509 @override | 509 @override |
| 510 void endFunctionTypedFormalParameter( | 510 void endFunctionTypedFormalParameter( |
| 511 Token covariantKeyword, Token thisKeyword, FormalParameterType kind) { | 511 Token covariantKeyword, Token thisKeyword, FormalParameterType kind) { |
| 512 debugEvent("FunctionTypedFormalParameter"); | 512 debugEvent("FunctionTypedFormalParameter"); |
| 513 pop(); // Function type parameters. | 513 List<FormalParameterBuilder> formals = pop(); |
| 514 pop(); // Formals offset | 514 int formalsOffset = pop(); |
| 515 pop(); // Type variables. | 515 List<TypeVariableBuilder> typeVariables = pop(); |
| 516 int charOffset = pop(); | 516 int charOffset = pop(); |
| 517 String name = pop(); | 517 String name = pop(); |
| 518 pop(); // Return type. | 518 TypeBuilder returnType = pop(); |
| 519 push(NullValue.Type); | 519 push(library.addFunctionType( |
| 520 returnType, typeVariables, formals, formalsOffset)); |
| 520 push(name); | 521 push(name); |
| 521 push(charOffset); | 522 push(charOffset); |
| 522 } | 523 } |
| 523 | 524 |
| 524 @override | 525 @override |
| 525 void endOptionalFormalParameters( | 526 void endOptionalFormalParameters( |
| 526 int count, Token beginToken, Token endToken) { | 527 int count, Token beginToken, Token endToken) { |
| 527 debugEvent("OptionalFormalParameters"); | 528 debugEvent("OptionalFormalParameters"); |
| 528 FormalParameterType kind = optional("{", beginToken) | 529 FormalParameterType kind = optional("{", beginToken) |
| 529 ? FormalParameterType.NAMED | 530 ? FormalParameterType.NAMED |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 Link<Token> handleMemberName(Link<Token> identifiers) { | 818 Link<Token> handleMemberName(Link<Token> identifiers) { |
| 818 if (!isDartLibrary || identifiers.isEmpty) return identifiers; | 819 if (!isDartLibrary || identifiers.isEmpty) return identifiers; |
| 819 return removeNativeClause(identifiers); | 820 return removeNativeClause(identifiers); |
| 820 } | 821 } |
| 821 | 822 |
| 822 @override | 823 @override |
| 823 void debugEvent(String name) { | 824 void debugEvent(String name) { |
| 824 // printEvent(name); | 825 // printEvent(name); |
| 825 } | 826 } |
| 826 } | 827 } |
| OLD | NEW |