First try for AST structure. A lot of things to change
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / ast / AbstractVariableDeclaration.java
index 8df3dfb..9fbe9ae 100644 (file)
@@ -1,18 +1,30 @@
 package net.sourceforge.phpdt.internal.compiler.ast;
 
+
 /**
  * An abstract variable declaration.
  * @author Matthieu Casanova
  */
-public class AbstractVariableDeclaration extends AstNode {
+public abstract class AbstractVariableDeclaration extends Expression {
   /** The name of the variable. */
   public char[] name;
 
   /**
+   * Create a node giving starting and ending offset
+   * @param sourceStart starting offset
+   * @param sourceEnd ending offset
+   * @param name the name of the variable
+   */
+  public AbstractVariableDeclaration(char[] name, int sourceStart, int sourceEnd) {
+    super(sourceStart, sourceEnd);
+    this.name = name;
+  }
+
+  /**
    * Get the name of the field as String.
    * @return the name of the String
    */
   public String name() {
-    return String.valueOf(name);
+    return new String(name);
   }
 }