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

Unified Diff: pkg/analyzer/lib/src/generated/constant.dart

Issue 109853003: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/lib/src/generated/constant.dart
diff --git a/pkg/analyzer/lib/src/generated/constant.dart b/pkg/analyzer/lib/src/generated/constant.dart
index 965bcbdef5fa038c6c5d21c0b093ac6f8970f978..8fe9e12bb1e3814710710d820cc3c9b665b54448 100644
--- a/pkg/analyzer/lib/src/generated/constant.dart
+++ b/pkg/analyzer/lib/src/generated/constant.dart
@@ -105,7 +105,7 @@ class EvaluationResult {
/**
* The value of the expression.
*/
- Object value;
+ final Object value;
/**
* The errors that should be reported for the expression(s) that were evaluated.
@@ -119,8 +119,7 @@ class EvaluationResult {
* @param value the value of the expression
* @param errors the errors that should be reported for the expression(s) that were evaluated
*/
- EvaluationResult(Object value, List<AnalysisError> errors) {
- this.value = value;
+ EvaluationResult(this.value, List<AnalysisError> errors) {
this._errors = errors;
}
@@ -739,7 +738,7 @@ class ErrorResult extends EvaluationResultImpl {
/**
* The errors that prevent the expression from being a valid compile time constant.
*/
- final List<ErrorResult_ErrorData> errorData = new List<ErrorResult_ErrorData>();
+ List<ErrorResult_ErrorData> _errors = new List<ErrorResult_ErrorData>();
/**
* Initialize a newly created result representing the error with the given code reported against
@@ -749,7 +748,7 @@ class ErrorResult extends EvaluationResultImpl {
* @param errorCode the error code for the error to be generated
*/
ErrorResult.con1(ASTNode node, ErrorCode errorCode) {
- errorData.add(new ErrorResult_ErrorData(node, errorCode));
+ _errors.add(new ErrorResult_ErrorData(node, errorCode));
}
/**
@@ -760,8 +759,8 @@ class ErrorResult extends EvaluationResultImpl {
* @param secondResult the second set of results being merged
*/
ErrorResult.con2(ErrorResult firstResult, ErrorResult secondResult) {
- errorData.addAll(firstResult.errorData);
- errorData.addAll(secondResult.errorData);
+ _errors.addAll(firstResult._errors);
+ _errors.addAll(secondResult._errors);
}
EvaluationResultImpl add(BinaryExpression node, EvaluationResultImpl rightOperand) => rightOperand.addToError(node, this);
@@ -784,6 +783,8 @@ class ErrorResult extends EvaluationResultImpl {
bool equalValues(EvaluationResultImpl result) => false;
+ List<ErrorResult_ErrorData> get errorData => _errors;
+
EvaluationResultImpl greaterThan(BinaryExpression node, EvaluationResultImpl rightOperand) => rightOperand.greaterThanError(node, this);
EvaluationResultImpl greaterThanOrEqual(BinaryExpression node, EvaluationResultImpl rightOperand) => rightOperand.greaterThanOrEqualError(node, this);
@@ -901,12 +902,12 @@ class ErrorResult_ErrorData {
/**
* The node against which the error should be reported.
*/
- ASTNode node;
+ final ASTNode node;
/**
* The error code for the error to be generated.
*/
- ErrorCode errorCode;
+ final ErrorCode errorCode;
/**
* Initialize a newly created data holder to represent the error with the given code reported
@@ -915,10 +916,7 @@ class ErrorResult_ErrorData {
* @param node the node against which the error should be reported
* @param errorCode the error code for the error to be generated
*/
- ErrorResult_ErrorData(ASTNode node, ErrorCode errorCode) {
- this.node = node;
- this.errorCode = errorCode;
- }
+ ErrorResult_ErrorData(this.node, this.errorCode);
}
/**
@@ -1174,16 +1172,14 @@ class ValidResult extends EvaluationResultImpl {
/**
* The value of the expression.
*/
- Object value;
+ final Object value;
/**
* Initialize a newly created result to represent the given value.
*
* @param value the value of the expression
*/
- ValidResult(Object value) {
- this.value = value;
- }
+ ValidResult(this.value);
EvaluationResultImpl add(BinaryExpression node, EvaluationResultImpl rightOperand) => rightOperand.addToValid(node, this);

Powered by Google App Engine
This is Rietveld 408576698