| Index: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/InstanceCreationExpression.java
|
| diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/InstanceCreationExpression.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/InstanceCreationExpression.java
|
| index ef4045c30a823618dd2e9455e390de75b8dd6220..5bc3ff3f60c1ebbea7ad6ec97d1cb18e1e2b0845 100644
|
| --- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/InstanceCreationExpression.java
|
| +++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/InstanceCreationExpression.java
|
| @@ -14,6 +14,7 @@
|
| package com.google.dart.engine.ast;
|
|
|
| import com.google.dart.engine.element.ConstructorElement;
|
| +import com.google.dart.engine.internal.constant.EvaluationResultImpl;
|
| import com.google.dart.engine.scanner.Keyword;
|
| import com.google.dart.engine.scanner.KeywordToken;
|
| import com.google.dart.engine.scanner.Token;
|
| @@ -52,6 +53,11 @@ public class InstanceCreationExpression extends Expression {
|
| private ConstructorElement staticElement;
|
|
|
| /**
|
| + * The result of evaluating this expression, if it is constant.
|
| + */
|
| + private EvaluationResultImpl result;
|
| +
|
| + /**
|
| * Initialize a newly created instance creation expression.
|
| *
|
| * @param keyword the keyword used to indicate how an object should be created
|
| @@ -99,6 +105,17 @@ public class InstanceCreationExpression extends Expression {
|
| }
|
|
|
| /**
|
| + * Return the result of evaluating this constant as a compile-time constant expression, or
|
| + * {@code null} if this variable is not a 'const' expression or an error prevented the result from
|
| + * being computed.
|
| + *
|
| + * @return the result of evaluating this constant
|
| + */
|
| + public EvaluationResultImpl getEvaluationResult() {
|
| + return result;
|
| + }
|
| +
|
| + /**
|
| * Return the keyword used to indicate how an object should be created.
|
| *
|
| * @return the keyword used to indicate how an object should be created
|
| @@ -152,6 +169,16 @@ public class InstanceCreationExpression extends Expression {
|
| }
|
|
|
| /**
|
| + * Set the result of evaluating this expression as a compile-time constant expression to the given
|
| + * result.
|
| + *
|
| + * @param result the result of evaluating this expression
|
| + */
|
| + public void setEvaluationResult(EvaluationResultImpl result) {
|
| + this.result = result;
|
| + }
|
| +
|
| + /**
|
| * Set the keyword used to indicate how an object should be created to the given keyword.
|
| *
|
| * @param keyword the keyword used to indicate how an object should be created
|
|
|