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

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

Issue 11953048: Support 'implements' clause on typedef mixin applications. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge. Created 7 years, 11 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/listener.dart
diff --git a/sdk/lib/_internal/compiler/implementation/scanner/listener.dart b/sdk/lib/_internal/compiler/implementation/scanner/listener.dart
index 8f1b67529b608fda54b9c3e51ffc616e7e6b71ca..b74cc825137ee0f31b1fdf53d030dbe21a630ad3 100644
--- a/sdk/lib/_internal/compiler/implementation/scanner/listener.dart
+++ b/sdk/lib/_internal/compiler/implementation/scanner/listener.dart
@@ -172,7 +172,9 @@ class Listener {
void beginNamedMixinApplication(Token token) {
}
- void endNamedMixinApplication(Token typedefKeyword, Token endToken) {
+ void endNamedMixinApplication(Token typedefKeyword,
+ Token implementsKeyword,
+ Token endToken) {
}
void beginHide(Token hideKeyword) {
@@ -826,26 +828,30 @@ class ElementListener extends Listener {
rejectBuiltInIdentifier(name);
}
- void endNamedMixinApplication(Token typedefKeyword, Token endToken) {
+ void endNamedMixinApplication(Token typedefKeyword,
+ Token implementsKeyword,
+ Token endToken) {
+ NodeList interfaces = (implementsKeyword != null) ? popNode() : null;
MixinApplication mixinApplication = popNode();
+ Modifiers modifiers = popNode();
NodeList typeParameters = popNode();
Identifier name = popNode();
NamedMixinApplication namedMixinApplication = new NamedMixinApplication(
- name, typeParameters, mixinApplication, typedefKeyword, endToken);
+ name, typeParameters, modifiers, mixinApplication, interfaces,
+ typedefKeyword, endToken);
int id = idGenerator();
Element enclosing = compilationUnitElement;
pushElement(new MixinApplicationElementX(name.source, enclosing, id,
namedMixinApplication,
- mixinApplication.modifiers));
+ modifiers));
rejectBuiltInIdentifier(name);
}
void endMixinApplication() {
NodeList mixins = popNode();
TypeAnnotation superclass = popNode();
- Modifiers modifiers = popNode();
- pushNode(new MixinApplication(modifiers, superclass, mixins));
+ pushNode(new MixinApplication(superclass, mixins));
}
void handleVoidKeyword(Token token) {
@@ -1214,11 +1220,17 @@ class NodeListener extends ElementListener {
typedefKeyword, endToken));
}
- void endNamedMixinApplication(Token typedefKeyword, Token endToken) {
+ void endNamedMixinApplication(Token typedefKeyword,
+ Token implementsKeyword,
+ Token endToken) {
+ NodeList interfaces = (implementsKeyword != null) ? popNode() : null;
Node mixinApplication = popNode();
+ Modifiers modifiers = popNode();
NodeList typeParameters = popNode();
Identifier name = popNode();
- pushNode(new NamedMixinApplication(name, typeParameters, mixinApplication,
+ pushNode(new NamedMixinApplication(name, typeParameters,
+ modifiers, mixinApplication,
+ interfaces,
typedefKeyword, endToken));
}

Powered by Google App Engine
This is Rietveld 408576698