1 package net.sourceforge.phpdt.internal.compiler.ast;
8 * @author Matthieu Casanova
10 public class EchoStatement extends Statement {
12 /** An array of expressions in this echo statement. */
13 public Expression[] expressions;
15 public EchoStatement (final Expression[] expressions, final int sourceStart, final int sourceEnd) {
16 super(sourceStart, sourceEnd);
17 this.expressions = expressions;
20 public String toString() {
21 final StringBuffer buff = new StringBuffer("echo ");//$NON-NLS-1$
22 for (int i = 0; i < expressions.length; i++) {
24 buff.append(", ");//$NON-NLS-1$
26 buff.append(expressions[i].toStringExpression());
28 return buff.toString();
32 * Return the object into String.
33 * @param tab how many tabs (not used here
36 public String toString(final int tab) {
37 final String tabs = tabString(tab);
38 final String str = toString();
39 final StringBuffer buff = new StringBuffer(tabs.length()+str.length());
40 return buff.toString();
44 * Get the variables from outside (parameters, globals ...)
46 public void getOutsideVariable(final List list) {
47 for (int i = 0; i < expressions.length; i++) {
48 expressions[i].getOutsideVariable(list);
53 * get the modified variables.
55 public void getModifiedVariable(final List list) {
56 for (int i = 0; i < expressions.length; i++) {
57 expressions[i].getModifiedVariable(list);
62 * Get the variables used.
64 public void getUsedVariable(final List list) {
65 for (int i = 0; i < expressions.length; i++) {
66 expressions[i].getUsedVariable(list);