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.kernel_variable_builder; | 5 library fasta.kernel_variable_builder; |
6 | 6 |
7 import 'package:kernel/ast.dart' show VariableDeclaration; | 7 import 'package:kernel/ast.dart' show VariableDeclaration; |
8 | 8 |
9 import 'kernel_builder.dart' show Builder; | 9 import 'kernel_builder.dart' show Builder; |
10 | 10 |
11 class KernelVariableBuilder extends Builder { | 11 class KernelVariableBuilder extends Builder { |
12 final VariableDeclaration variable; | 12 final VariableDeclaration variable; |
13 | 13 |
14 KernelVariableBuilder( | 14 KernelVariableBuilder( |
15 VariableDeclaration variable, Builder parent, Uri fileUri) | 15 VariableDeclaration variable, Builder parent, Uri fileUri) |
16 : variable = variable, | 16 : variable = variable, |
17 super(parent, variable.fileOffset, fileUri); | 17 super(parent, variable.fileOffset, fileUri); |
18 | 18 |
19 bool get isLocal => true; | 19 bool get isLocal => true; |
20 | 20 |
21 VariableDeclaration get target => variable; | 21 VariableDeclaration get target => variable; |
| 22 |
| 23 @override |
| 24 String get fullNameForErrors => variable.name ?? "<unnamed>"; |
22 } | 25 } |
OLD | NEW |