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 48f3b8a17a9a98465b66a82831df3e81721f2b39..fba08ae848334263451c1c95191b7e5109e108d8 100644 |
--- a/pkg/compiler/lib/src/parser/element_listener.dart |
+++ b/pkg/compiler/lib/src/parser/element_listener.dart |
@@ -287,18 +287,10 @@ class ElementListener extends Listener { |
} |
@override |
- void endFunctionTypeAlias( |
- 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); |
@@ -332,13 +324,13 @@ class ElementListener extends Listener { |
@override |
void endMixinApplication() { |
NodeList mixins = popNode(); |
- NominalTypeAnnotation superclass = popNode(); |
+ TypeAnnotation superclass = popNode(); |
pushNode(new MixinApplication(superclass, mixins)); |
} |
@override |
void handleVoidKeyword(Token token) { |
- pushNode(new NominalTypeAnnotation(new Identifier(token), null)); |
+ pushNode(new TypeAnnotation(new Identifier(token), null)); |
} |
@override |
@@ -411,7 +403,7 @@ class ElementListener extends Listener { |
@override |
void endTypeVariable(Token token, Token extendsOrSuper) { |
- NominalTypeAnnotation bound = popNode(); |
+ TypeAnnotation bound = popNode(); |
Identifier name = popNode(); |
pushNode(new TypeVariable(name, extendsOrSuper, bound)); |
rejectBuiltInIdentifier(name); |
@@ -438,21 +430,10 @@ class ElementListener extends Listener { |
} |
@override |
- void handleType(Token beginToken, Token endToken) { |
+ void endType(Token beginToken, Token endToken) { |
NodeList typeArguments = popNode(); |
Expression typeName = popNode(); |
- pushNode(new NominalTypeAnnotation(typeName, typeArguments)); |
- } |
- |
- void handleNoName(Token token) { |
- pushNode(null); |
- } |
- |
- @override |
- void handleFunctionType(Token functionToken, Token endToken) { |
- popNode(); // Type parameters. |
- popNode(); // Return type. |
- pushNode(null); |
+ pushNode(new TypeAnnotation(typeName, typeArguments)); |
} |
@override |
@@ -651,10 +632,6 @@ class ElementListener extends Listener { |
errorCode = MessageKind.BAD_INPUT_CHARACTER; |
break; |
- case ErrorKind.InvalidInlineFunctionType: |
- errorCode = MessageKind.INVALID_INLINE_FUNCTION_TYPE; |
- break; |
- |
case ErrorKind.InvalidSyncModifier: |
errorCode = MessageKind.INVALID_SYNC_MODIFIER; |
break; |