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 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1429 | 1429 |
1430 void handleModifier(Token token) { | 1430 void handleModifier(Token token) { |
1431 debugEvent("Modifier"); | 1431 debugEvent("Modifier"); |
1432 var modifier = _modifierFlag[token.stringValue]; | 1432 var modifier = _modifierFlag[token.stringValue]; |
1433 if (modifier & _const_flag != 0) inConstContext = true; | 1433 if (modifier & _const_flag != 0) inConstContext = true; |
1434 push(modifier); | 1434 push(modifier); |
1435 } | 1435 } |
1436 | 1436 |
1437 void handleModifiers(int count) { | 1437 void handleModifiers(int count) { |
1438 debugEvent("Modifiers"); | 1438 debugEvent("Modifiers"); |
1439 push((popList(count) ?? const []).fold(0, (a, b) => a | b)); | 1439 push((popList(count) ?? const []).fold/*<int>*/(0, (a, b) => a | b)); |
1440 } | 1440 } |
1441 | 1441 |
1442 void handleNoConstructorReferenceContinuationAfterTypeArguments(Token token) { | 1442 void handleNoConstructorReferenceContinuationAfterTypeArguments(Token token) { |
1443 debugEvent("NoConstructorReferenceContinuationAfterTypeArguments"); | 1443 debugEvent("NoConstructorReferenceContinuationAfterTypeArguments"); |
1444 } | 1444 } |
1445 | 1445 |
1446 void handleNoFieldInitializer(Token token) { | 1446 void handleNoFieldInitializer(Token token) { |
1447 debugEvent("NoFieldInitializer"); | 1447 debugEvent("NoFieldInitializer"); |
1448 push(new _InitializedName(pop(), null)); | 1448 push(new _InitializedName(pop(), null)); |
1449 } | 1449 } |
(...skipping 140 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 |