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

Unified Diff: sdk/lib/_internal/compiler/implementation/scanner/parser.dart

Issue 14907008: Remove support for interface in dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 7 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: sdk/lib/_internal/compiler/implementation/scanner/parser.dart
diff --git a/sdk/lib/_internal/compiler/implementation/scanner/parser.dart b/sdk/lib/_internal/compiler/implementation/scanner/parser.dart
index d5c6eb18dc553f77e8cbedfbfca527ea3aeef45f..2a6edb6f9ff5a209547f37c190e85752ca9d2deb 100644
--- a/sdk/lib/_internal/compiler/implementation/scanner/parser.dart
+++ b/sdk/lib/_internal/compiler/implementation/scanner/parser.dart
@@ -48,9 +48,7 @@ class Parser {
Token parseTopLevelDeclaration(Token token) {
token = parseMetadataStar(token);
final String value = token.stringValue;
- if (identical(value, 'interface')) {
- return parseInterface(token);
- } else if ((identical(value, 'abstract')) || (identical(value, 'class'))) {
+ if ((identical(value, 'abstract')) || (identical(value, 'class'))) {
return parseClass(token);
} else if (identical(value, 'typedef')) {
return parseTypedef(token);
@@ -235,31 +233,6 @@ class Parser {
return token;
}
- Token parseInterface(Token token) {
- Token interfaceKeyword = token;
- listener.beginInterface(token);
- token = parseIdentifier(token.next);
- token = parseTypeVariablesOpt(token);
- int supertypeCount = 0;
- Token extendsKeyword = null;
- if (optional('extends', token)) {
- extendsKeyword = token;
- do {
- token = parseType(token.next);
- ++supertypeCount;
- } while (optional(',', token));
- }
- token = parseDefaultClauseOpt(token);
- token = parseInterfaceBody(token);
- listener.endInterface(supertypeCount, interfaceKeyword,
- extendsKeyword, token);
- return token.next;
- }
-
- Token parseInterfaceBody(Token token) {
- return parseClassBody(token);
- }
-
Token parseTypedef(Token token) {
Token typedefKeyword = token;
if (optional('=', peekAfterType(token.next))) {
@@ -411,21 +384,6 @@ class Parser {
return false;
}
- Token parseDefaultClauseOpt(Token token) {
- if (isDefaultKeyword(token)) {
- // TODO(ahe): Remove support for 'factory' in this position.
- Token defaultKeyword = token;
- listener.beginDefaultClause(defaultKeyword);
- token = parseIdentifier(token.next);
- token = parseQualifiedRestOpt(token);
- token = parseTypeVariablesOpt(token);
- listener.endDefaultClause(defaultKeyword);
- } else {
- listener.handleNoDefaultClause(token);
- }
- return token;
- }
-
Token parseQualified(Token token) {
token = parseIdentifier(token);
while (optional('.', token)) {

Powered by Google App Engine
This is Rietveld 408576698