OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 import 'package:front_end/src/fasta/errors.dart'; | 5 import 'package:front_end/src/fasta/errors.dart'; |
6 import 'package:front_end/src/fasta/parser/identifier_context.dart'; | 6 import 'package:front_end/src/fasta/parser/identifier_context.dart'; |
7 import 'package:front_end/src/fasta/parser/parser.dart'; | 7 import 'package:front_end/src/fasta/parser/parser.dart'; |
8 import 'package:front_end/src/fasta/scanner/token.dart'; | 8 import 'package:front_end/src/fasta/scanner/token.dart'; |
9 import 'package:front_end/src/fasta/source/stack_listener.dart'; | 9 import 'package:front_end/src/fasta/source/stack_listener.dart'; |
10 | 10 |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 Token beginToken, Token factoryKeyword, Token endToken) { | 237 Token beginToken, Token factoryKeyword, Token endToken) { |
238 debugEvent("FactoryMethod"); | 238 debugEvent("FactoryMethod"); |
239 pop(); // Body | 239 pop(); // Body |
240 ConstructorReference name = pop(); | 240 ConstructorReference name = pop(); |
241 List<Annotation> metadata = pop(); | 241 List<Annotation> metadata = pop(); |
242 Comment comment = pop(); | 242 Comment comment = pop(); |
243 push(new ConstructorDeclaration(comment, metadata, name)); | 243 push(new ConstructorDeclaration(comment, metadata, name)); |
244 } | 244 } |
245 | 245 |
246 @override | 246 @override |
247 void endFieldInitializer(Token assignment) { | 247 void endFieldInitializer(Token assignment, Token token) { |
248 debugEvent("FieldInitializer"); | 248 debugEvent("FieldInitializer"); |
249 pop(); // Expression | 249 pop(); // Expression |
250 } | 250 } |
251 | 251 |
252 @override | 252 @override |
253 void endFormalParameter(Token covariantKeyword, Token thisKeyword, | 253 void endFormalParameter(Token covariantKeyword, Token thisKeyword, |
254 Token nameToken, FormalParameterType kind) { | 254 Token nameToken, FormalParameterType kind) { |
255 debugEvent("FormalParameter"); | 255 debugEvent("FormalParameter"); |
256 pop(); // Name | 256 pop(); // Name |
257 pop(); // Type | 257 pop(); // Type |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 final String name; | 463 final String name; |
464 | 464 |
465 final List<TypeName> typeArguments; | 465 final List<TypeName> typeArguments; |
466 | 466 |
467 TypeName(this.name, this.typeArguments); | 467 TypeName(this.name, this.typeArguments); |
468 } | 468 } |
469 | 469 |
470 /// "Mini AST" representation of an expression which summary code generation | 470 /// "Mini AST" representation of an expression which summary code generation |
471 /// need not be concerned about. | 471 /// need not be concerned about. |
472 class UnknownExpression extends Expression {} | 472 class UnknownExpression extends Expression {} |
OLD | NEW |