Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: pkg/analyzer/lib/src/generated/constant.dart

Issue 2508973005: Un-deprecate some deprecated code and fix a couple of hints (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/error/listener.dart';
10 import 'package:analyzer/src/dart/constant/evaluation.dart'; 10 import 'package:analyzer/src/dart/constant/evaluation.dart';
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 /// > evaluates to a boolean value. 90 /// > evaluates to a boolean value.
91 /// > </span> 91 /// > </span>
92 /// 92 ///
93 /// The values returned by instances of this class are therefore `null` and 93 /// The values returned by instances of this class are therefore `null` and
94 /// instances of the classes `Boolean`, `BigInteger`, `Double`, `String`, and 94 /// instances of the classes `Boolean`, `BigInteger`, `Double`, `String`, and
95 /// `DartObject`. 95 /// `DartObject`.
96 /// 96 ///
97 /// In addition, this class defines several values that can be returned to 97 /// In addition, this class defines several values that can be returned to
98 /// indicate various conditions encountered during evaluation. These are 98 /// indicate various conditions encountered during evaluation. These are
99 /// documented with the static fields that define those values. 99 /// documented with the static fields that define those values.
100 @deprecated
101 class ConstantEvaluator { 100 class ConstantEvaluator {
102 /** 101 /**
103 * The source containing the expression(s) that will be evaluated. 102 * The source containing the expression(s) that will be evaluated.
104 */ 103 */
105 final Source _source; 104 final Source _source;
106 105
107 /** 106 /**
108 * The type provider used to access the known types. 107 * The type provider used to access the known types.
109 */ 108 */
110 final TypeProvider _typeProvider; 109 final TypeProvider _typeProvider;
(...skipping 17 matching lines...) Expand all
128 DartObjectImpl result = expression.accept(new ConstantVisitor( 127 DartObjectImpl result = expression.accept(new ConstantVisitor(
129 new ConstantEvaluationEngine(_typeProvider, new DeclaredVariables(), 128 new ConstantEvaluationEngine(_typeProvider, new DeclaredVariables(),
130 typeSystem: _typeSystem), 129 typeSystem: _typeSystem),
131 errorReporter)); 130 errorReporter));
132 if (result != null) { 131 if (result != null) {
133 return EvaluationResult.forValue(result); 132 return EvaluationResult.forValue(result);
134 } 133 }
135 return EvaluationResult.forErrors(errorListener.errors); 134 return EvaluationResult.forErrors(errorListener.errors);
136 } 135 }
137 } 136 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/dart/analysis/file_byte_store.dart ('k') | pkg/analyzer/lib/src/generated/engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698