| 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 /// Logic to build unlinked summaries. | 5 /// Logic to build unlinked summaries. |
| 6 library summary.src.summary_builder; | 6 library summary.src.summary_builder; |
| 7 | 7 |
| 8 import 'package:front_end/src/fasta/parser/class_member_parser.dart'; | 8 import 'package:front_end/src/fasta/parser/class_member_parser.dart'; |
| 9 import 'package:front_end/src/fasta/parser/identifier_context.dart'; | 9 import 'package:front_end/src/fasta/parser/identifier_context.dart'; |
| 10 import 'package:front_end/src/fasta/parser/parser.dart'; | 10 import 'package:front_end/src/fasta/parser/parser.dart'; |
| (...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 973 void endFactoryMethod( | 973 void endFactoryMethod( |
| 974 Token beginToken, Token factoryKeyword, Token endToken) { | 974 Token beginToken, Token factoryKeyword, Token endToken) { |
| 975 debugEvent("FactoryMethod"); | 975 debugEvent("FactoryMethod"); |
| 976 throw new UnimplementedError(); // TODO(paulberry) | 976 throw new UnimplementedError(); // TODO(paulberry) |
| 977 // pop(); // async-modifiers | 977 // pop(); // async-modifiers |
| 978 // /* List<FormalParameterBuilder> formals = */ pop(); | 978 // /* List<FormalParameterBuilder> formals = */ pop(); |
| 979 // var name = pop(); | 979 // var name = pop(); |
| 980 // /* List<MetadataBuilder> metadata = */ pop(); | 980 // /* List<MetadataBuilder> metadata = */ pop(); |
| 981 } | 981 } |
| 982 | 982 |
| 983 void endFieldInitializer(Token assignmentOperator) { | 983 void endFieldInitializer(Token assignmentOperator, Token token) { |
| 984 debugEvent("FieldInitializer $typeSeen $assignmentOperator"); | 984 debugEvent("FieldInitializer $typeSeen $assignmentOperator"); |
| 985 // This is a variable initializer and it's ignored for now. May also be | 985 // This is a variable initializer and it's ignored for now. May also be |
| 986 // constructor initializer. | 986 // constructor initializer. |
| 987 var initializer = | 987 var initializer = |
| 988 needInitializer && assignmentOperator != null ? pop() : null; | 988 needInitializer && assignmentOperator != null ? pop() : null; |
| 989 var name = pop(); | 989 var name = pop(); |
| 990 push(new _InitializedName( | 990 push(new _InitializedName( |
| 991 name, new UnlinkedExecutableBuilder(bodyExpr: initializer))); | 991 name, new UnlinkedExecutableBuilder(bodyExpr: initializer))); |
| 992 } | 992 } |
| 993 | 993 |
| (...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1551 } | 1551 } |
| 1552 | 1552 |
| 1553 /// Internal representation of an initialized name. | 1553 /// Internal representation of an initialized name. |
| 1554 class _InitializedName { | 1554 class _InitializedName { |
| 1555 final String name; | 1555 final String name; |
| 1556 final UnlinkedExecutableBuilder initializer; | 1556 final UnlinkedExecutableBuilder initializer; |
| 1557 _InitializedName(this.name, this.initializer); | 1557 _InitializedName(this.name, this.initializer); |
| 1558 | 1558 |
| 1559 toString() => "II:" + (initializer != null ? "$name = $initializer" : name); | 1559 toString() => "II:" + (initializer != null ? "$name = $initializer" : name); |
| 1560 } | 1560 } |
| OLD | NEW |