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

Unified Diff: pkg/front_end/lib/src/fasta/source/diet_parser.dart

Issue 2876813002: Implement generalized function types. (Closed)
Patch Set: Address comments. Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: pkg/front_end/lib/src/fasta/source/diet_parser.dart
diff --git a/pkg/front_end/lib/src/fasta/source/diet_parser.dart b/pkg/front_end/lib/src/fasta/source/diet_parser.dart
index 5f1cfa2404a917747618e8a6870114b8659aeefd..60a6189ffff72c49a09d7a375bcfb7f607cfac33 100644
--- a/pkg/front_end/lib/src/fasta/source/diet_parser.dart
+++ b/pkg/front_end/lib/src/fasta/source/diet_parser.dart
@@ -10,7 +10,7 @@ import '../parser/class_member_parser.dart' show ClassMemberParser;
import '../parser/listener.dart' show Listener;
-import '../parser/parser.dart' show optional;
+import '../parser/parser.dart' show MemberKind, optional;
import '../scanner/token.dart' show BeginGroupToken;
@@ -20,11 +20,11 @@ import '../../scanner/token.dart' show Token;
class DietParser extends ClassMemberParser {
DietParser(Listener listener) : super(listener);
- Token parseFormalParameters(Token token, {bool inFunctionType: false}) {
- return skipFormals(token);
+ Token parseFormalParameters(Token token, MemberKind kind) {
+ return skipFormals(token, kind);
}
- Token skipFormals(Token token) {
+ Token skipFormals(Token token, MemberKind kind) {
listener.beginOptionalFormalParameters(token);
if (!optional('(', token)) {
if (optional(';', token)) {
@@ -35,7 +35,7 @@ class DietParser extends ClassMemberParser {
}
BeginGroupToken beginGroupToken = token;
Token endToken = beginGroupToken.endGroup;
- listener.endFormalParameters(0, token, endToken);
+ listener.endFormalParameters(0, token, endToken, kind);
return endToken.next;
}
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/source/diet_listener.dart ('k') | pkg/front_end/lib/src/fasta/source/outline_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698