OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 analyzer.src.generated.constant; | 5 library analyzer.src.generated.constant; |
6 | 6 |
7 import 'package:analyzer/context/declared_variables.dart'; | 7 import 'package:analyzer/context/declared_variables.dart'; |
8 import 'package:analyzer/dart/ast/ast.dart'; | 8 import 'package:analyzer/dart/ast/ast.dart'; |
| 9 import 'package:analyzer/error/listener.dart'; |
9 import 'package:analyzer/src/dart/constant/evaluation.dart'; | 10 import 'package:analyzer/src/dart/constant/evaluation.dart'; |
10 import 'package:analyzer/src/dart/constant/value.dart'; | 11 import 'package:analyzer/src/dart/constant/value.dart'; |
11 import 'package:analyzer/src/generated/engine.dart'; | 12 import 'package:analyzer/src/generated/engine.dart'; |
12 import 'package:analyzer/src/generated/engine.dart' show RecordingErrorListener; | 13 import 'package:analyzer/src/generated/engine.dart' show RecordingErrorListener; |
13 import 'package:analyzer/src/generated/error.dart'; | |
14 import 'package:analyzer/src/generated/resolver.dart' show TypeProvider; | 14 import 'package:analyzer/src/generated/resolver.dart' show TypeProvider; |
15 import 'package:analyzer/src/generated/source.dart' show Source; | 15 import 'package:analyzer/src/generated/source.dart' show Source; |
16 import 'package:analyzer/src/generated/type_system.dart' | 16 import 'package:analyzer/src/generated/type_system.dart' |
17 show TypeSystem, TypeSystemImpl; | 17 show TypeSystem, TypeSystemImpl; |
18 | 18 |
19 export 'package:analyzer/context/declared_variables.dart'; | 19 export 'package:analyzer/context/declared_variables.dart'; |
20 export 'package:analyzer/dart/constant/value.dart'; | 20 export 'package:analyzer/dart/constant/value.dart'; |
21 export 'package:analyzer/src/dart/constant/evaluation.dart'; | 21 export 'package:analyzer/src/dart/constant/evaluation.dart'; |
22 export 'package:analyzer/src/dart/constant/utilities.dart'; | 22 export 'package:analyzer/src/dart/constant/utilities.dart'; |
23 export 'package:analyzer/src/dart/constant/value.dart'; | 23 export 'package:analyzer/src/dart/constant/value.dart'; |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 DartObjectImpl result = expression.accept(new ConstantVisitor( | 128 DartObjectImpl result = expression.accept(new ConstantVisitor( |
129 new ConstantEvaluationEngine(_typeProvider, new DeclaredVariables(), | 129 new ConstantEvaluationEngine(_typeProvider, new DeclaredVariables(), |
130 typeSystem: _typeSystem), | 130 typeSystem: _typeSystem), |
131 errorReporter)); | 131 errorReporter)); |
132 if (result != null) { | 132 if (result != null) { |
133 return EvaluationResult.forValue(result); | 133 return EvaluationResult.forValue(result); |
134 } | 134 } |
135 return EvaluationResult.forErrors(errorListener.errors); | 135 return EvaluationResult.forErrors(errorListener.errors); |
136 } | 136 } |
137 } | 137 } |
OLD | NEW |