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

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

Issue 2650803002: Rename events. (Closed)
Patch Set: Address review comments. 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 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 checkEmpty(); 196 checkEmpty();
197 return library.addProcedure(metadata, modifiers, returnType, name, 197 return library.addProcedure(metadata, modifiers, returnType, name,
198 typeVariables, formals, asyncModifier, computeProcedureKind(getOrSet)); 198 typeVariables, formals, asyncModifier, computeProcedureKind(getOrSet));
199 } 199 }
200 200
201 void handleNoFunctionBody(Token token) { 201 void handleNoFunctionBody(Token token) {
202 debugEvent("NoFunctionBody"); 202 debugEvent("NoFunctionBody");
203 push(MethodBody.Abstract); 203 push(MethodBody.Abstract);
204 } 204 }
205 205
206 void skippedFunctionBody(Token token) { 206 void handleFunctionBodySkipped(Token token) {
207 debugEvent("skippedFunctionBody"); 207 debugEvent("handleFunctionBodySkipped");
208 push(MethodBody.Regular); 208 push(MethodBody.Regular);
209 } 209 }
210 210
211 void endMethod(Token getOrSet, Token beginToken, Token endToken) { 211 void endMethod(Token getOrSet, Token beginToken, Token endToken) {
212 debugEvent("Method"); 212 debugEvent("Method");
213 MethodBody kind = pop(); 213 MethodBody kind = pop();
214 if (kind == MethodBody.RedirectingFactoryBody) { 214 if (kind == MethodBody.RedirectingFactoryBody) {
215 // This will cause an error later. 215 // This will cause an error later.
216 pop(); 216 pop();
217 } 217 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 List<MetadataBuilder> metadata = pop(); 290 List<MetadataBuilder> metadata = pop();
291 push(library.addFormalParameter(metadata, modifiers, type, name, 291 push(library.addFormalParameter(metadata, modifiers, type, name,
292 thisKeyword != null)); 292 thisKeyword != null));
293 } 293 }
294 294
295 void handleValuedFormalParameter(Token equals, Token token) { 295 void handleValuedFormalParameter(Token equals, Token token) {
296 debugEvent("ValuedFormalParameter"); 296 debugEvent("ValuedFormalParameter");
297 // Ignored for now. 297 // Ignored for now.
298 } 298 }
299 299
300 void handleFunctionTypedFormalParameter(Token token) { 300 void endFunctionTypedFormalParameter(Token token) {
301 debugEvent("FunctionTypedFormalParameter"); 301 debugEvent("FunctionTypedFormalParameter");
302 pop(); // Function type parameters. 302 pop(); // Function type parameters.
303 pop(); // Type variables. 303 pop(); // Type variables.
304 String name = pop(); 304 String name = pop();
305 pop(); // Return type. 305 pop(); // Return type.
306 push(NullValue.Type); 306 push(NullValue.Type);
307 push(name); 307 push(name);
308 } 308 }
309 309
310 void endOptionalFormalParameters( 310 void endOptionalFormalParameters(
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 List<MetadataBuilder> metadata = pop(); 425 List<MetadataBuilder> metadata = pop();
426 library.addFactoryMethod(metadata, name, formals, asyncModifier, 426 library.addFactoryMethod(metadata, name, formals, asyncModifier,
427 redirectionTarget); 427 redirectionTarget);
428 } 428 }
429 429
430 void endRedirectingFactoryBody(Token beginToken, Token endToken) { 430 void endRedirectingFactoryBody(Token beginToken, Token endToken) {
431 debugEvent("RedirectingFactoryBody"); 431 debugEvent("RedirectingFactoryBody");
432 push(MethodBody.RedirectingFactoryBody); 432 push(MethodBody.RedirectingFactoryBody);
433 } 433 }
434 434
435 void endInitializer(Token assignmentOperator) { 435 void endFieldInitializer(Token assignmentOperator) {
436 debugEvent("Initializer"); 436 debugEvent("FieldInitializer");
437 // This is a variable initializer and it's ignored for now. May also be 437 // Ignoring field initializers for now.
438 // constructor initializer.
439 } 438 }
440 439
441 void endInitializers(int count, Token beginToken, Token endToken) { 440 void endInitializers(int count, Token beginToken, Token endToken) {
442 debugEvent("Initializers"); 441 debugEvent("Initializers");
443 // Ignored for now. 442 // Ignored for now.
444 } 443 }
445 444
446 void handleNoInitializers() { 445 void handleNoInitializers() {
447 debugEvent("NoInitializers"); 446 debugEvent("NoInitializers");
448 // This is a constructor initializer and it's ignored for now. 447 // This is a constructor initializer and it's ignored for now.
(...skipping 19 matching lines...) Expand all
468 467
469 void handleModifiers(int count) { 468 void handleModifiers(int count) {
470 debugEvent("Modifiers"); 469 debugEvent("Modifiers");
471 push(popList(count) ?? NullValue.Modifiers); 470 push(popList(count) ?? NullValue.Modifiers);
472 } 471 }
473 472
474 void debugEvent(String name) { 473 void debugEvent(String name) {
475 // printEvent(name); 474 // printEvent(name);
476 } 475 }
477 } 476 }
OLDNEW
« no previous file with comments | « pkg/fasta/lib/src/source/diet_listener.dart ('k') | pkg/fasta/lib/src/source/scope_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698