-/*******************************************************************************
- * Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
package net.sourceforge.phpdt.internal.compiler.ast;
-public abstract class AbstractVariableDeclaration extends Statement {
- public int modifiers;
+import net.sourceforge.phpdt.internal.compiler.ast.declarations.VariableUsage;
- public TypeReference type;
- public Expression initialization;
+import java.util.List;
+import java.util.ArrayList;
- public char[] name;
- public int declarationEnd;
- public int declarationSourceStart;
- public int declarationSourceEnd;
- public int modifiersSourceStart;
- public AbstractVariableDeclaration() {
- }
- public abstract String name();
-
- public String toString(int tab) {
- String s = tabString(tab);
- if (modifiers != AccDefault) {
- s += modifiersString(modifiers);
- }
- s += type.toString(0) + " " + new String(name()); //$NON-NLS-1$
- if (initialization != null)
- s += " = " + initialization.toStringExpression(tab); //$NON-NLS-1$
- return s;
- }
-}
\ No newline at end of file
+/**
+ * An abstract variable declaration.
+ * @author Matthieu Casanova
+ */
+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(final char[] name, final int sourceStart, final int sourceEnd) {
+ super(sourceStart, sourceEnd);
+ this.name = name;
+ }
+
+
+}