| 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.diet_listener; | 5 library fasta.diet_listener; |
| 6 | 6 |
| 7 import 'package:kernel/ast.dart' show | 7 import 'package:kernel/ast.dart' show |
| 8 AsyncMarker; | 8 AsyncMarker; |
| 9 | 9 |
| 10 import 'package:kernel/class_hierarchy.dart' show | 10 import 'package:kernel/class_hierarchy.dart' show |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 void handleNoTypeArguments(Token token) { | 126 void handleNoTypeArguments(Token token) { |
| 127 debugEvent("NoTypeArguments"); | 127 debugEvent("NoTypeArguments"); |
| 128 } | 128 } |
| 129 | 129 |
| 130 @override | 130 @override |
| 131 void handleNoType(Token token) { | 131 void handleNoType(Token token) { |
| 132 debugEvent("NoType"); | 132 debugEvent("NoType"); |
| 133 } | 133 } |
| 134 | 134 |
| 135 @override | 135 @override |
| 136 void handleType(Token beginToken, Token endToken) { | 136 void endType(Token beginToken, Token endToken) { |
| 137 debugEvent("Type"); | 137 debugEvent("Type"); |
| 138 discard(1); | 138 discard(1); |
| 139 } | 139 } |
| 140 | 140 |
| 141 @override | 141 @override |
| 142 void endTypeList(int count) { | 142 void endTypeList(int count) { |
| 143 debugEvent("TypeList"); | 143 debugEvent("TypeList"); |
| 144 } | 144 } |
| 145 | 145 |
| 146 @override | 146 @override |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 void handleNoFormalParameters(Token token) { | 183 void handleNoFormalParameters(Token token) { |
| 184 debugEvent("NoFormalParameters"); | 184 debugEvent("NoFormalParameters"); |
| 185 if (identical(peek(), "-")) { | 185 if (identical(peek(), "-")) { |
| 186 pop(); | 186 pop(); |
| 187 push("unary-"); | 187 push("unary-"); |
| 188 } | 188 } |
| 189 push(token); | 189 push(token); |
| 190 } | 190 } |
| 191 | 191 |
| 192 @override | 192 @override |
| 193 void endFunctionTypeAlias( | 193 void endFunctionTypeAlias(Token typedefKeyword, Token endToken) { |
| 194 Token typedefKeyword, Token equals, Token endToken) { | |
| 195 debugEvent("FunctionTypeAlias"); | 194 debugEvent("FunctionTypeAlias"); |
| 196 discard(2); // Name + endToken. | 195 discard(2); // Name + endToken. |
| 197 checkEmpty(typedefKeyword.charOffset); | 196 checkEmpty(typedefKeyword.charOffset); |
| 198 } | 197 } |
| 199 | 198 |
| 200 @override | 199 @override |
| 201 void endFields(int count, Token beginToken, Token endToken) { | 200 void endFields(int count, Token beginToken, Token endToken) { |
| 202 debugEvent("Fields"); | 201 debugEvent("Fields"); |
| 203 List<String> names = popList(count); | 202 List<String> names = popList(count); |
| 204 Builder builder = lookupBuilder(beginToken, null, names.first); | 203 Builder builder = lookupBuilder(beginToken, null, names.first); |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 bool get isTargetingDartVm { | 560 bool get isTargetingDartVm { |
| 562 // TODO(ahe): Find a more reliable way to check if this is the Dart VM. | 561 // TODO(ahe): Find a more reliable way to check if this is the Dart VM. |
| 563 return coreTypes.getCoreLibrary("dart:_js_helper") == null; | 562 return coreTypes.getCoreLibrary("dart:_js_helper") == null; |
| 564 } | 563 } |
| 565 | 564 |
| 566 @override | 565 @override |
| 567 void debugEvent(String name) { | 566 void debugEvent(String name) { |
| 568 // printEvent(name); | 567 // printEvent(name); |
| 569 } | 568 } |
| 570 } | 569 } |
| OLD | NEW |