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 'package:kernel/ast.dart' | 7 import 'package:kernel/ast.dart' |
8 hide InvalidExpression, InvalidInitializer, InvalidStatement; | 8 hide InvalidExpression, InvalidInitializer, InvalidStatement; |
9 | 9 |
10 import 'package:kernel/class_hierarchy.dart' show ClassHierarchy; | 10 import 'package:kernel/class_hierarchy.dart' show ClassHierarchy; |
(...skipping 3186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3197 Initializer buildSuperInitializer( | 3197 Initializer buildSuperInitializer( |
3198 bool isSynthetic, Constructor constructor, Arguments arguments, | 3198 bool isSynthetic, Constructor constructor, Arguments arguments, |
3199 [int charOffset = -1]) { | 3199 [int charOffset = -1]) { |
3200 if (member.isConst && !constructor.isConst) { | 3200 if (member.isConst && !constructor.isConst) { |
3201 return buildInvalidInitializer( | 3201 return buildInvalidInitializer( |
3202 deprecated_buildCompileTimeError( | 3202 deprecated_buildCompileTimeError( |
3203 "Super constructor isn't const.", charOffset), | 3203 "Super constructor isn't const.", charOffset), |
3204 charOffset); | 3204 charOffset); |
3205 } | 3205 } |
3206 needsImplicitSuperInitializer = false; | 3206 needsImplicitSuperInitializer = false; |
3207 return new SuperInitializer(constructor, arguments) | 3207 return new KernelSuperInitializer(constructor, arguments) |
3208 ..fileOffset = charOffset | 3208 ..fileOffset = charOffset |
3209 ..isSynthetic = isSynthetic; | 3209 ..isSynthetic = isSynthetic; |
3210 } | 3210 } |
3211 | 3211 |
3212 @override | 3212 @override |
3213 Initializer buildRedirectingInitializer( | 3213 Initializer buildRedirectingInitializer( |
3214 Constructor constructor, Arguments arguments, | 3214 Constructor constructor, Arguments arguments, |
3215 [int charOffset = -1]) { | 3215 [int charOffset = -1]) { |
3216 needsImplicitSuperInitializer = false; | 3216 needsImplicitSuperInitializer = false; |
3217 return new KernelRedirectingInitializer(constructor, arguments) | 3217 return new KernelRedirectingInitializer(constructor, arguments) |
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3800 return AsyncMarker.Async; | 3800 return AsyncMarker.Async; |
3801 } else { | 3801 } else { |
3802 assert(identical(starToken.stringValue, "*")); | 3802 assert(identical(starToken.stringValue, "*")); |
3803 return AsyncMarker.AsyncStar; | 3803 return AsyncMarker.AsyncStar; |
3804 } | 3804 } |
3805 } else { | 3805 } else { |
3806 return unhandled(asyncToken.lexeme, "asyncMarkerFromTokens", | 3806 return unhandled(asyncToken.lexeme, "asyncMarkerFromTokens", |
3807 asyncToken.charOffset, null); | 3807 asyncToken.charOffset, null); |
3808 } | 3808 } |
3809 } | 3809 } |
OLD | NEW |