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 handleType(Token beginToken, Token endToken) { | 349 void endType(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( | 462 void endFunctionTypeAlias(Token typedefKeyword, Token endToken) { |
463 Token typedefKeyword, Token equals, Token endToken) { | |
464 debugEvent("endFunctionTypeAlias"); | 463 debugEvent("endFunctionTypeAlias"); |
465 List<FormalParameterBuilder> formals = pop(); | 464 List<FormalParameterBuilder> formals = pop(); |
466 List<TypeVariableBuilder> typeVariables = pop(); | 465 List<TypeVariableBuilder> typeVariables = pop(); |
467 String name = pop(); | 466 String name = pop(); |
468 TypeBuilder returnType = pop(); | 467 TypeBuilder returnType = pop(); |
469 List<MetadataBuilder> metadata = pop(); | 468 List<MetadataBuilder> metadata = pop(); |
470 library.addFunctionTypeAlias( | 469 library.addFunctionTypeAlias( |
471 metadata, returnType, name, typeVariables, formals, | 470 metadata, returnType, name, typeVariables, formals, |
472 typedefKeyword.charOffset); | 471 typedefKeyword.charOffset); |
473 checkEmpty(typedefKeyword.charOffset); | 472 checkEmpty(typedefKeyword.charOffset); |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 Link<Token> handleMemberName(Link<Token> identifiers) { | 616 Link<Token> handleMemberName(Link<Token> identifiers) { |
618 if (!isDartLibrary || identifiers.isEmpty) return identifiers; | 617 if (!isDartLibrary || identifiers.isEmpty) return identifiers; |
619 return removeNativeClause(identifiers); | 618 return removeNativeClause(identifiers); |
620 } | 619 } |
621 | 620 |
622 @override | 621 @override |
623 void debugEvent(String name) { | 622 void debugEvent(String name) { |
624 // printEvent(name); | 623 // printEvent(name); |
625 } | 624 } |
626 } | 625 } |
OLD | NEW |