| 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 3163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3174 .withArguments(name), | 3174 .withArguments(name), |
| 3175 builder.charOffset); | 3175 builder.charOffset); |
| 3176 Builder constructor = | 3176 Builder constructor = |
| 3177 library.loader.getDuplicatedFieldInitializerError(); | 3177 library.loader.getDuplicatedFieldInitializerError(); |
| 3178 return buildInvalidInitializer( | 3178 return buildInvalidInitializer( |
| 3179 new Throw(buildStaticInvocation(constructor.target, | 3179 new Throw(buildStaticInvocation(constructor.target, |
| 3180 new Arguments(<Expression>[new StringLiteral(name)]), | 3180 new Arguments(<Expression>[new StringLiteral(name)]), |
| 3181 charOffset: offset)), | 3181 charOffset: offset)), |
| 3182 offset); | 3182 offset); |
| 3183 } else { | 3183 } else { |
| 3184 return new FieldInitializer(builder.field, expression) | 3184 return new KernelFieldInitializer(builder.field, expression) |
| 3185 ..fileOffset = offset | 3185 ..fileOffset = offset |
| 3186 ..isSynthetic = isSynthetic; | 3186 ..isSynthetic = isSynthetic; |
| 3187 } | 3187 } |
| 3188 } else { | 3188 } else { |
| 3189 return buildInvalidInitializer( | 3189 return buildInvalidInitializer( |
| 3190 deprecated_buildCompileTimeError( | 3190 deprecated_buildCompileTimeError( |
| 3191 "'$name' isn't an instance field of this class.", offset), | 3191 "'$name' isn't an instance field of this class.", offset), |
| 3192 offset); | 3192 offset); |
| 3193 } | 3193 } |
| 3194 } | 3194 } |
| (...skipping 605 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 |