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

Side by Side Diff: pkg/compiler/lib/src/parser/node_listener.dart

Issue 2567943003: Remove support for mixin typedefs in dart2js. (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js.parser.node_listener; 5 library dart2js.parser.node_listener;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../elements/elements.dart' show CompilationUnitElement; 8 import '../elements/elements.dart' show CompilationUnitElement;
9 import '../native/native.dart' as native; 9 import '../native/native.dart' as native;
10 import '../tokens/precedence_constants.dart' as Precedence show INDEX_INFO; 10 import '../tokens/precedence_constants.dart' as Precedence show INDEX_INFO;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 Identifier name = popNode(); 121 Identifier name = popNode();
122 TypeAnnotation returnType = popNode(); 122 TypeAnnotation returnType = popNode();
123 pushNode(new Typedef( 123 pushNode(new Typedef(
124 returnType, name, typeParameters, formals, typedefKeyword, endToken)); 124 returnType, name, typeParameters, formals, typedefKeyword, endToken));
125 } 125 }
126 126
127 void endNamedMixinApplication( 127 void endNamedMixinApplication(
128 Token classKeyword, Token implementsKeyword, Token endToken) { 128 Token classKeyword, Token implementsKeyword, Token endToken) {
129 NodeList interfaces = (implementsKeyword != null) ? popNode() : null; 129 NodeList interfaces = (implementsKeyword != null) ? popNode() : null;
130 Node mixinApplication = popNode(); 130 Node mixinApplication = popNode();
131 Modifiers modifiers = popNode();
132 NodeList typeParameters = popNode(); 131 NodeList typeParameters = popNode();
133 Identifier name = popNode(); 132 Identifier name = popNode();
133 Modifiers modifiers = popNode();
134 pushNode(new NamedMixinApplication(name, typeParameters, modifiers, 134 pushNode(new NamedMixinApplication(name, typeParameters, modifiers,
135 mixinApplication, interfaces, classKeyword, endToken)); 135 mixinApplication, interfaces, classKeyword, endToken));
136 } 136 }
137 137
138 void endEnum(Token enumKeyword, Token endBrace, int count) { 138 void endEnum(Token enumKeyword, Token endBrace, int count) {
139 NodeList names = makeNodeList(count, enumKeyword.next.next, endBrace, ","); 139 NodeList names = makeNodeList(count, enumKeyword.next.next, endBrace, ",");
140 Identifier name = popNode(); 140 Identifier name = popNode();
141 pushNode(new Enum(enumKeyword, name, names)); 141 pushNode(new Enum(enumKeyword, name, names));
142 } 142 }
143 143
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 void log(message) { 864 void log(message) {
865 reporter.log(message); 865 reporter.log(message);
866 } 866 }
867 867
868 void internalError({Token token, Node node}) { 868 void internalError({Token token, Node node}) {
869 // TODO(ahe): This should call reporter.internalError. 869 // TODO(ahe): This should call reporter.internalError.
870 Spannable spannable = (token == null) ? node : token; 870 Spannable spannable = (token == null) ? node : token;
871 throw new SpannableAssertionFailure(spannable, 'Internal error in parser.'); 871 throw new SpannableAssertionFailure(spannable, 'Internal error in parser.');
872 } 872 }
873 } 873 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/parser/element_listener.dart ('k') | pkg/compiler/lib/src/parser/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698