| 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 '../parser/parser.dart' show FormalParameterType, optional; | 7 import '../parser/parser.dart' show FormalParameterType, optional; |
| 8 | 8 |
| 9 import '../parser/error_kind.dart' show ErrorKind; | 9 import '../parser/error_kind.dart' show ErrorKind; |
| 10 | 10 |
| (...skipping 2145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2156 "Can't continue at '$name'.", continueKeyword.next.charOffset)); | 2156 "Can't continue at '$name'.", continueKeyword.next.charOffset)); |
| 2157 } else { | 2157 } else { |
| 2158 BreakStatement statement = new BreakStatement(null); | 2158 BreakStatement statement = new BreakStatement(null); |
| 2159 target.addContinue(statement); | 2159 target.addContinue(statement); |
| 2160 push(statement); | 2160 push(statement); |
| 2161 } | 2161 } |
| 2162 } | 2162 } |
| 2163 | 2163 |
| 2164 @override | 2164 @override |
| 2165 void endTypeVariable(Token token, Token extendsOrSuper) { | 2165 void endTypeVariable(Token token, Token extendsOrSuper) { |
| 2166 logEvent("TypeVariable"); | 2166 debugEvent("TypeVariable"); |
| 2167 // TODO(ahe): Implement this when enabling generic method syntax. | 2167 // TODO(ahe): Do not discard these when enabling generic method syntax. |
| 2168 pop(); // Bound. |
| 2169 pop(); // Name. |
| 2168 } | 2170 } |
| 2169 | 2171 |
| 2170 @override | 2172 @override |
| 2171 void endTypeVariables(int count, Token beginToken, Token endToken) { | 2173 void endTypeVariables(int count, Token beginToken, Token endToken) { |
| 2172 logEvent("TypeVariables"); | 2174 debugEvent("TypeVariables"); |
| 2173 // TODO(ahe): Implement this when enabling generic method syntax. | 2175 // TODO(ahe): Implement this when enabling generic method syntax. |
| 2176 push(NullValue.TypeVariables); |
| 2174 } | 2177 } |
| 2175 | 2178 |
| 2176 @override | 2179 @override |
| 2177 void handleModifier(Token token) { | 2180 void handleModifier(Token token) { |
| 2178 debugEvent("Modifier"); | 2181 debugEvent("Modifier"); |
| 2179 // TODO(ahe): Copied from outline_builder.dart. | 2182 // TODO(ahe): Copied from outline_builder.dart. |
| 2180 push(new Modifier.fromString(token.stringValue)); | 2183 push(new Modifier.fromString(token.stringValue)); |
| 2181 } | 2184 } |
| 2182 | 2185 |
| 2183 @override | 2186 @override |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2707 } else if (node is PrefixBuilder) { | 2710 } else if (node is PrefixBuilder) { |
| 2708 return node.name; | 2711 return node.name; |
| 2709 } else if (node is ThisAccessor) { | 2712 } else if (node is ThisAccessor) { |
| 2710 return node.isSuper ? "super" : "this"; | 2713 return node.isSuper ? "super" : "this"; |
| 2711 } else if (node is BuilderAccessor) { | 2714 } else if (node is BuilderAccessor) { |
| 2712 return node.plainNameForRead; | 2715 return node.plainNameForRead; |
| 2713 } else { | 2716 } else { |
| 2714 return internalError("Unhandled: ${node.runtimeType}"); | 2717 return internalError("Unhandled: ${node.runtimeType}"); |
| 2715 } | 2718 } |
| 2716 } | 2719 } |
| OLD | NEW |