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/problems.dart' | 5 import 'package:front_end/src/fasta/problems.dart' |
6 show internalProblem, unsupported; | 6 show internalProblem, unsupported; |
7 import 'package:front_end/src/fasta/messages.dart' show Message; | 7 import 'package:front_end/src/fasta/messages.dart' show Message; |
8 import 'package:front_end/src/fasta/parser/identifier_context.dart'; | 8 import 'package:front_end/src/fasta/parser.dart'; |
9 import 'package:front_end/src/fasta/parser/parser.dart'; | |
10 import 'package:front_end/src/fasta/source/stack_listener.dart'; | 9 import 'package:front_end/src/fasta/source/stack_listener.dart'; |
11 import 'package:front_end/src/scanner/token.dart'; | 10 import 'package:front_end/src/scanner/token.dart'; |
12 | 11 |
13 /// "Mini AST" representation of a declaration which can accept annotations. | 12 /// "Mini AST" representation of a declaration which can accept annotations. |
14 class AnnotatedNode { | 13 class AnnotatedNode { |
15 final Comment documentationComment; | 14 final Comment documentationComment; |
16 | 15 |
17 final List<Annotation> metadata; | 16 final List<Annotation> metadata; |
18 | 17 |
19 AnnotatedNode(this.documentationComment, List<Annotation> metadata) | 18 AnnotatedNode(this.documentationComment, List<Annotation> metadata) |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 } | 250 } |
252 | 251 |
253 @override | 252 @override |
254 void endFieldInitializer(Token assignment, Token token) { | 253 void endFieldInitializer(Token assignment, Token token) { |
255 debugEvent("FieldInitializer"); | 254 debugEvent("FieldInitializer"); |
256 pop(); // Expression | 255 pop(); // Expression |
257 } | 256 } |
258 | 257 |
259 @override | 258 @override |
260 void endFormalParameter(Token thisKeyword, Token nameToken, | 259 void endFormalParameter(Token thisKeyword, Token nameToken, |
261 FormalParameterType kind, MemberKind memberKind) { | 260 FormalParameterKind kind, MemberKind memberKind) { |
262 debugEvent("FormalParameter"); | 261 debugEvent("FormalParameter"); |
263 pop(); // Name | 262 pop(); // Name |
264 pop(); // Type | 263 pop(); // Type |
265 pop(); // Metadata | 264 pop(); // Metadata |
266 pop(); // Comment | 265 pop(); // Comment |
267 } | 266 } |
268 | 267 |
269 @override | 268 @override |
270 void endFormalParameters( | 269 void endFormalParameters( |
271 int count, Token beginToken, Token endToken, MemberKind kind) { | 270 int count, Token beginToken, Token endToken, MemberKind kind) { |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 final String name; | 470 final String name; |
472 | 471 |
473 final List<TypeName> typeArguments; | 472 final List<TypeName> typeArguments; |
474 | 473 |
475 TypeName(this.name, this.typeArguments); | 474 TypeName(this.name, this.typeArguments); |
476 } | 475 } |
477 | 476 |
478 /// "Mini AST" representation of an expression which summary code generation | 477 /// "Mini AST" representation of an expression which summary code generation |
479 /// need not be concerned about. | 478 /// need not be concerned about. |
480 class UnknownExpression extends Expression {} | 479 class UnknownExpression extends Expression {} |
OLD | NEW |