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

Unified Diff: pkg/compiler/lib/src/parser/partial_elements.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/compiler/lib/src/parser/partial_elements.dart
diff --git a/pkg/compiler/lib/src/parser/partial_elements.dart b/pkg/compiler/lib/src/parser/partial_elements.dart
index 26631eaf2b6f70c39b8f736a0048a5774b181421..40b266aa8f614eaf86bd8297a071316b89aa6fbb 100644
--- a/pkg/compiler/lib/src/parser/partial_elements.dart
+++ b/pkg/compiler/lib/src/parser/partial_elements.dart
@@ -35,15 +35,15 @@ import 'package:front_end/src/fasta/scanner.dart' show Token;
import 'package:front_end/src/fasta/scanner.dart' as Tokens show EOF_TOKEN;
import '../tree/tree.dart';
import 'package:front_end/src/fasta/parser.dart'
- show ClassMemberParser, Listener, Parser, ParserError;
+ show ClassMemberParser, Listener, MemberKind, Parser, ParserError;
import 'member_listener.dart' show MemberListener;
import 'node_listener.dart' show NodeListener;
class ClassElementParser extends ClassMemberParser {
ClassElementParser(Listener listener) : super(listener);
- Token parseFormalParameters(Token token, {bool inFunctionType: false}) {
- return skipFormalParameters(token);
+ Token parseFormalParameters(Token token, MemberKind kind) {
+ return skipFormalParameters(token, kind);
}
}
@@ -95,8 +95,10 @@ abstract class PartialFunctionMixin implements BaseFunctionElementX {
parseFunction(Parser p) {
if (isClassMember && modifiers.isFactory) {
p.parseFactoryMethod(beginToken);
+ } else if (isClassMember) {
+ p.parseMember(beginToken);
} else {
- p.parseFunction(beginToken, getOrSet);
+ p.parseTopLevelMember(beginToken);
}
}
« no previous file with comments | « pkg/compiler/lib/src/parser/node_listener.dart ('k') | pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698