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

Side by Side Diff: pkg/front_end/lib/src/fasta/source/outline_builder.dart

Issue 2705333002: Pass 'classKeyword' to endClassDeclaratio() and endNamedMixinApplication(). (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 fasta.outline_builder; 5 library fasta.outline_builder;
6 6
7 import 'package:kernel/ast.dart' show 7 import 'package:kernel/ast.dart' show
8 AsyncMarker, 8 AsyncMarker,
9 ProcedureKind; 9 ProcedureKind;
10 10
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 library.metadata = metadata; 197 library.metadata = metadata;
198 } 198 }
199 199
200 @override 200 @override
201 void beginClassDeclaration(Token begin, Token name) { 201 void beginClassDeclaration(Token begin, Token name) {
202 library.beginNestedDeclaration(name.value); 202 library.beginNestedDeclaration(name.value);
203 } 203 }
204 204
205 @override 205 @override
206 void endClassDeclaration(int interfacesCount, Token beginToken, 206 void endClassDeclaration(int interfacesCount, Token beginToken,
207 Token extendsKeyword, Token implementsKeyword, Token endToken) { 207 Token classKeyword, Token extendsKeyword, Token implementsKeyword,
208 Token endToken) {
208 debugEvent("endClassDeclaration"); 209 debugEvent("endClassDeclaration");
209 List<TypeBuilder> interfaces = popList(interfacesCount); 210 List<TypeBuilder> interfaces = popList(interfacesCount);
210 TypeBuilder supertype = pop(); 211 TypeBuilder supertype = pop();
211 List<TypeVariableBuilder> typeVariables = pop(); 212 List<TypeVariableBuilder> typeVariables = pop();
212 String name = pop(); 213 String name = pop();
213 if (typeVariables != null && supertype is MixinApplicationBuilder) { 214 if (typeVariables != null && supertype is MixinApplicationBuilder) {
214 supertype.typeVariables = typeVariables; 215 supertype.typeVariables = typeVariables;
215 supertype.subclassName = name; 216 supertype.subclassName = name;
216 } 217 }
217 int modifiers = Modifier.validate(pop()); 218 int modifiers = Modifier.validate(pop());
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 push(library.addMixinApplication(supertype, mixins, -1)); 313 push(library.addMixinApplication(supertype, mixins, -1));
313 } 314 }
314 315
315 @override 316 @override
316 void beginNamedMixinApplication(Token begin, Token name) { 317 void beginNamedMixinApplication(Token begin, Token name) {
317 library.beginNestedDeclaration(name.value, hasMembers: false); 318 library.beginNestedDeclaration(name.value, hasMembers: false);
318 } 319 }
319 320
320 @override 321 @override
321 void endNamedMixinApplication( 322 void endNamedMixinApplication(
322 Token classKeyword, Token equals, Token implementsKeyword, 323 Token beginToken, Token classKeyword, Token equals,
323 Token endToken) { 324 Token implementsKeyword, Token endToken) {
324 debugEvent("endNamedMixinApplication"); 325 debugEvent("endNamedMixinApplication");
325 List<TypeBuilder> interfaces = popIfNotNull(implementsKeyword); 326 List<TypeBuilder> interfaces = popIfNotNull(implementsKeyword);
326 TypeBuilder mixinApplication = pop(); 327 TypeBuilder mixinApplication = pop();
327 List<TypeVariableBuilder> typeVariables = pop(); 328 List<TypeVariableBuilder> typeVariables = pop();
328 String name = pop(); 329 String name = pop();
329 if (typeVariables != null && mixinApplication is MixinApplicationBuilder) { 330 if (typeVariables != null && mixinApplication is MixinApplicationBuilder) {
330 mixinApplication.typeVariables = typeVariables; 331 mixinApplication.typeVariables = typeVariables;
331 mixinApplication.subclassName = name; 332 mixinApplication.subclassName = name;
332 } 333 }
333 int modifiers = Modifier.validate(pop()); 334 int modifiers = Modifier.validate(pop());
334 List<MetadataBuilder> metadata = pop(); 335 List<MetadataBuilder> metadata = pop();
335 library.addNamedMixinApplication( 336 library.addNamedMixinApplication(
336 metadata, name, typeVariables, modifiers, mixinApplication, interfaces, 337 metadata, name, typeVariables, modifiers, mixinApplication, interfaces,
337 classKeyword.charOffset); 338 beginToken.charOffset);
338 checkEmpty(classKeyword.charOffset); 339 checkEmpty(beginToken.charOffset);
339 } 340 }
340 341
341 @override 342 @override
342 void endTypeArguments(int count, Token beginToken, Token endToken) { 343 void endTypeArguments(int count, Token beginToken, Token endToken) {
343 debugEvent("TypeArguments"); 344 debugEvent("TypeArguments");
344 push(popList(count) ?? NullValue.TypeArguments); 345 push(popList(count) ?? NullValue.TypeArguments);
345 } 346 }
346 347
347 @override 348 @override
348 void endType(Token beginToken, Token endToken) { 349 void endType(Token beginToken, Token endToken) {
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 Link<Token> handleMemberName(Link<Token> identifiers) { 616 Link<Token> handleMemberName(Link<Token> identifiers) {
616 if (!isDartLibrary || identifiers.isEmpty) return identifiers; 617 if (!isDartLibrary || identifiers.isEmpty) return identifiers;
617 return removeNativeClause(identifiers); 618 return removeNativeClause(identifiers);
618 } 619 }
619 620
620 @override 621 @override
621 void debugEvent(String name) { 622 void debugEvent(String name) {
622 // printEvent(name); 623 // printEvent(name);
623 } 624 }
624 } 625 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698