| 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 1301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1312 void endPart(Token partKeyword, Token semicolon) { | 1312 void endPart(Token partKeyword, Token semicolon) { |
| 1313 debugEvent("Part"); | 1313 debugEvent("Part"); |
| 1314 String uri = pop(); | 1314 String uri = pop(); |
| 1315 // ignore: strong_mode_down_cast_composite | 1315 // ignore: strong_mode_down_cast_composite |
| 1316 List<UnlinkedExpr> metadata = pop(); | 1316 List<UnlinkedExpr> metadata = pop(); |
| 1317 topScope.unit.parts.add(new UnlinkedPartBuilder(annotations: metadata)); | 1317 topScope.unit.parts.add(new UnlinkedPartBuilder(annotations: metadata)); |
| 1318 topScope.publicNamespace.parts.add(uri); | 1318 topScope.publicNamespace.parts.add(uri); |
| 1319 checkEmpty(); | 1319 checkEmpty(); |
| 1320 } | 1320 } |
| 1321 | 1321 |
| 1322 void endPartOf(Token partKeyword, Token semicolon) { | 1322 void endPartOf(Token partKeyword, Token semicolon, bool hasName) { |
| 1323 debugEvent("endPartOf"); | 1323 debugEvent("endPartOf"); |
| 1324 String name = pop(); | 1324 String name = pop(); |
| 1325 pop(); // metadata | 1325 pop(); // metadata |
| 1326 topScope.unit.isPartOf = true; | 1326 topScope.unit.isPartOf = true; |
| 1327 if (name == 'dart.core') isCoreLibrary = true; | 1327 if (name == 'dart.core') isCoreLibrary = true; |
| 1328 } | 1328 } |
| 1329 | 1329 |
| 1330 void endRedirectingFactoryBody(Token beginToken, Token endToken) { | 1330 void endRedirectingFactoryBody(Token beginToken, Token endToken) { |
| 1331 debugEvent("RedirectingFactoryBody"); | 1331 debugEvent("RedirectingFactoryBody"); |
| 1332 pop(); // Discard ConstructorReferenceBuilder. | 1332 pop(); // Discard ConstructorReferenceBuilder. |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1590 } | 1590 } |
| 1591 | 1591 |
| 1592 /// Internal representation of an initialized name. | 1592 /// Internal representation of an initialized name. |
| 1593 class _InitializedName { | 1593 class _InitializedName { |
| 1594 final String name; | 1594 final String name; |
| 1595 final UnlinkedExecutableBuilder initializer; | 1595 final UnlinkedExecutableBuilder initializer; |
| 1596 _InitializedName(this.name, this.initializer); | 1596 _InitializedName(this.name, this.initializer); |
| 1597 | 1597 |
| 1598 toString() => "II:" + (initializer != null ? "$name = $initializer" : name); | 1598 toString() => "II:" + (initializer != null ? "$name = $initializer" : name); |
| 1599 } | 1599 } |
| OLD | NEW |