Index: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/FormalParameter.java |
=================================================================== |
--- editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/FormalParameter.java (revision 14967) |
+++ editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/FormalParameter.java (working copy) |
@@ -13,6 +13,8 @@ |
*/ |
package com.google.dart.engine.ast; |
+import com.google.dart.engine.utilities.dart.ParameterKind; |
scheglov
2012/11/16 03:25:26
Hm...
Can we keep all AST parts in "ast" package a
Brian Wilkerson
2012/11/16 15:55:02
Not without duplicating code, which I am loath to
|
+ |
/** |
* The abstract class {@code FormalParameter} defines the behavior of objects representing a |
* parameter to a function. |
@@ -26,40 +28,6 @@ |
*/ |
public abstract class FormalParameter extends ASTNode { |
/** |
- * The enumeration {@code ParameterKind} defines the different kinds of parameters. There are two |
- * basic kinds of parameters: required and optional. Optional parameters are further divided into |
- * two kinds: positional optional and named optional. |
- */ |
- public enum ParameterKind { |
- REQUIRED(false), |
- POSITIONAL(true), |
- NAMED(true); |
- |
- /** |
- * A flag indicating whether this is an optional parameter. |
- */ |
- private boolean isOptional; |
- |
- /** |
- * Initialize a newly created kind with the given state. |
- * |
- * @param isOptional {@code true} if this is an optional parameter |
- */ |
- private ParameterKind(boolean isOptional) { |
- this.isOptional = isOptional; |
- } |
- |
- /** |
- * Return {@code true} if this is an optional parameter. |
- * |
- * @return {@code true} if this is an optional parameter |
- */ |
- public boolean isOptional() { |
- return isOptional; |
- } |
- } |
- |
- /** |
* Return the kind of this parameter. |
* |
* @return the kind of this parameter |