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.body_builder; | 5 library fasta.body_builder; |
6 | 6 |
7 import '../fasta_codes.dart' | 7 import '../fasta_codes.dart' |
8 show FastaMessage, codeExpectedButGot, codeExpectedFunctionBody; | 8 show FastaMessage, codeExpectedButGot, codeExpectedFunctionBody; |
9 | 9 |
10 import '../parser/parser.dart' show FormalParameterType, optional; | 10 import '../parser/parser.dart' show FormalParameterType, optional; |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 @override | 311 @override |
312 void endMetadataStar(int count, bool forParameter) { | 312 void endMetadataStar(int count, bool forParameter) { |
313 debugEvent("MetadataStar"); | 313 debugEvent("MetadataStar"); |
314 push(NullValue.Metadata); | 314 push(NullValue.Metadata); |
315 } | 315 } |
316 | 316 |
317 @override | 317 @override |
318 void endTopLevelFields(int count, Token beginToken, Token endToken) { | 318 void endTopLevelFields(int count, Token beginToken, Token endToken) { |
319 debugEvent("TopLevelFields"); | 319 debugEvent("TopLevelFields"); |
320 doFields(count); | 320 doFields(count); |
321 // There's no metadata here because of a slight assymetry between | 321 // There's no metadata here because of a slight asymmetry between |
322 // [parseTopLevelMember] and [parseMember]. This assymetry leads to | 322 // [parseTopLevelMember] and [parseMember]. This asymmetry leads to |
323 // DietListener discarding top-level member metadata. | 323 // DietListener discarding top-level member metadata. |
324 } | 324 } |
325 | 325 |
326 @override | 326 @override |
327 void endFields( | 327 void endFields( |
328 int count, Token covariantKeyword, Token beginToken, Token endToken) { | 328 int count, Token covariantKeyword, Token beginToken, Token endToken) { |
329 debugEvent("Fields"); | 329 debugEvent("Fields"); |
330 doFields(count); | 330 doFields(count); |
331 pop(); // Metadata. | 331 pop(); // Metadata. |
332 } | 332 } |
(...skipping 2761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3094 } else if (node is PrefixBuilder) { | 3094 } else if (node is PrefixBuilder) { |
3095 return node.name; | 3095 return node.name; |
3096 } else if (node is ThisAccessor) { | 3096 } else if (node is ThisAccessor) { |
3097 return node.isSuper ? "super" : "this"; | 3097 return node.isSuper ? "super" : "this"; |
3098 } else if (node is FastaAccessor) { | 3098 } else if (node is FastaAccessor) { |
3099 return node.plainNameForRead; | 3099 return node.plainNameForRead; |
3100 } else { | 3100 } else { |
3101 return internalError("Unhandled: ${node.runtimeType}"); | 3101 return internalError("Unhandled: ${node.runtimeType}"); |
3102 } | 3102 } |
3103 } | 3103 } |
OLD | NEW |