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

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

Issue 2567133002: Add support for the new function-type syntax. (Closed)
Patch Set: Handle function types with `void` return type. 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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 @override 394 @override
395 void endEnum(Token enumKeyword, Token endBrace, int count) { 395 void endEnum(Token enumKeyword, Token endBrace, int count) {
396 List<String> constants = popList(count); 396 List<String> constants = popList(count);
397 String name = pop(); 397 String name = pop();
398 List<MetadataBuilder> metadata = pop(); 398 List<MetadataBuilder> metadata = pop();
399 library.addEnum(metadata, name, constants); 399 library.addEnum(metadata, name, constants);
400 checkEmpty(); 400 checkEmpty();
401 } 401 }
402 402
403 @override 403 @override
404 void beginFunctionTypeAlias(Token token) { 404 void beginTypedef(Token token) {
405 library.beginNestedScope(); 405 library.beginNestedScope();
406 } 406 }
407 407
408 @override 408 @override
409 void endFunctionTypeAlias(Token typedefKeyword, Token endToken) { 409 void endTypedef(Token typedefKeyword, Token equals, Token endToken) {
410 debugEvent("endFunctionTypeAlias"); 410 debugEvent("endTypedef");
411 List<FormalParameterBuilder> formals = pop(); 411 List<FormalParameterBuilder> formals = pop();
412 List<TypeVariableBuilder> typeVariables = pop(); 412 List<TypeVariableBuilder> typeVariables = pop();
413 String name = pop(); 413 String name = pop();
414 TypeBuilder returnType = pop(); 414 TypeBuilder returnType = pop();
415 List<MetadataBuilder> metadata = pop(); 415 List<MetadataBuilder> metadata = pop();
416 library.addFunctionTypeAlias( 416 library.addFunctionTypeAlias(
417 metadata, returnType, name, typeVariables, formals); 417 metadata, returnType, name, typeVariables, formals);
418 checkEmpty(); 418 checkEmpty();
419 } 419 }
420 420
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 Link<Token> handleMemberName(Link<Token> identifiers) { 551 Link<Token> handleMemberName(Link<Token> identifiers) {
552 if (!isDartLibrary || identifiers.isEmpty) return identifiers; 552 if (!isDartLibrary || identifiers.isEmpty) return identifiers;
553 return removeNativeClause(identifiers); 553 return removeNativeClause(identifiers);
554 } 554 }
555 555
556 @override 556 @override
557 void debugEvent(String name) { 557 void debugEvent(String name) {
558 // printEvent(name); 558 // printEvent(name);
559 } 559 }
560 } 560 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698