| 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.outline_builder; | 5 library fasta.outline_builder; |
| 6 | 6 |
| 7 import 'package:kernel/ast.dart' show ProcedureKind; | 7 import 'package:kernel/ast.dart' show ProcedureKind; |
| 8 | 8 |
| 9 import '../../scanner/token.dart' show Token; | 9 import '../../scanner/token.dart' show Token; |
| 10 | 10 |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 void beginClassDeclaration(Token begin, Token name) { | 286 void beginClassDeclaration(Token begin, Token name) { |
| 287 library.currentDeclaration.name = name.lexeme; | 287 library.currentDeclaration.name = name.lexeme; |
| 288 } | 288 } |
| 289 | 289 |
| 290 @override | 290 @override |
| 291 void beginNamedMixinApplication(Token beginToken, Token name) { | 291 void beginNamedMixinApplication(Token beginToken, Token name) { |
| 292 library.currentDeclaration.name = name.lexeme; | 292 library.currentDeclaration.name = name.lexeme; |
| 293 } | 293 } |
| 294 | 294 |
| 295 @override | 295 @override |
| 296 void handleNativeClause(Token nativeToken, bool hasName) { |
| 297 if (hasName) { |
| 298 // Pop the native clause which in this case is a StringLiteral. |
| 299 pop(); // Char offset. |
| 300 pop(); // String. |
| 301 } |
| 302 } |
| 303 |
| 304 @override |
| 296 void endClassDeclaration( | 305 void endClassDeclaration( |
| 297 int interfacesCount, | 306 int interfacesCount, |
| 298 Token beginToken, | 307 Token beginToken, |
| 299 Token classKeyword, | 308 Token classKeyword, |
| 300 Token extendsKeyword, | 309 Token extendsKeyword, |
| 301 Token implementsKeyword, | 310 Token implementsKeyword, |
| 311 Token nativeToken, |
| 302 Token endToken) { | 312 Token endToken) { |
| 303 debugEvent("endClassDeclaration"); | 313 debugEvent("endClassDeclaration"); |
| 304 String documentationComment = _getDocumentationComment(beginToken); | 314 String documentationComment = _getDocumentationComment(beginToken); |
| 305 List<TypeBuilder> interfaces = popList(interfacesCount); | 315 List<TypeBuilder> interfaces = popList(interfacesCount); |
| 306 TypeBuilder supertype = pop(); | 316 TypeBuilder supertype = pop(); |
| 307 List<TypeVariableBuilder> typeVariables = pop(); | 317 List<TypeVariableBuilder> typeVariables = pop(); |
| 308 int charOffset = pop(); | 318 int charOffset = pop(); |
| 309 String name = pop(); | 319 String name = pop(); |
| 310 if (typeVariables != null && supertype is MixinApplicationBuilder) { | 320 if (typeVariables != null && supertype is MixinApplicationBuilder) { |
| 311 supertype.typeVariables = typeVariables; | 321 supertype.typeVariables = typeVariables; |
| (...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 964 docToken = docToken.next; | 974 docToken = docToken.next; |
| 965 } | 975 } |
| 966 return buffer.toString(); | 976 return buffer.toString(); |
| 967 } | 977 } |
| 968 | 978 |
| 969 @override | 979 @override |
| 970 void debugEvent(String name) { | 980 void debugEvent(String name) { |
| 971 // printEvent(name); | 981 // printEvent(name); |
| 972 } | 982 } |
| 973 } | 983 } |
| OLD | NEW |