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

Unified Diff: pkg/compiler/lib/src/parser/element_listener.dart

Issue 2638063003: Reverts the following two commits: (Closed)
Patch Set: Created 3 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
« no previous file with comments | « pkg/compiler/lib/src/native/behavior.dart ('k') | pkg/compiler/lib/src/parser/listener.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/parser/element_listener.dart
diff --git a/pkg/compiler/lib/src/parser/element_listener.dart b/pkg/compiler/lib/src/parser/element_listener.dart
index 1c031aaec3e88b7b03aa53ab1314af2a84e0b0db..5c058ee73318ec6827dc3b4f96811f6d2f68c51e 100644
--- a/pkg/compiler/lib/src/parser/element_listener.dart
+++ b/pkg/compiler/lib/src/parser/element_listener.dart
@@ -260,17 +260,10 @@ class ElementListener extends Listener {
}
}
- void endTypedef(Token typedefKeyword, Token equals, Token endToken) {
- Identifier name;
- if (equals == null) {
- popNode(); // TODO(karlklose): do not throw away typeVariables.
- name = popNode();
- popNode(); // returnType
- } else {
- popNode(); // Function type.
- popNode(); // TODO(karlklose): do not throw away typeVariables.
- name = popNode();
- }
+ void endFunctionTypeAlias(Token typedefKeyword, Token endToken) {
+ popNode(); // TODO(karlklose): do not throw away typeVariables.
+ Identifier name = popNode();
+ popNode(); // returnType
pushElement(new PartialTypedefElement(
name.source, compilationUnitElement, typedefKeyword, endToken));
rejectBuiltInIdentifier(name);
@@ -301,12 +294,12 @@ class ElementListener extends Listener {
void endMixinApplication() {
NodeList mixins = popNode();
- NominalTypeAnnotation superclass = popNode();
+ TypeAnnotation superclass = popNode();
pushNode(new MixinApplication(superclass, mixins));
}
void handleVoidKeyword(Token token) {
- pushNode(new NominalTypeAnnotation(new Identifier(token), null));
+ pushNode(new TypeAnnotation(new Identifier(token), null));
}
void endTopLevelMethod(Token beginToken, Token getOrSet, Token endToken) {
@@ -373,7 +366,7 @@ class ElementListener extends Listener {
}
void endTypeVariable(Token token, Token extendsOrSuper) {
- NominalTypeAnnotation bound = popNode();
+ TypeAnnotation bound = popNode();
Identifier name = popNode();
pushNode(new TypeVariable(name, extendsOrSuper, bound));
rejectBuiltInIdentifier(name);
@@ -398,17 +391,7 @@ class ElementListener extends Listener {
void endType(Token beginToken, Token endToken) {
NodeList typeArguments = popNode();
Expression typeName = popNode();
- pushNode(new NominalTypeAnnotation(typeName, typeArguments));
- }
-
- void handleNoName(Token token) {
- pushNode(null);
- }
-
- void endFunctionType(Token functionToken, Token endToken) {
- popNode(); // Type parameters.
- popNode(); // Return type.
- pushNode(null);
+ pushNode(new TypeAnnotation(typeName, typeArguments));
}
void handleParenthesizedExpression(BeginGroupToken token) {
« no previous file with comments | « pkg/compiler/lib/src/native/behavior.dart ('k') | pkg/compiler/lib/src/parser/listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698