OLD | NEW |
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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 checkEmpty(beginToken.charOffset); | 339 checkEmpty(beginToken.charOffset); |
340 } | 340 } |
341 | 341 |
342 @override | 342 @override |
343 void endTypeArguments(int count, Token beginToken, Token endToken) { | 343 void endTypeArguments(int count, Token beginToken, Token endToken) { |
344 debugEvent("TypeArguments"); | 344 debugEvent("TypeArguments"); |
345 push(popList(count) ?? NullValue.TypeArguments); | 345 push(popList(count) ?? NullValue.TypeArguments); |
346 } | 346 } |
347 | 347 |
348 @override | 348 @override |
349 void endType(Token beginToken, Token endToken) { | 349 void handleType(Token beginToken, Token endToken) { |
350 debugEvent("Type"); | 350 debugEvent("Type"); |
351 List<TypeBuilder> arguments = pop(); | 351 List<TypeBuilder> arguments = pop(); |
352 String name = pop(); | 352 String name = pop(); |
353 push(library.addNamedType(name, arguments, beginToken.charOffset)); | 353 push(library.addNamedType(name, arguments, beginToken.charOffset)); |
354 } | 354 } |
355 | 355 |
356 @override | 356 @override |
357 void endTypeList(int count) { | 357 void endTypeList(int count) { |
358 debugEvent("TypeList"); | 358 debugEvent("TypeList"); |
359 push(popList(count) ?? NullValue.TypeList); | 359 push(popList(count) ?? NullValue.TypeList); |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 library.addEnum(metadata, name, constants, enumKeyword.charOffset); | 452 library.addEnum(metadata, name, constants, enumKeyword.charOffset); |
453 checkEmpty(enumKeyword.charOffset); | 453 checkEmpty(enumKeyword.charOffset); |
454 } | 454 } |
455 | 455 |
456 @override | 456 @override |
457 void beginFunctionTypeAlias(Token token) { | 457 void beginFunctionTypeAlias(Token token) { |
458 library.beginNestedDeclaration(null, hasMembers: false); | 458 library.beginNestedDeclaration(null, hasMembers: false); |
459 } | 459 } |
460 | 460 |
461 @override | 461 @override |
462 void endFunctionTypeAlias(Token typedefKeyword, Token endToken) { | 462 void endFunctionTypeAlias( |
| 463 Token typedefKeyword, Token equals, Token endToken) { |
463 debugEvent("endFunctionTypeAlias"); | 464 debugEvent("endFunctionTypeAlias"); |
464 List<FormalParameterBuilder> formals = pop(); | 465 List<FormalParameterBuilder> formals = pop(); |
465 List<TypeVariableBuilder> typeVariables = pop(); | 466 List<TypeVariableBuilder> typeVariables = pop(); |
466 String name = pop(); | 467 String name = pop(); |
467 TypeBuilder returnType = pop(); | 468 TypeBuilder returnType = pop(); |
468 List<MetadataBuilder> metadata = pop(); | 469 List<MetadataBuilder> metadata = pop(); |
469 library.addFunctionTypeAlias( | 470 library.addFunctionTypeAlias( |
470 metadata, returnType, name, typeVariables, formals, | 471 metadata, returnType, name, typeVariables, formals, |
471 typedefKeyword.charOffset); | 472 typedefKeyword.charOffset); |
472 checkEmpty(typedefKeyword.charOffset); | 473 checkEmpty(typedefKeyword.charOffset); |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 Link<Token> handleMemberName(Link<Token> identifiers) { | 617 Link<Token> handleMemberName(Link<Token> identifiers) { |
617 if (!isDartLibrary || identifiers.isEmpty) return identifiers; | 618 if (!isDartLibrary || identifiers.isEmpty) return identifiers; |
618 return removeNativeClause(identifiers); | 619 return removeNativeClause(identifiers); |
619 } | 620 } |
620 | 621 |
621 @override | 622 @override |
622 void debugEvent(String name) { | 623 void debugEvent(String name) { |
623 // printEvent(name); | 624 // printEvent(name); |
624 } | 625 } |
625 } | 626 } |
OLD | NEW |